summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2017-12-31ice: Increase foundation buffer sizeSean Bright
Per RFC 5245, the foundation specified with an ICE candidate can be up to 32 characters but we are only allowing for 31. ASTERISK-27498 #close Reported by: Michele Prà Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
2017-12-22AST-2017-014: res_pjsip - Missing contact header can cause crashKevin Harwell
Those SIP messages that create dialogs require a contact header to be present. If the contact header was missing from the message it could cause Asterisk to crash. This patch checks to make sure SIP messages that create a dialog contain the contact header. If the message does not and it is required Asterisk now returns a "400 Missing Contact header" response. Also added NULL checks when retrieving the contact header that were missing as a "just in case". ASTERISK-27480 #close Change-Id: I1810db87683fc637a9e3e1384a746037fec20afe
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-20Fix Common Typo's.Corey Farrell
Fix instances of: * Retreive * Recieve * other then * different then * Repeated words ("the the", "an an", "and and", etc). * othterwise, teh ASTERISK-24198 #close Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-20Merge "res_rtp_asterisk: Avoid close the rtp/rtcp fd twice." into 13Jenkins2
2017-12-19res_rtp_asterisk: Avoid close the rtp/rtcp fd twice.Aaron An
When RTCP-MUX enabled. rtp->s is the same as rtcp->s, check this before close the file descriptor. Close the FD twice will hangs the asterisk under heavy load. ASTERISK-27299 #close Reported-by: Aaron An Tested-by: AaronAn Change-Id: I870a072d73fd207463ac116ef97100addbc0820a
2017-12-19Remove constant conditionals (dead-code).Corey Farrell
Some variables are set and never changed, making them constant. This means that code in the 'false' block of the conditional is unreachable. In chan_skinny and res_config_ldap I used preprocessor directive `#if 0` as I'm unsure if the unreachable code could be enabled in the future. Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059
2017-12-18Merge "aco: Minimize use of regex." into 13Jenkins2
2017-12-15Merge "res_smdi: Fix shutdown ref." into 13Jenkins2
2017-12-15Merge "res_rtp_asterisk.c: Disable packet flood detection for video ↵Jenkins2
streams." into 13
2017-12-15Merge "res_hep: hepv3_is_loaded() should check if we are enabled" into 13Jenkins2
2017-12-15Merge "res_clialiases: Fix completion pass-through." into 13Jenkins2
2017-12-15Merge "coverity: Fix warnings in res_smdi" into 13Jenkins2
2017-12-15aco: Minimize use of regex.Corey Farrell
Remove nearly all use of regex from ACO users. Still remaining: * app_confbridge has a legitamate use of option name regex. * ast_sorcery_object_fields_register is implemented with regex, all callers use simple prefix based regex. I haven't decided the best way to fix this in both 13/15 and master. Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
2017-12-15res_smdi: Fix shutdown ref.Corey Farrell
When adding shutdown refs for OPTIONAL_API components I accidentally added it to the unload_module function in res_smdi. Move it to load_module. Change-Id: I2b9da38fbc11ef78ea23dbb2df92b684be7f647c
2017-12-14res_hep: hepv3_is_loaded() should check if we are enabledSean Bright
res_hep_pjsip.so and res_hep_rtcp.so will still load and do a lot of unnecessary work even if 'enabled' is set to 'no' in hep.conf. Change-Id: I3eddfeea09c6b5bc7c641952ee0ae487fd09b64b
2017-12-14res_clialiases: Fix completion pass-through.Corey Farrell
Never ignore contents of line when generating completion options. Change-Id: I74389efdfea154019d3b56a9f381610614c044c8
2017-12-14res_rtp_asterisk.c: Disable packet flood detection for video streams.Richard Mudgett
We should not do flood detection on video RTP streams. Video RTP streams are very bursty by nature. They send out a burst of packets to update the video frame then wait for the next video frame update. Really only audio streams can be checked for flooding. The others are either bursty or don't have a set rate. * Added code to selectively disable packet flood detection for video RTP streams. ASTERISK-27440 Change-Id: I78031491a6e75c2d4b1e9c2462dc498fe9880a70
2017-12-14res_musiconhold: Start playlist after initial announcementSean Bright
Reset the samples counter to zero when we are done playing an announcement so that we don't skip into the middle of the first file in the playlist. Also add the selected annoucement to the output of 'moh show classes.' ASTERISK-24329 #close Reported by: Thomas Frederiksen Change-Id: I2a5f986a31279c981592f49391409ebf38d6f6d0
2017-12-14coverity: Fix warnings in res_smdiSean Bright
ASTERISK-19657 #close Reported by: Matt Jordan III, Esq. Change-Id: I59a5e6ef3e7d9e848bec1f4b40cb73321bc7956a
2017-12-13Merge "res_pjsip: Assign support levels to a few modules" into 13Jenkins2
2017-12-13Merge "pjsip_options: contacts sometimes not being updated on reload" into 13Jenkins2
2017-12-13Merge "pjsip_options: dynamic contact's fields not updated on reload" into 13Jenkins2
2017-12-13Merge "chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)" into 13Jenkins2
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-12res_pjsip: Assign support levels to a few modulesSean Bright
Change-Id: I51f6945c4023cb93fc7b87be5ab4c50e9e6ee27d
2017-12-11Merge "astdb: Improve prefix searches in astdb" into 13Jenkins2
2017-12-11Merge "res_stasis and res_speech: Fix load order." into 13Joshua Colp
2017-12-11Merge "utils: Add convenience function for setting fd flags" into 13Jenkins2
2017-12-11Merge "pjsip: Improve CLI completion performance" into 13Jenkins2
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-07pjsip_options: contacts sometimes not being updated on reloadKevin Harwell
For both dynamic and static contacts it was possible that potential AOR changes were not being applied to all contacts. This was because the qualify and schedule code was only retrieving AOR's, and contacts with frequencies greater than zero. For instance the following could happen: and AOR/contact has a frequency of 5, it then gets set to 0, and then a reload occurs. All scheduled OPTIONS are stopped, a list of AOR's is retrieved with frequency > 0, but none are selected since in this scenario all are 0. The contact for the one previously set to 5 though does not get updated, so it's status remains "AVAILABLE". This patch makes it so all contacts (static and dynamic) are selected, and appropriately updated if need be. ASTERISK-27467 #close Change-Id: I7a920170f89c683af9505d4723a44fc6841decdb
2017-12-07pjsip_options: dynamic contact's fields not updated on reloadKevin Harwell
Dynamic contacts were not being properly updated on reload. As a matter of fact any changes to the AOR that a dynamic contact was associated with were not being applied. On reload, this patch makes it so for each dynamic contact, the associated AOR is now retrieved and the AOR's fields are applied to the contact. ASTERISK-27467 Change-Id: I8e3165dc6a745218c1c9db837f77fafa0516985d
2017-12-05Merge "res_rtp_asterisk.c: Increase strictrtp learning timeout time." into 13Joshua Colp
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 13Joshua Colp
2017-11-27Merge "res_rtp_asterisk.c: Fix rtp source address learning for broken ↵Jenkins2
clients" into 13
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 13Joshua Colp
2017-11-23Merge "res_mwi_external_ami: Remove incorrect load priority." into 13Joshua Colp
2017-11-23Merge "Loader: Remove unneeded load_pri declarations." into 13Joshua 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