summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2014-12-17Fix printf problems with high ascii characters after r413586 (1.8).Walter Doekes
In r413586 (1.8) various casts were added to silence gcc 4.10 warnings. Those fixes included things like: -out += sprintf(out, "%%%02X", (unsigned char) *ptr); +out += sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii characters, but for the high range that yields e.g. FFFFFFC3 when C3 is expected. This changeset: - fixes those casts to use the 'hh' unsigned char modifier instead - consistently uses %02x instead of %2.2x (or other non-standard usage) - adds a few 'h' modifiers in various places - fixes a 'replcaes' typo - dev/urandon typo (in 13+ patch) Review: https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close Reported by: Stefan27 (on IRC) ........ Merged revisions 429673 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429674 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429675 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-16chan_sip: Allow T.38 switch-over when SRTP is in use.Joshua Colp
Previously when SRTP was enabled on a channel it was not possible to switch to T.38 as no crypto attributes would be present. This change makes it so it is now possible. If a T.38 re-invite comes in SRTP is terminated since in practice you can't encrypt a UDPTL stream. Now... if we were doing T.38 over RTP (which does exist) then we'd have a chance but almost nobody does that so here we are. ASTERISK-24449 #close Reported by: Andreas Steinmetz patches: udptl-ignore-srtp-v2.patch submitted by Andreas Steinmetz (license 6523) ........ Merged revisions 429632 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429633 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12chan_pjsip: Race between channel answer and bridge setup when using direct mediaKevin Harwell
When direct media is enabled and a pjsip channel is answered a race would occur between the handling of the answer and bridge setup. Sometimes the media negotiation would take place after the native bridge was setup. This resulted in a NULL media address, which in turn resulted in Asterisk using its address as the remote media address when sending a reinvite. This patch makes the chan_pjsip answer handler synchronous thus alleviating the race condition (the bridge won't start setting things up until after it returns). ASTERISK-24563 #close Reported by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4257/ ........ Merged revisions 429477 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12res_pjsip_session: Delay sending BYE if a re-INVITE transaction is in progress.Joshua Colp
Given the scenario where a PJSIP channel is in a native RTP bridge with direct media and the channel is then hung up the code will currently re-INVITE the channel back to Asterisk and send a BYE at the same time. Many SIP implementations dislike this greatly. This change makes it so that if a re-INVITE transaction is in progress the BYE is queued to occur after the completion of the transaction (be it through normal means or a timeout). Review: https://reviewboard.asterisk.org/r/4248/ ........ Merged revisions 429409 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-10res_http_websocket: Fix crash due to double freeing memory when receiving a ↵Joshua Colp
payload length of zero. Frames with a payload length of 0 were incorrectly handled in res_http_websocket. Provided a frame with a payload had been received prior it was possible for a double free to occur. The realloc operation would succeed (thus freeing the payload) but be treated as an error. When the session was then torn down the payload would be freed again causing a crash. The read function now takes this into account. This change also fixes assumptions made by users of res_http_websocket. There is no guarantee that a frame received from it will be NULL terminated. ASTERISK-24472 #close Reported by: Badalian Vyacheslav Review: https://reviewboard.asterisk.org/r/4220/ Review: https://reviewboard.asterisk.org/r/4219/ ........ Merged revisions 429270 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429272 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429273 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09Direct Media calls within private network sometimes get one way audioKevin Harwell
When endpoints with direct_media enabled, behind a firewall (Asterisk on a separate network) and were bridged sometimes Asterisk would send the ip address of the firewall in the sdp to one of the phones in the reinvite resulting in one way audio. When sending the reinvite Asterisk will retrieve the media address from the associated rtp instance, but if frames were being read this can be overwritten with another address (in this case the firewall's). This patch ensures that Asterisk uses the original device address when using direct media. ASTERISK-24563 Reported by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4216/ ........ Merged revisions 429195 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429196 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01main/stasis: Allow subscriptions to use a threadpool for message deliveryMatthew Jordan
Prior to this patch, all Stasis subscriptions would receive a dedicated thread for servicing published messages. In contrast, prior to r400178 (see review https://reviewboard.asterisk.org/r/2881/), the subscriptions shared a thread pool. It was discovered during some initial work on Stasis that, for a low subscription count with high message throughput, the threadpool was not as performant as simply having a dedicated thread per subscriber. For situations where a subscriber receives a substantial number of messages and is always present, the model of having a dedicated thread per subscriber makes sense. While we still have plenty of subscriptions that would follow this model, e.g., AMI, CDRs, CEL, etc., there are plenty that also fall into the following two categories: * Large number of subscriptions, specifically those tied to endpoints/peers. * Low number of messages. Some subscriptions exist specifically to coordinate a single message - the subscription is created, a message is published, the delivery is synchronized, and the subscription is destroyed. In both of the latter two cases, creating a dedicated thread is wasteful (and in the case of a large number of peers/endpoints, harmful). In those cases, having shared delivery threads is far more performant. This patch adds the ability of a subscriber to Stasis to choose whether or not their messages are dispatched on a dedicated thread or on a threadpool. The threadpool is configurable through stasis.conf. Review: https://reviewboard.asterisk.org/r/4193 ASTERISK-24533 #close Reported by: xrobau Tested by: xrobau ........ Merged revisions 428681 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428687 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20AST-2014-015: Fix race condition in chan_pjsip when sending responses after ↵Joshua Colp
a CANCEL has been received. Due to the serialized architecture of chan_pjsip there exists a race condition where a CANCEL may be received and processed before responses (such as 180 Ringing, 183 Session Progress, and 200 OK) are sent. Since the session is in an unexpected state PJSIP will assert when this is attempted. This change makes it so that these responses are not sent on disconnected sessions. ASTERISK-24471 #close Reported by: yaron nahum ........ Merged revisions 428301 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428302 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19ast_str: Fix improper member access to struct ast_str members.Richard Mudgett
Accessing members of struct ast_str outside of the string manipulation API routines is invalid since struct ast_str is supposed to be treated as opaque. Review: https://reviewboard.asterisk.org/r/4194/ ........ Merged revisions 428244 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428245 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428246 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17chan_sip: Fix theoretical leak of p->refer.Corey Farrell
If transmit_refer is called when p->refer is already allocated, it leaks the previous allocation. Updated code to always free previous allocation during a new allocation. Also instead of checking if we have a previous allocation, always create a clean record. ASTERISK-15242 #close Reported by: David Woolley Review: https://reviewboard.asterisk.org/r/4160/ ........ Merged revisions 428117 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428118 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428119 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-16chan_pjsip: Remove AOR check when dialing and one is specified.Joshua Colp
The AOR value may contain the name of an AOR or a full SIP URI. Checking if the AOR exists can't be done as a result of this. ........ Merged revisions 428051 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428052 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-16chan_sip: Fix bug where DTLS configuration from general would copy dtlsenable.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15chan_pjsip: Add additional log message when an AOR is specified when dialing ↵Joshua Colp
and it does not exist. ASTERISK-24499 #close Reported by: Rusty Newton ........ Merged revisions 428007 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428008 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15chan_motif / chan_pjsip: Fix incorrect "No such module" messages when reloading.Joshua Colp
For chan_motif the direct return value of the underlying config options framework was passed back. This can relay various states which the module loader would not interpet as success. It has been changed so only on errors will it report back an error. For chan_pjsip the code implemented a dummy reload function which always returned an error. This has been removed as all configuration is held within res_pjsip instead. ASTERISK-23651 #close Reported by: Rusty Newton ........ Merged revisions 427981 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427982 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-15chan_sip: Add support for setting DTLS configuration in the general section.Joshua Colp
Configuration of DTLS in the general section will be applied to any users or peers. If configuration exists at their level it overrides the general section values. ASTERISK-24128 #close Reported by: Michael K. patches: dtls_default_settings.patch submitted by Michael K. (license 6621) Review: https://reviewboard.asterisk.org/r/3867/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-09channels/chan_mgcp: Fix regression which causes gateways to be skippedMatthew Jordan
In r227276, a while loop was turned into a for loop. Unfortunately, a portion of the while loop was left in the code such that, when a static gateway is encountered in the list of MGCP gateways, the next gateway would be skipped. At best, we would simply flip past a gateway; at worst, this could lead to a crash. ASTERISK-24500 #close Reported by: Xavier Hienne patches: chan_mgcp.patch uploaded by Xavier Hienne (License 6657) ........ Merged revisions 427613 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 427614 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427615 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-08chan_console: Fix reference leaks to pvt.Corey Farrell
Fix a bunch of calls to get_active_pvt where the reference is never released. ASTERISK-24504 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4152/ ........ Merged revisions 427554 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 427555 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427557 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-03chan_pjsip: Add support for passing hold and unhold requests through.Joshua Colp
This change adds an option, moh_passthrough, that when enabled will pass hold and unhold requests through using a SIP re-invite. When placing on hold a re-invite with sendonly will be sent and when taking off hold a re-invite with sendrecv will be sent. This allows remote servers to handle the musiconhold instead of the local Asterisk instance being responsible. Review: https://reviewboard.asterisk.org/r/4103/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-31channels/sip/reqresp_parser: Fix unit tests for r426594Matthew Jordan
When r426594 was made, it did not take into account a unit test that verified that the function properly populated the unsupported buffer. The function would previously memset the buffer if it detected it had any contents; since this function can now be called iteratively on successive headers, the unit tests would now fail. This patch updates the unit tests to reset the buffer themselves between successive calls, and updates the documentation of the function to note that this is now required. ........ Merged revisions 426858 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 426860 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 426863 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 426865 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-30Add additional checks for NULL pointers to fix several crashes reported.Igor Goncharovskiy
ASTERISK-24304 #close Reported by: dhanapathy sathya ........ Merged revisions 426666 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 426667 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 426668 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-30channels/chan_sip: Add improved support for 4xx error codesMatthew Jordan
This patch adds support for 414, 493, 479, and a stray 400 response in REGISTER response handling. This helps interoperability in a number of scenarios. Review: https://reviewboard.asterisk.org/r/3437 patches: rb3437.patch uploaded by oej (License 5267) ........ Merged revisions 426599 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 426600 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 426601 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 426602 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-30channels/chan_sip: Support mutltiple Supported and Required headersMatthew Jordan
A SIP request may contain multiple Supported: and Required: headers. Currently, chan_sip only parses the first Supported/Required header it finds. This patch adds support for multiple Supported/Required headers for INVITE requests. Review: https://reviewboard.asterisk.org/r/2478 ASTERISK-21721 #close Reported by: Olle Johansson patches: rb2478.patch uploaded by oej (License 5267) ........ Merged revisions 426594 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 426595 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 426596 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 426597 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-29Fix building chan_phone on big endian systemsTzafrir Cohen
A left over from the formats conversion (Corey Farrell). ASTERISK-24458 #close Review: https://reviewboard.asterisk.org/r/4117/ ........ Merged revisions 426570 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-17channels/chan_sip: Respect outboundproxy setting when sending qualify requestsMatthew Jordan
The outboundproxy setting is currently ignored when sending OPTIONS requests as a result of the qualify setting. This means that if an Asterisk server is unable to send the packet directly to a peer, it is unable to qualify any non-inbound registered peer (e.g. a peer SIP Trunk). This patch grabs the outboundproxy information for a peer when a qualify attempt is being constructed and, if it finds the information, uses it when sending the OPTIONS request. Review: https://reviewboard.asterisk.org/r/3948 ASTERISK-24063 #close Reported by: Damian Ivereigh patches: outboundproxy-dai.patch uploaded by Damian Ivereigh (License 6632) ........ Merged revisions 425818 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 425819 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425820 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425821 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-16PJSIP: Enforce module load dependenciesKinsey Moore
This enforces that res_pjsip, res_pjsip_session, and res_pjsip_pubsub have loaded properly before attempting to load any modules that depend on them since the module loader system is not currently capable of resolving module dependencies on its own. ASTERISK-24312 #close Reported by: Dafi Ni Review: https://reviewboard.asterisk.org/r/4062/ ........ Merged revisions 425690 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425691 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-16Fix loss of voice after second call drops (on a second line) in case using ↵Igor Goncharovskiy
multiple lines on unistim phones. There is regression was introduced in r391379. Reported by: Rustam Khankishyiev (closes issue ASTERISK-23846) ........ Merged revisions 425667 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425668 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425669 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-15chan_motif: Cleanup jingle_tech.capabilities only once.Richard Mudgett
........ Merged revisions 425627 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-12chan_sip: Fix so asterisk won't send reINVITE after a BYE.Walter Doekes
After a reINVITE glare situation, Asterisk would re-send the reINVITE even though the call had been hung up in the mean time. This patch unschedules the reinvite when handling the BYE. ASTERISK-22791 #close Reported by: Paolo Compagnini Tested by: Paolo Compagnini Review: https://reviewboard.asterisk.org/r/4056/ (testcase is in review r4055) ........ Merged revisions 425296 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 425297 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425298 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425299 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10chan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.Walter Doekes
If a device re-INVITEs at the same time as the dialog is hung up, and if then the ACK to the re-INVITE never reaches Asterisk, chan_sip would fail to destroy the dialog after a while. This resulted in (most prominently) file handle leaks. (Patch reindented by me.) ASTERISK-20784 #close ASTERISK-15879 #close Reported by: Torrey Searle, Nitesh Bansal Patches: reinvite_ack_timeout.patch uploaded by Torrey Searle (License #5334) patch_asterisk_20784.txt uploaded by Nitesh Bansal (License #6418) Reviewboard: https://reviewboard.asterisk.org/r/4052/ (testcase can be found at r4051) ........ Merged revisions 425068 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 425069 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425070 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 425071 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06pjsip/dialplan_functions: Handle PJSIP_MEDIA_OFFER called on non-PJSIP channelsMatthew Jordan
Calling PJSIP_MEDIA_OFFER on a non-PJSIP channel is hazardous to your health. It will treat the channels as a PJSIP channel, eventually hitting an ao2 error, FRACKing on assertion error, and quite likely crashing. This patch adds checks to the read/write callbacks that ensure that the channel technology is of type 'PJSIP' before attempting to operate on the channel. #SIPit31 ASTERISK-24382 #close Reported by: Matt Jordan ........ Merged revisions 424621 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424622 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-05chan_motif: Correct last commit to use ao2_cleanup to free format capCorey Farrell
This fix applies to 13 and trunk. ASTERISK-24384 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4043/ ........ Merged revisions 424554 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-05chan_motif: Release format capabilities and config on module load errorCorey Farrell
ASTERISK-24384 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4043/ ........ Merged revisions 424550 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424551 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424552 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03chan_pjsip: Fix deadlock when masquerading PJSIP channels.Richard Mudgett
Performing a directed call pickup resulted in a deadlock when PJSIP channels were involved. A masquerade needs to hold onto the channel locks while it swaps channel information between the two channels involved in the masquerade. With PJSIP channels, the fixup routine needed to push a fixup task onto the PJSIP channel's serializer. Unfortunately, if the serializer was also processing a task that needed to lock the channel, you get deadlock. * Added a new control frame that is used to notify the channels that a masquerade is about to start and when it has completed. * Added the ability to query taskprocessors if the current thread is the taskprocessor thread. * Added the ability to suspend/unsuspend the PJSIP serializer thread so a masquerade could fixup the PJSIP channel without using the serializer. ASTERISK-24356 #close Reported by: rmudgett Review: https://reviewboard.asterisk.org/r/4034/ ........ Merged revisions 424471 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424472 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02chan_pjsip: Fix an assertion for channels that lack formats on creationJonathan Rose
ASTERISK-24222 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/4017/ ........ Merged revisions 424333 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01chan_sip: Simplify some unref code by removing unlink_peer_from_tables.Walter Doekes
ASTERISK-22945 #related Reported by: ibercom Patches: asterisk11-chan_sip-simplifies.patch uploaded by ibercom (License #6599) ........ Merged revisions 424181 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 424182 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424183 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424184 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01chan_sip: Remove excess ref of realtime peer before sip_poke_peer.Walter Doekes
The peer is referenced at the end of sip_poke_peer, it should not get an extra ref before the call to sip_poke_peer. This fixes a memory leak. ASTERISK-22945 #close Reported by: ibercom Tested by: Yuriy Gorlichenko Patches: asterisk11.patch uploaded by ibercom (License #6599) Review: https://reviewboard.asterisk.org/r/4031/ ........ Merged revisions 424176 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 424177 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424178 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424179 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-27res_pjsip_session: Add additional checks for delaying session refreshes.Joshua Colp
There are certain situations which no checks existed for which need to prevent session refreshes. This includes sending a session refresh with SDP before SDP negotiation has completed and sending a session refresh before the dialog itself has been established. Checks for these have been added. Additionally COLP related UPDATEs were including SDP when it is not needed. Review: https://reviewboard.asterisk.org/r/4008/ ........ Merged revisions 424056 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424057 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-26core: Don't allow free to mean ast_free (and malloc, etc..).Walter Doekes
This gets rid of most old libc free/malloc/realloc and replaces them with ast_free and friends. When compiling with MALLOC_DEBUG you'll notice it when you're mistakenly using one of the libc variants. For the legacy cases you can define WRAP_LIBC_MALLOC before including asterisk.h. Even better would be if the errors were also enabled when compiling without MALLOC_DEBUG, but that's a slightly more invasive header file change. Those compiling addons/format_mp3 will need to rerun ./contrib/scripts/get_mp3_source.sh. ASTERISK-24348 #related Review: https://reviewboard.asterisk.org/r/4015/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-24chan_sip: Unref outbound proxy structure on dialog/pvt destruction.Walter Doekes
Make sure outbound proxy refs are always unreffed on dialog destruction. Review: https://reviewboard.asterisk.org/r/4016/ ........ Merged revisions 423800 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423801 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423802 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 423803 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-22chan_sip: On INVITE retransmission, don't add an extra 503 response.Walter Doekes
INVITE arrives to asterisk, asterisk responds Busy(). If the INVITE is retransmitted, asterisk would generate a 503 in addition to the 486. Thanks Torrey Searle for providing a working regression test. ASTERISK-24335 #close Review: https://reviewboard.asterisk.org/r/4003/ Patches: retrans_486_invite.patch uploaded by Torrey Searle (License #5334) ........ Merged revisions 423720 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423721 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423722 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 423723 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19res_pjsip_sdp_rtp.c: Fix native formats containing formats that were not ↵Richard Mudgett
negotiated. Outgoing PJSIP calls can result in non-negotiated formats listed in the channel's native formats if video formats are listed in the endpoint's configuration. The resulting call could then use a non-negotiated format resulting in one way audio. * Simplified the update of session->req_caps in set_caps(). Why do something in five steps when only one is needed? AFS-162 #close Review: https://reviewboard.asterisk.org/r/4000/ ........ Merged revisions 423561 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19chan_iax2: Fix a crash when using chan_iax2 jitterbuffer settingsJonathan Rose
Caused by format changes in Asterisk 13 ASTERISK-24265 #close Reported by: Dafi Ni Review: https://reviewboard.asterisk.org/r/3999/ ........ Merged revisions 423524 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-12chan_rtp: Add unicast RTP support.Joshua Colp
This module supports sending both unicast and multicast RTP to a specified target. Multicast functionality is the same as chan_multicast_rtp was. In the case of unicast a specific IP address and port can be specified, along with optional RTP engine and format in the form of: UnicastRTP/<ip address>:<port>/<engine>/<format> This can be useful for sending a copy of a media stream to another application for processing. Review: https://reviewboard.asterisk.org/r/3981/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-05devicestate.c: Minor tweaksRichard Mudgett
* In ast_state_chan2dev() use ARRAY_LEN() instead of a sentinel value in chan2dev[]. * Fix some comments in chan_iax2.c. ........ Merged revisions 422661 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-02Resolve race condition where channels enter dialplan application before ↵Mark Michelson
media has been negotiated. Testsuite tests will occasionally fail because on reception of a 200 OK SIP response, an AST_CONTROL_ANSWER frame is queued prior to when media has finished being negotiated. This is because session supplements are called into before PJSIP's inv_session code has told us that media has been updated. Sometimes the queued answer frame is handled by the PBX thread before the ensuing media negotiations occur, causing a test failure. As it turns out, there is another place that session supplements could be called into, which is after media has finished getting negotiated. What this commit introduces is a means for session supplements to indicate when they wish to be called into when handling an incoming SIP response. By default, all session supplements will be run at the same point that they were prior to this commit. However, session supplements may indicate that they wish to be handled earlier than normal on redirects, or they may indicate they wish to be handled after media has been negotiated. In this changeset, two session supplements have been updated to indicate a preference for when they should be run: res_pjsip_diversion executes before handling redirection in order to get information from the Diversion header, and chan_pjsip now handles responses to INVITEs after media negotiation to fix the race condition mentioned previously. ASTERISK-24212 #close Reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/3930 ........ Merged revisions 422536 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 422542 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-29The assertion that peer was not found on final eventScott Griepentrog
message was being triggered on configuration reload. This patch changes that case to just return instead. Review: https://reviewboard.asterisk.org/r/3953/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-28chan_iax2: Fix Dynamic IAX2 Registrations After Temporary DNS FailureMichael L. Young
The reporter on the issue found some issues when upgrading from version 10 to 11 on 55 hosts. Two situations that can occur with dynamic registrations. 1. With dnsmgr disabled, if the host is not resolvable we are not trying to resolve the host again when it is time to attempt to register again. This results in never registering to the host. 2. With dnsmgr enabled, when the host is temporarily not resolvable the address is set to 0.0.0.0:0 and then when the host is resolvable the port is not being restored and stays set to 0. This patch resolves these two issues by: * Storing the hostname so that it can be used for resolving with DNS. * Resolve the hostname on the next scheduled attempt to register. * Storing the port used to reach the host so that when the hostname is resolvable again, we can set the port again if the port is still unset after looking up the host. ASTERISK-23767 #close Reported by: David Herselman Tested by: David Herselman, Michael L. Young Patches: asterisk-23767-dns_reg_retry_and_set_port_11_v3.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/3856/ ........ Merged revisions 422274 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 422275 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 422276 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-28chan_sip.c: Add 'rtpbindaddr' settingPaul Belanger
Users now have the ability to bind the rtpengine instance to a specific IP address. For example, you want chan_sip (call control) on eth0 but rtp (media) on eth1. ASTERISK-24280 #close Reported by: Paul Belanger Tested by: Paul Belanger Review: https://reviewboard.asterisk.org/r/3952/ Patches: rtpengine.diff uploaded by Paul Belanger git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-27CallerID: Fix parsing of malformed calleridKinsey Moore
This allows the callerid parsing function to handle malformed input strings and strings containing escaped and unescaped double quotes. This also adds a unittest to cover many of the cases where the parsing algorithm previously failed. Review: https://reviewboard.asterisk.org/r/3923/ Review: https://reviewboard.asterisk.org/r/3933/ ........ Merged revisions 422112 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 422113 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 422114 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 422154 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-24chan_sip: Use the server reflexive ICE candidate RTCP port as provided.Joshua Colp
This code originally worked around an issue within res_rtp_asterisk itself. The wrong socket was being used for the STUN check for RTCP, causing the port to be the same as RTP. This was subsequently fixed and the RTCP port provided for the ICE candidate is correct and does not need to be incremented. ASTERISK-23997 #close Reported by: Badalian Vyacheslav Patches: plus1.diff submitted by Badalian Vyacheslav (license 5249) ........ Merged revisions 421909 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 421910 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 421911 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421912 65c4cc65-6c06-0410-ace0-fbb531ad65f3