summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2016-08-18Merge "sip_to_pjsip: Write cos and tos."Joshua Colp
2016-08-18sip_to_pjsip: Set correct tls transport methodKevin Harwell
A recent update had a copy/paste error where the unused variable 'val' was being passed to the set_value function instead of the 'method' value itself. This patch passes in the right variable. ASTERISK-22374 Change-Id: I895b7b3779ce4442bc58b8ec40d59dd29bb43f06
2016-08-18Merge "sip_to_pjsip: Parse register even with transport."Joshua Colp
2016-08-18Merge "sip_to_pjsip: Write local_net, contact_acl, contact_deny, and ↵Joshua Colp
contact_permit."
2016-08-18Merge "sip_to_pjsip: Map (session-)timers correctly."Joshua Colp
2016-08-18Merge "sip_to_pjsip: Add cert_file and ca_list_path."Joshua Colp
2016-08-18Merge "sip_to_pjsip: Write username even without authname."Joshua Colp
2016-08-18Merge "sip_to_pjsip: Map the TLS method correctly."Joshua Colp
2016-08-18Merge "sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent."Joshua Colp
2016-08-18Merge "sip_to_pjsip: Write media_encryption."Joshua Colp
2016-08-18sip_to_pjsip: Map the TLS method correctly.Alexander Traud
When using the migration script sip_to_pjsip.py and tlsclientmethod is not set in sip.conf, the default value of chan_sip (sslv23) is copied to pjsip.conf, to overwrite the default of the PJProject (tlsv1). This makes sure, res_pjsip is offering/using not just TLSv1.0 but TLSv1.2 as well. ASTERISK-22374 Change-Id: Ie530a3dae9926ae14f3920a21be1e2edb15bda4f
2016-08-18sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent.Alexander Traud
When using the migration script sip_to_pjsip.py, no section of type=system or type=general were created. Therefore the keys compactheaders, timerb, timert1, and useragent were not migrated to pjsip.conf. ASTERISK-22374 Change-Id: I318a453843227ea36bf130d392d4abd7bd26b5a1
2016-08-18sip_to_pjsip: Map (session-)timers correctly.Alexander Traud
When using the migration script sip_to_pjsip.py, session-timers=accept and session-timers=refuse were mapped to wrong values. ASTERISK-22374 Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092
2016-08-18sip_to_pjsip: Write username even without authname.Alexander Traud
When using the migration script sip_to_pjsip.py, now the (mandatory) username is written to pjsip.conf, even if there was no (optional) authname in the register string in sip.conf. ASTERISK-22374 Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f
2016-08-18sip_to_pjsip: Parse register even with transport.Alexander Traud
When using the migration script sip_to_pjsip.py and the register string started with a transport in sip.conf - like tls://... - register was not parsed correctly and therefore not migrated correctly to pjsip.conf. ASTERISK-22374 Change-Id: I44c12104eea2bd8558ada6d25d77edfecd92edd2
2016-08-18sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit.Alexander Traud
When using the migration script sip_to_pjsip.py, those keys got missing. These keys might appear several times and the function "merge_value" tried to collect those. However, because these keys have different names in sip.conf and pjsip.conf, "merge_value" was not able to find the new key name in sip.conf. This change lets "merge_value" search with the old key name in sip.conf and write with the new key name in pjsip.conf. ASTERISK-22374 Change-Id: Ie53c5278ae6f1cb8fa7e96c5289877d46981d9d2
2016-08-18sip_to_pjsip: Map externhost/ip to Transports.Alexander Traud
When using the migration script sip_to_pjsip.py, the externhost or externip of sip.conf were erroneously written to Endpoints instead to Transports. ASTERISK-22374 Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4
2016-08-18sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry.Alexander Traud
When using the migration script sip_to_pjsip.py, defaultexpiry, maxexpiry, and minexpiry were not migrated to pjsip.conf. ASTERISK-22374 Change-Id: I007fbf543dcadc96fc3ed71c54da502bcb209b7b
2016-08-18sip_to_pjsip: Write media_encryption.Alexander Traud
When using the migration script sip_to_pjsip.py, encryption=yes got missing and media_encryption=sdes was not written to pjsip.conf, because of a typo. ASTERISK-22374 Change-Id: I0fc3e55dc512a57603ae0fef41baacccf2a35c05
2016-08-18sip_to_pjsip: Write cos and tos.Alexander Traud
When using the migration script sip_to_pjsip.py, both tos_sip and cos_sip got missed, because of a typo. Therefore, cos and tos were not written to pjsip.conf. Furthermore, that revealed a misuse of an internal function, caused by a copy-and-paste error. ASTERISK-22374 Change-Id: Id245ebadf70ab9776eb280c026288540af3af5c2
2016-08-18sip_to_pjsip: Add cert_file and ca_list_path.Alexander Traud
When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were not migrated to pjsip.conf. ASTERISK-22374 Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825
2016-08-17res_pjsip: Add contact_user to endpointGeorge Joseph
contact_user, when specified on an endpoint, will override the user portion of the Contact header on outgoing requests. Change-Id: Icd4ebfda2f2e44d3ac749d0b4066630e988407d4
2016-08-11alembic: add auth_username to endpoint's identify_by enumKevin Harwell
A new identify_by option was added recently, auth_username. However, this setting was not added as an allowable choice in the database enumeration value. This patch updates the current enumeration, adding in the new setting. ASTERISK-26268 #close Change-Id: Ib4788e8485e4cd40172ec0abbf5810a147ab8bf8
2016-08-10Merge "alembic/sqlalchemy: auto increment only allowed on a single column"zuul
2016-08-10alembic/sqlalchemy: auto increment only allowed on a single columnKevin Harwell
The extensions table defined two columns (id and priority) as primary key autoincrement columns. However only one is allowed when defining the primary key. This patch removes the autoincrement attribute from the priority column since it does not need to be as such and really should not have been on there in the first place. This patch also removes 'context', 'exten', and 'priority' from the primary key index and creates a new combined unique contraint index on them. ASTERISK-26183 #close Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b
2016-08-08res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stackAlexei Gradinari
The PJSIP taskprocessors could be overflowed on startup if there are many (thousands) realtime endpoints configured with unsolicited mwi. The PJSIP stack could be totally unresponsive for a few minutes after boot completed. This patch creates a separate PJSIP serializers pool for mwi and makes unsolicited mwi use serializers from this pool. This patch also adds 2 new global options to tune taskprocessor alert levels: 'mwi_tps_queue_high' and 'mwi_tps_queue_low'. This patch also adds new global option 'mwi_disable_initial_unsolicited' to disable sending unsolicited mwi to all endpoints on startup. If disabled then unsolicited mwi will start processing on next endpoint's contact update. ASTERISK-26230 #close Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a
2016-08-03astconfigparser: Really handle case where line is simply a comment.Joshua Colp
The regular expression would match causing the code that handled the line if it was merely a comment to never get executed. Change-Id: I3e4022481037ebcba9905587fe8c764b4ce21819
2016-07-29astconfigparser: Handle case where line is simply a comment.Joshua Colp
Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5
2016-07-26astconfigparser.py: Update with realtime fixes.Joshua Colp
When configuring SIP URIs in the pjsip.conf file it is necessary to escape the semicolon so the parser does not treat it as a comment. This change allows this to work in the astconfigparser implementation. A secondary bug where some data was lost if a configuration option included a "=" in its value was also fixed. A bug where sections would be considered equal despite being different has also been fixed. Change-Id: If229f656ef22050b50e7b34e90c4bffe796431f8
2016-07-22Fix sqlalchemy error regarding identifier length.Mark Michelson
sqlalchemy was complaining: sqlalchemy.exc.IdentifierError: Identifier 'ps_contacts_qualifyfreq_exptime' exceeds maximum length of 30 characters This fixes the problem by changing the index name to be "ps_contacts_qualifyfreq_exp" instead. ASTERISK-26227 #close Reported by Mark Michelson Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9
2016-07-19res_pjsip: Add fax_detect_timeout endpoint option.Richard Mudgett
The new endpoint option allows the PJSIP channel driver's fax_detect endpoint option to timeout on a call after the specified number of seconds into a call. The new feature is disabled if the timeout is set to zero. The option is disabled by default. ASTERISK-26214 Reported by: Richard Mudgett Change-Id: Id5a87375fb2c4f9dc1d4b44c78ec8735ba65453d
2016-07-12Merge "install_prereq: Checkout of libSRTP 1.5.x."Joshua Colp
2016-07-11install_prereq: Checkout of libSRTP 1.5.x.Alexander Traud
Since 5th November 2014, the master branch of libSRTP changed the prefix of several member names and is not compatible with the source code in Asterisk anymore. Therefore instead, this change checks out the latest version of the libSRTP 1.5.x branch. Furthermore now, libSRTP is compiled with OpenSSL as backend. This makes AES-GCM and AES-IN possible. ASTERISK-22131 #close Change-Id: I2e396cdc01da0ff610686e398ed210ca7408f7d6
2016-07-06res_pjsip: Added "subscribe_context" to endpointAlexei Gradinari
If specified, incoming SUBSCRIBE requests will be searched for the matching extension in the indicated context. If no "subscribe_context" is specified, then the "context" setting is used. ASTERISK-25471 #close Change-Id: I3fb7a15f5bc154079bd348c08b7ad1cdd2d5e514
2016-06-30Merge "res_pjsip: improve realtime performance #2"Joshua Colp
2016-06-22res_pjsip: improve realtime performance #2Alexei Gradinari
The patch removes updating all Endpoints' status on startup. Instead, only non-qualified aors with static contact and non-qualified non-expired contacts are retrieved from the realtime to update the endpoint status to ONLINE. The endpoint name was added to the contact object to simply find the endpoint that created this contact. The status of endpoints with qualified aors will be updated by 'qualify' functions. ASTERISK-26061 #close Change-Id: Id324c1776fa55d3741e0c5457ecac0304cb1a0df
2016-06-22Fix Alembic upgrades.Mark Michelson
A non-existent constraint was being referenced in the upgrade script. This patch corrects the problem by removing the reference. In addition, the head of the alembic branch referred to a non-existent revision. This has been fixed by referring to the proper revision. This patch fixes another realtime problem as well. Our Alembic scripts store booleans as yes or no values. However, Sorcery tries to insert "true" or "false" instead. This patch introduces a new boolean type that translates to "yes" or "no" instead. ASTERISK-26128 #close Change-Id: I51574736a881189de695a824883a18d66a52dcef
2016-06-02alembic: Fix migration.Joshua Colp
The 81b01a191a46_pjsip_add_contact_reg_server.py script was attempting to use UniqueConstraint and failing. It was not imported and after importing it also continued to fail. I've changed the script to use the explicit name of the constraint instead. Change-Id: I2438b0be90b7ce583b47dd27983c0c1a02cea5b9
2016-05-26res_pjsip: add "via_addr", "via_port", "call_id" to contactAlexei Gradinari
As res_pjsip_nat rewrites contact's address, only the last Via header can contain the source address of registered endpoint. Also Call-Id header may contain the source address of registered endpoint. Added "via_addr", "via_port", "call_id" to contact. Added new fields ViaAddress, CallID to AMI event ContactStatus. ASTERISK-26011 Change-Id: I36bcc0bf422b3e0623680152d80486aeafe4c576
2016-05-13res_pjsip: Endpoint IP Access ControlsAlexei Gradinari
With the old SIP module we can use IP access controls per peer. PJSIP module missing this feature. This patch added next configuration Endpoint options: "acl" - list of IP ACL section names in acl.conf "deny" - List of IP addresses to deny access from "permit" - List of IP addresses to permit access from "contact_acl" - List of Contact ACL section names in acl.conf "contact_deny" - List of Contact header addresses to deny "contact_permit" - List of Contact header addresses to permit This patch also better logging failed request: add custom message instead of "No matching endpoint found" add SIP method to logging ASTERISK-25900 Change-Id: I456dea3909d929d413864fb347d28578415ebf02
2016-05-11Merge "res_pjsip: improve realtime performance"Joshua Colp
2016-05-05res_pjsip: improve realtime performanceAlexei Gradinari
This patch modified pjsip_options to retrieve only permament contacts for aor if the qualify_frequency is > 0 and persisted contacts if the qualify_frequency is > 0. This patch also fixed a bug in res_sorcery_astdb. res_sorcery_astdb doesn't save object data retrived from astdb. ASTERISK-25826 Change-Id: I1831fa46c4578eae5a3e574ee3362fddf08a1f05
2016-05-05pjsip: Added "reg_server" to contacts (fixed alembic)Alexei Gradinari
ASTERISK-25931 Change-Id: Icc4321a88f5c93ff809da3f372eebbf69c6a8549
2016-05-03Merge "pjproject_bundled: Various fixes discovered during testing of OSes"zuul
2016-05-03pjproject_bundled: Various fixes discovered during testing of OSesGeorge Joseph
For all OSes: * Disabled third-party codecs in pjproject and added '--disable-speex-codec --disable-speex-aec --disable-gsm-codec' to the configure options since we don't use the pjsip codec capability. FreeBSD: * Added FreeBSD support to install_prereq. * Changed pjproject/configure.m4 to use $GNU_MAKE instead of hardcoding "make". * Added __progname and environ to asterisk.exports.in. * Reverted the use of ldconfig to create shared library symlinks to ln. * Only enable epoll in pjproject if `uname -s` is Linux. * Added a patch to pjproject to take the name of the 'make' command from an environment variable if supplied. This is needed for the python bindings. (merged by Teluu into pjproject trunk 5/3/2016) FreeBSD support isn't complete. Still some general issues regarding make/gmake having nothing to do with pjproject. With some handholding it DOES build successfully. CentOS: Added 'patch' and 'bzip2' to install_prereq PACKAGES_RH. CentOS 6/7 32/64 build and run the pjsip testsuite successfully. Ubuntu: No changes required. Ubuntu 15/16 32/64 build and run the pjsip testsuite successfully. Debian: No changes required. Debian 6/7/8 32/64 build and run the pjsip testsuite successfully. There will utimately be a follow-up patch to create an install_prereq for the testsuite as I've discovered a few missing requirements. ASTERISK-25968 #close Change-Id: I5756a07facfc63798115a5e73a8709382fe9259c
2016-05-02pjsip: Added "reg_server" to contacts.Alexei Gradinari
If the Asterisk system name is set in asterisk.conf, it will be stored into the "reg_server" field in the ps_contacts table to facilitate multi-server setups. ASTERISK-25931 Change-Id: Ia8f6bd2267809c78753b52bcf21835b9b59f4cb8
2016-04-27res_pjsip: Add ability to identify by Authorization usernameGeorge Joseph
A feature of chan_sip that service providers relied upon was the ability to identify by the Authorization username. This is most often used when customers have a PBX that needs to register rather than identify by IP address. From my own experiance, this is pretty common with small businesses who otherwise don't need a static IP. In this scenario, a register from the customer's PBX may succeed because From will usually contain the PBXs account id but an INVITE will contain the caller id. With nothing recognizable in From, the service provider's Asterisk can never match to an endpoint and the INVITE just stays unauthorized. The fixes: A new value "auth_username" has been added to endpoint/identify_by that will use the username and digest fields in the Authorization header instead of username and domain in the the From header to match an endpoint, or the To header to match an aor. This code as added to res_pjsip_endpoint_identifier_user rather than creating a new module. Although identify_by was always a comma-separated list, there was only 1 choice so order wasn't preserved. So to keep the order, a vector was added to the end of ast_sip_endpoint. This is only used by res_pjsip_registrar to find the aor. The res_pjsip_endpoint_identifier_* modules are called in globals/endpoint_identifier_order. Along the way, the logic in res_pjsip_registrar was corrected to match most-specific to least-specific as res_pjsip_endpoint_identifier_user does. The order is: username@domain username@domain_alias username Auth by username does present 1 problem however, the first INVITE won't have an Authorization header so the distributor, not finding a match on anything, sends a securty_alert. It still sends a 401 with a challenge so the next INVITE will have the Authorization header and presumably succeed. As a result though, that first security alert is actually a false alarm. To address this, a new feature has been added to pjsip_distributor that keeps track of unidentified requests and only sends the security alert if a configurable number of unidentified requests come from the same IP in a configurable amout of time. Those configuration options have been added to the global config object. This feature is only used when auth_username is enabled. Finally, default_realm was added to the globals object to replace the hard coded "asterisk" used when an endpoint is not yet identified. The testsuite tests all pass but new tests are forthcoming for this new feature. ASTERISK-25835 #close Reported-by: Ross Beer Change-Id: I30ba62d208e6f63439600916fcd1c08a365ed69d
2016-04-27res_pjsip: disable multi domain to improve realtime performaceAlexei Gradinari
This patch added new global pjsip option 'disable_multi_domain'. Disabling Multi Domain can improve Realtime performance by reducing number of database requests. ASTERISK-25930 #close Change-Id: I2e7160f3aae68475d52742107949a799aa2c7dc7
2016-04-07alembic: Remove batch operations (and sqlite support)George Joseph
Because SQLite doesn't support full ALTER capabilities, alembic scripts require batch operations. However, that capability wasn't available until 0.7.0 which some distributions haven't reached yet. Therefore, the batch operations introduced in commit 86d6e44cc (review 2319) have been reverted and SQLite is unsupported again, for now anyway. Tested the full upgrade and downgrade on MySQL/Mariadb and Postgresql. ASTERISK-25890 #close Reported-by: Harley Peters Change-Id: I82eba5456736320256f6775f5b0b40133f4d1c80
2016-04-04Merge "install_prereq: Fix check_installed_debs remove subversion"Joshua Colp