summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2017-12-13Merge "chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)" into 15Jenkins2
2017-12-13AST-2017-012: Place single RTCP report block at beginning of report.Joshua Colp
When the RTCP code was transitioned over to Stasis a code change was made to keep track of how many reports are present. This count controlled where report blocks were placed in the RTCP report. If a compound RTCP packet was received this logic would incorrectly place a report block in the wrong location resulting in a write to an invalid location. This change removes this counting logic and always places the report block at the first position. If in the future multiple reports are supported the logic can be extended but for now keeping a count serves no purpose. ASTERISK-27382 ASTERISK-27429 Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116
2017-12-12chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)Richard Mudgett
This patch does three things associated with the initial incoming INVITE request URI. 1) Add access to the full initial incoming INVITE request URI. 2) We were not setting DNID on incoming PJSIP channels. The DNID is the user portion of the initial incoming INVITE Request-URI. The value is accessed by reading CALLERID(dnid). 3) Fix CHANNEL(pjsip,target_uri) documentation. * The initial incoming INVITE request URI is now available using CHANNEL(pjsip,request_uri). * Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the initial incoming INVITE request URI user portion. * CHANNEL(pjsip,target_uri) now correctly documents that the target URI is the contact URI. * Refactored print_escaped_uri() out of channel_read_pjsip() to handle pjsip_uri_print() error condition when the buffer is too small. ASTERISK-27478 Change-Id: I512e60d1f162395c946451becb37af3333337b33
2017-12-12res_pjsip: Add TLSv1.1 and TLSv1.2 supportSean Bright
Support for these protocols was added in the same commit as the 'proto' field, so we can safely use the same ./configure check. For reference: https://trac.pjsip.org/repos/changeset/4968 Change-Id: Icf4975d785d6bfb8f30ac7ffa695a0adf9382dac
2017-12-11Merge "astdb: Improve prefix searches in astdb" into 15Jenkins2
2017-12-11Merge "res_stasis and res_speech: Fix load order." into 15Jenkins2
2017-12-11Merge "utils: Add convenience function for setting fd flags" into 15Jenkins2
2017-12-11Merge "pjsip: Improve CLI completion performance" into 15Jenkins2
2017-12-10pjsip: Improve CLI completion performanceSean Bright
Use the new ast_cli_completion_add() function to improve completion performance for commands like 'pjsip show endpoint.' Change-Id: I76d802294d2ac1766110dc75f7d117c8541ce348
2017-12-10astdb: Improve prefix searches in astdbSean Bright
Using the LIKE operator requires a full table scan of 'astdb', whereas a comparison operation is able to use the primary key index. This patch adds a new function to the AstDB API for quick prefix matches and updates res_sorcery_astdb to utilize it. This showed substantial performance improvement in my test environment. Related to ASTERISK~26806, but does not completely resolve it. Change-Id: I7d37f9ba2aea139dabf2ca72d31fbe34bd9b2fa1
2017-12-08pjsip_configuration: Add correct file headerSean Bright
Change-Id: I25348c386a222bb704aff07f54375108a6402906
2017-12-08utils: Add convenience function for setting fd flagsSean Bright
There are many places in the code base where we ignore the return value of fcntl() when getting/setting file descriptior flags. This patch introduces a convenience function that allows setting or clearing file descriptor flags and will also log an error on failure for later analysis. Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
2017-12-07res_stasis and res_speech: Fix load order.Corey Farrell
res_stasis was missing AST_MODFLAG_LOAD_ORDER. Set res_stasis and res_speech to start at (AST_MODPRI_APP_DEPEND - 1) so they are ready for dependent modules. Change-Id: I27f4f3810a95b6be8a5bfbf62be2ace6bfab6ff3
2017-12-05Merge "res_rtp_asterisk.c: Increase strictrtp learning timeout time." into 15Jenkins2
2017-12-04security-events: Fix SuccessfulAuth using_password declaration.Richard Mudgett
The SuccessfulAuth using_password field was declared as a pointer to a uint32_t when the field was later read as a uint32_t value. This resulted in unnecessary casts and a non-portable field value reinterpret in main/security_events.c:add_json_object(). i.e., It would work on a 32 bit architecture but not on a 64 bit big endian architecture. Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935
2017-12-04res_rtp_asterisk.c: Increase strictrtp learning timeout time.Richard Mudgett
More complicated direct media reinvite negotiations can result in longer delays before direct media flows. The strictrtp learning timeout time was too short. One log showed that the first RTP packet came in just after three seconds. * Increase the strictrtp learning timeout time from 1.5 to 5 seconds. ASTERISK-27453 Change-Id: Ic5e711164cbb91b4d1c1e40c83697755640f138c
2017-12-01res_http_post: Not all versions of gmime have GMIME_MAJOR_VERSION.Joshua Colp
This change makes the presence of the GMIME_MAJOR_VERSION definition optional, as not all versions of gmime actually define it. ASTERISK-27454 Change-Id: I01d99590045971ed6787899147170a5954077238
2017-11-27Merge "res_ari: Fix inverted test giving wrong error message." into 15Joshua Colp
2017-11-27Merge "res_rtp_asterisk.c: Fix rtp source address learning for broken ↵Joshua Colp
clients" into 15
2017-11-26res_ari: Fix inverted test giving wrong error message.Richard Mudgett
The patch for ASTERISK_24560 inverted a test checking if the bridge name is being updated to a different name. * Fix the test to return "Changing bridge name is not implemented" when someone attempts to change the bridge name. ASTERISK-27445 Change-Id: I4b70bf08b0e02e016108b077ff75b345dec12fc9
2017-11-23Merge "res_parking: Make load_pri explicit." into 15Joshua Colp
2017-11-23Merge "res_mwi_external_ami: Remove incorrect load priority." into 15Joshua Colp
2017-11-23Merge "Loader: Remove unneeded load_pri declarations." into 15Joshua Colp
2017-11-22res_rtp_asterisk: ICE server-reflexive candidates (srflx) with Dual-Stack.Alexander Traud
Previously, Asterisk sent srflx only when configured exclusively for IPv4. Now, srflx is gathered and sent via SDP, even when Asterisk is enabled for Dual Stack (IPv4+IPv6) and an IPv4 interface is available/used. ASTERISK-27437 Change-Id: Ie07d8e2bfa7b6fe06fcdc73d390a7a9a4d8c0bc1
2017-11-21res_parking: Make load_pri explicit.Corey Farrell
res_parking has an implicit load_pri of 0 meaining it's one of the very first modules loaded after modules with global symbols. Set it explicitly in the AST_MODULE_INFO block. Change-Id: I297b6fb3ff6993ec004e667b22a74f5925906259
2017-11-20Merge "res_pjsip: Use sorcery prefix operation for contact lookup" into 15Joshua Colp
2017-11-20res_mwi_external_ami: Remove incorrect load priority.Corey Farrell
res_mwi_external_ami specified AST_MODFLAG_LOAD_ORDER but didn't set load_pri, resulting in an actual load priority of 0. This module only provides AMI actions so it has no reason to load early. Change-Id: I82987fcf10d3ea42716b2f9df915b16687fd5839
2017-11-20Loader: Remove unneeded load_pri declarations.Corey Farrell
Instead of specifying AST_MODFLAG_LOAD_ORDER with load_pri AST_MODPRI_DEFAULT just use AST_MODFLAG_DEFAULT. Change-Id: I0123258eafce324249433a69df15a85cc16e509f
2017-11-20Merge "res_fax: Remove checks for unsigned values being >= 0." into 15Joshua Colp
2017-11-20Merge "res_snmp: Declare RONLY if net-snmp headers do not." into 15Joshua Colp
2017-11-20Merge "res_pjsip: Fix warning by deferring implicit type cast." into 15Joshua Colp
2017-11-19res_pjsip: Fix warning by deferring implicit type cast.Corey Farrell
Mac doesn't like the comparison of -1 to an enum, so store the result of ast_sip_str_to_dtmf to an int so we can check for the negative return value. ast_sip_str_to_dtmf returns an int so this is only delaying the implicit type cast. Change-Id: I0c262c1719ee951aae1f437d733a301cf5f8ad29
2017-11-18res_snmp: Declare RONLY if net-snmp headers do not.Corey Farrell
Some net-snmp builds do not provide the RONLY declare, only NETSNMP_OLDAPI_RONLY. Map RONLY to NETSNMP_OLDAPI_RONLY to get around this error. Change-Id: Ida5c7ad9406515825485c4d3b4a34fd6ad0da577
2017-11-18res_fax: Remove checks for unsigned values being >= 0.Corey Farrell
It's impossible for gwtimeout or fdtimeout to be less than 0 because they are unsigned int's. Remove checks and unreachable branches. Change-Id: Ib2286960621e6ee245e40013c84986143302bc78
2017-11-18res_rtp_asterisk.c: Fix rtp source address learning for broken clientsPirmin Walthert
Some clients do not send rtp packets every ptime ms. This can lead to situations in which the rtp source learning algorithm will never learn the address of the client. This has been discovered on a Mac mini with a pjsip based softphone after updating to Sierra: as soon as USB headsets are involved, the softphone will send the second packet 30ms after the first, the third 30ms after the second and the fourth 1ms after the third. So in the old implmentation the rtp source learning algorithm was repeatedly reset on the fourth packet. The patch changes the algorithm in a way that doesn't take the arrival time between two consecutive packets into account but the time between the first and the last packet of a learning sequence. The patch also fixes a second problem: when a user was using a wrong value for the probation setting there was a LOG_WARNING output stating that the value had been set to the default value instead. However the code for setting the value back to defaults was missing. ASTERISK-27421 #close Change-Id: If778fe07678a6fd2041eaca7cd78267d0ef4fc6c
2017-11-17res_pjsip: Use reasonable buffer lengths for endpoint identificationSean Bright
Domains themselves can be up to 255 characters long (per RFC 1035), so our current buffer sizes are wholly inadequate for many use cases. Change-Id: If3f30a68307f1365a1fe06bc4b854c62842c9292
2017-11-16res_pjsip_transport_websocket: Give transport a meaningful descriptionSean Bright
We were not \0 terminating this string, so any attempt to print it would in the best case show an empty string and in the worst case potentially crash. Change-Id: I63d96ef8f7516ac02a0f91e22dfa8acdc615042c
2017-11-16res_pjsip: Use sorcery prefix operation for contact lookupSean Bright
This improves performance for registrations assuming that res_config_astdb is not in use. Change-Id: I86f37aa9ef07a4fe63448cb881bbadd996834bb1
2017-11-16Merge "pjsip / hep: Provide correct local address for Websockets." into 15Jenkins2
2017-11-14pjsip / hep: Provide correct local address for Websockets.Joshua Colp
Previously for PJSIP the local address of WebSocket connections was set to the remote address. For logging purposes this is not particularly useful. The WebSocket API has been extended to allow the local address to be queried and this is used in PJSIP to set the local address to the correct value. The PJSIP HEP support has also been tweaked so that reliable transports always use the local address on the transport and do not try to (wrongly) guess. As they are connection based it is impossible for the source to be anything else. ASTERISK-26758 ASTERISK-27363 Change-Id: Icd305fd038ad755e2682ab2786e381f6bf29e8ca
2017-11-13sorcery: Add ast_sorcery_retrieve_by_prefix()Sean Bright
Some consumers of the sorcery API use ast_sorcery_retrieve_by_regex only so that they can anchor the potential match as a prefix and not because they truly need regular expressions. Rather than using regular expressions for simple prefix lookups, add a new operation - ast_sorcery_retrieve_by_prefix - that does them. Patches against 13 and 15 have a compatibility layer needed to maintain ABI that is not needed in master. Change-Id: I56f4e20ba1154bd52281f995c27a429a854f6a79
2017-11-13Merge "res_pjsip_pubsub: Ensure remote URI contains URI only." into 15Jenkins2
2017-11-09Merge "res_pjsip_registrar.c: Fix AOR and pjproject group deadlock." into 15Kevin Harwell
2017-11-09Merge "res_pjsip_pubsub: Fix multiple leaks on failure to append vectors." ↵Joshua Colp
into 15
2017-11-09Merge "res_pjsip_history: Fix multiple leaks on vector append failure." into 15Joshua Colp
2017-11-09Merge "res_pjsip_session: Fix multiple leaks." into 15Joshua Colp
2017-11-09Merge "res_pjsip_session: Check for errors from ↵Joshua Colp
ast_stream_topology_set_stream." into 15
2017-11-08Merge "res_pjsip_t38: Better error checking for t38_create_media_state." into 15Joshua Colp
2017-11-08Merge "AST-2017-011 - res_pjsip_session: session leak when a call is ↵George Joseph
rejected" into 15
2017-11-08Merge "res_pjproject.c: Fix ast_strdup() alloc failure." into 15Jenkins2