summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2012-02-13Fix compile error from most recent ast_channel opaquification installment.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Fix parsing of SIP headers where compact and non-compact headers are mixedKinsey Moore
Change parsing of SIP headers so that compactness of the header no longer influences which header will be chosen. Previously, a non-compact header would be chosen instead of a preceeding compact-form header. (closes issue ASTERISK-17192) Review: https://reviewboard.asterisk.org/r/1728/ ........ Merged revisions 354702 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354703 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Add auto_force_rport and auto_comedia NAT optionsTerry Wilson
This patch adds the auto_force_rport and auto_comedia NAT options. It also converts the nat= setting to a list of comma-separated combinable options: no, force_rport, comedia, auto_force_rport, and auto_comedia. nat=yes remains as an undocumented option equal to "force_rport,comedia". The first instance of 'yes' or 'no' in the list stops parsing and overrides any previously set options. If an auto_* option is specified with its non-auto_ counterpart, the auto setting takes precedence. This patch builds upon the patch posted to ASTERISK-17860 by JIRA user pedro-garcia. (closes issue ASTERISK-17860) Review: https://reviewboard.asterisk.org/r/1698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Clean-up of minor formatting issues in r354542/3/4Matthew Jordan
rmudgett pointed out some formatting issues in the check-in for ASTERISK-19290. This cleans those up. Review: https://reviewboards.asterisk.org/r/1722/ ........ Merged revisions 354547 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354548 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Fix SIP INFO DTMF handling for non-numeric codesMatthew Jordan
In ASTERISK-18924, SIP INFO DTMF handlingw as changed to account for both lowercase alphatbetic DTMF events, as well as uppercase alphabetic DTMF events. When this occurred, the comparison of the character buffer containing the event code was changed such that the buffer was first compared again '0' and '9' to determine if it was numeric. Unfortunately, since the first character in the buffer will typically be '1' in the case of non-numeric event codes (10-16), this caused those codes to be converted to a DTMF event of '1'. This patch fixes that, and cleans up handling of both application/dtmf-relay and application/dtmf content types. Review: https://reviewboard.asterisk.org/r/1722/ (closes issue ASTERISK-19290) Reported by: Ira Emus Tested by: mjordan ........ Merged revisions 354542 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354543 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Fix some compile problems from the 'cppcheck' patch.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Add callbackextension matching & realtime callbackextensionsTerry Wilson
This patch is based on the one by David Vossel, developer extrodinaire, at https://reviewboard.asterisk.org/r/344/. If multiple peers are defined with the same host/port, but differing callbackextensions, it chooses the peer with the matching callbackextension. Since callbackextension creates an outbound registration with the callbackextension as the Contact address, matching an incoming request by that (in addition to the host/port) makes a lot of sense. This patch also adds support for callbackextension to realtime by querying all peers with callbackextensions on reload and adding registrations for them. (closes issue ASTERISK-13456) Review: https://reviewboard.asterisk.org/r/344/ Review: https://reviewboard.asterisk.org/r/1717/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Restore some variables removed by the 'cppcheck' patch that were actually ↵Kevin P. Fleming
needed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-07Fix multiple SIP realtime issuesTerry Wilson
1. Set lastms to 0 when clearing instead of "" 2. Don't set ipaddr or port to the string "(null)" when they are empty 3. Add missing required fields, set default for lastms to 0, and modify the length of the ipaddr field to 45 in the Postgresql realtime.sql file. (closes issue ASTERISK-19172) Review: https://reviewboard.asterisk.org/r/1703/ ........ Merged revisions 354348 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354349 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-06Restore alternate SIG_PRI_DEBUG_DEFAULT meaning.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-06Allow more control over the output of pri debugKinsey Moore
This changes the debuglevel of 'pri set debug' to a bit mask allowing the user to independently select bits of output: 1 libpri internals including state machine 2 Decoded Q.931 messages 4 Decoded Q.921 headers 8 raw hex dump of the full frames Additionally, this ensures that the meaning of "on" does not change and intrudces intense and hex to simplify usage. (closes issue ASTERISK-17159) Original-patch-by: wimpy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-03Fixes deadlocks occuring in chan_agent due to r335976Jonathan Rose
Bad locking order was added to chan_agent to prevent segfaults from having no locking in a patch by irroot. This patch addresses the bad locking order by releasing locks before getting the right locking order to stop deadlocks from occuring when doing multiple interactions with agents. (closes issue ASTERISK-19285) Reported by: Alex Villacis Lasso Review: https://reviewboard.asterisk.org/r/1708/ ........ Merged revisions 353999 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 354000 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02Ensure entering T.38 passthrough does not cause an infinite loopKinsey Moore
After R340970 Asterisk was still polling the RTCP file descriptor after RTCP is shut down and removed. If the descriptor happened to have data ready when the removal occured then Asterisk would go into an infinite loop trying to read data that it can never actually access. This change disables the audio RTCP file descriptor for the duration of the T.38 transaction. (closes issue ASTERISK-18951) Reported-by: Kristijan Vrban ........ Merged revisions 353915 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353916 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02Restore the 'w' modifier support for ISDN spans. Dial(DAHDI/g0/1234w888)Richard Mudgett
This feature also causes the sending complete ie to be sent for switch types that do not automatically send the ie. (EuroISDN/ETSI) The main difference between dialing Dial(DAHDI/g0/1234w888) and Dial(DAHDI/g0/1234,,D(888)) is the sending of the sending complete ie. (closes issue ASTERISK-19176) Reported by: rmudgett Tested by: rmudgett ........ Merged revisions 353867 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353868 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-02Fix sip show peers port output, align columns, and fix ami port output.Jonathan Rose
A previous patch I committed from ASTERISK-16930 unexpectedly changed some output for the AMI action "sippeers" which this patch changes back. Also, this aligns the output for the cli command "sip show peers" and fixes another issue that patch introduced by using ast_sockaddr_stringify calls multiple times without immediately using the pointer. I also went ahead and did a little janitorial work to clean up whitespace in _sip_show_peers. (issue ASTERISK-16930) (closes issue ASTERISK-19281) Reported by: Patrick El Youssef Patches: ASTERISK-19281.diff uploaded by Walter Doekes (license 5674) ........ Merged revisions 353769 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353771 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Use ast_sockaddr_stringify_fmt wrappers for various functions in chan_sipJonathan Rose
There are a number of cleaner looking wrappers for ast_sockaddr_stringify_fmt available which are slightly more readable than using a direct call to ast_sockaddr_stringify_fmt. This patch switches a number of those calls in chan_sip to use those wrappers and is generally harmless. (Closes issue ASTERISK-16930) Reported by: Michael L. Young Patches: chan_sip-broken-registration-1.8.diff uploaded by Michael L. Young (license 5026) ........ Merged revisions 353720 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353721 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Re-link peers by IP when dnsmgr changes the IPTerry Wilson
Asterisk's dnsmgr currently takes a pointer to an ast_sockaddr and updates it anytime an address resolves to something different. There are a couple of issues with this. First, the ast_sockaddr is usually the address of an ast_sockaddr inside a refcounted struct and we never bump the refcount of those structs when using dnsmgr. This makes it possible that a refresh could happen after the destructor for that object is called (despite ast_dnsmgr_release being called in that destructor). Second, the module using dnsmgr cannot be aware of an address changing without polling for it in the code. If an action needs to be taken on address update (like re-linking a SIP peer in the peers_by_ip table), then polling for this change negates many of the benefits of having dnsmgr in the first place. This patch adds a function to the dnsmgr API that calls an update callback instead of blindly updating the address itself. It also moves calls to ast_dnsmgr_release outside of the destructor functions and into cleanup functions that are called when we no longer need the objects and increments the refcount of the objects using dnsmgr since those objects are stored on the ast_dnsmgr_entry struct. A helper function for returning the proper default SIP port (non-tls vs tls) is also added and used. This patch also incorporates changes from a patch posted by Timo Teräs to ASTERISK-19106 for related dnsmgr issues. (closes issue ASTERISK-19106) Review: https://reviewboard.asterisk.org/r/1691/ ........ Merged revisions 353371 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353397 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Merged revisions 353369 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r353369 | alecdavis | 2012-01-31 11:42:28 +1300 (Tue, 31 Jan 2012) | 9 lines Merged revisions 353368 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r353368 | alecdavis | 2012-01-31 11:40:40 +1300 (Tue, 31 Jan 2012) | 2 lines prevent debug messsges displaying -ve Cseq numbers. Missed in R353320 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Merged revisions 353321 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r353321 | alecdavis | 2012-01-31 11:16:22 +1300 (Tue, 31 Jan 2012) | 25 lines Merged revisions 353320 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r353320 | alecdavis | 2012-01-31 10:57:49 +1300 (Tue, 31 Jan 2012) | 18 lines RFC3261 Section 8.1.1.5. The sequence number value MUST be expressible as a 32-bit unsigned integer * fix: use %u instead of %d when dealing with CSeq numbers - to remove possibility of -ve numbers. * fix: change all uses of seqno and friends (ocseq icseq) from 'int' or 'unsigned int' to uint32_t. Summary of CSeq numbers. An initial CSeq number must be less than 2^31 A CSeq number can increase in value up to 2^32-1 An incrementing CSeq number must not wrap around to 0. Tested with Asterisk 1.8.8.2 with Grandstream phones. alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1699/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Clarify log WARNING message when port-zero SDP 'm' lines received.Kevin P. Fleming
Previously, if an m-line in an SDP offer or answer had a port number of zero, that line was skipped, and resulted in an 'Unsupported SDP media type...' warning message. This was misleading, as the media type was not unsupported, but was ignored because the m-line indicated that the media stream had been rejected (in an answer) or was not going to be used (in an offer). ........ Merged revisions 353260 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353261 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-29Allow softkey reject while device onhook.Damien Wedhorn
Fixes up softkey endcall. Previous code was a copy of onhook, now allows for endcall softkey to be used while device is still onhook. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Audit of ao2_iterator_init() usage for v1.8.Richard Mudgett
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as a result. Review: https://reviewboard.asterisk.org/r/1697/ ........ Merged revisions 352955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352956 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Merged revisions 352863 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r352863 | alecdavis | 2012-01-27 13:08:03 +1300 (Fri, 27 Jan 2012) | 19 lines Merged revisions 352862 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r352862 | alecdavis | 2012-01-27 13:05:30 +1300 (Fri, 27 Jan 2012) | 12 lines rfc4235 - Section 4.1: Versions MUST be representable using a non-negative 32 bit integer. If a BLF subscription exists for long enough, using %d may print negative version numbers. Unlikely, as 2^32 at 1 update per second is ~137 years, or half that before the versions number started going negative. Tested with Asterisk 1.8.8.2 with Grandstream phones. alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1694/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-26Copy amaflags to sip_pvt from peer during create_addr_from_peerJonathan Rose
For whatever reason, we don't have a single function for copying data like this from SIP peers to the SIP pvt. This patch adds the copying of amaflags to the sip_pvt, but it would probably be worth discussing this function along with the others that essentially just copy some amount of data from a peer to a private. (Closes issue ASTERISK-19029) Reported by: Matt Lehner ........ Merged revisions 352755 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352756 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-26Merged revisions 352705 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r352705 | alecdavis | 2012-01-26 19:33:11 +1300 (Thu, 26 Jan 2012) | 27 lines Merged revisions 352704 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r352704 | alecdavis | 2012-01-26 19:27:07 +1300 (Thu, 26 Jan 2012) | 20 lines Cleanup dialog-info+xml Notify dialog Make similar to other Notify messages. sample output: <?xml version="1.0"?> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="715" state="full" entity="sip:8523@192.168.x.xx"> <dialog id="8523"> <state>terminated</state> </dialog> </dialog-info> Tested with Asterisk 1.8.8.2 with Grandstream phones. alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1693/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25Remove some extraneous debugging from registry memleak fixTerry Wilson
........ Merged revisions 352551 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352556 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25Fixes for sending SIP MESSAGE outside of calls.Richard Mudgett
* Fix authenticate MESSAGE losing custom headers added by the MESSAGE_DATA function in the authorization attempt. * Pass up better From header contents for SIP to use. Now is in the "display-name" <URI> format expected by MessageSend. (Note that this is a behavior change that could concievably affect some people.) * Block user from adding standard headers that are added automatically. (To, From,...) * Allow the user to override the Content-Type header contents sent by MessageSend. * Decrement Max-Forwards header if the user transferred it from an incoming message. * Expand SIP short header names so the dialplan and other code only has to deal with the full names. * Documents what SIP expects in the MessageSend(from) parameter. (closes issue ASTERISK-18992) Reported by: Yuri (closes issue ASTERISK-18917) Reported by: Shaun Clark Review: https://reviewboard.asterisk.org/r/1683/ ........ Merged revisions 352520 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25Clean up some SIP registry-related memory leaksTerry Wilson
1) Be sure and free at unload the epa_backend we allocate at startup 2) Do the same sip_registry cleanup at unload we do at reload Review: https://reviewboard.asterisk.org/r/1689/ ........ Merged revisions 352514 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352515 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25Fix channel opaquification of stringfields for chan_vpbTerry Wilson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Don't do a DNS lookup on an outbound REGISTER host if there is an outbound ↵Mark Michelson
proxy configured. (closes issue ASTERISK-16550) reported by: Olle Johansson ........ Merged revisions 352424 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352430 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23Fix sip_cfg.notifycid to be set with the defined enum values.Richard Mudgett
The invalid value used when notifycid was enabled was benign. As far as the code was concerned -1 and 1 are equivalent. (closes issue ASTERISK-19232) Reported by: Eike Kuiper ........ Merged revisions 352090 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352091 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-21Remove XXX comment that is not necessary.Mark Michelson
........ Merged revisions 352016 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352017 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-21Fix RTP reference leak.Mark Michelson
If a blind transfer were initiated using a REFER without a prior reINVITE to place the call on hold, AND if Asterisk were sending RTCP reports, then there was a reference for the RTP instance of the transferer. This fixes the issue by merging two similar but slightly conflicting sections of code into a single area. It also adds a stop_media_flows() call in the case that the transferer's UA never sends a BYE to us like it is supposed to. (issue ASTERISK-19192) Review: https://reviewboard.asterisk.org/r/1681/ ........ Merged revisions 352014 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352015 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20Make CLI sip show channel list the complete route set.Richard Mudgett
(closes issue ASTERISK-16877) Reported by: klaus3000 Patches: show-complete-routeset-patch.txt (license #5054) patch uploaded by klaus3000 (modified) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20SIP session timeout AMI eventKinsey Moore
Add an AMI event in the Call category that is issued when a call is terminated due to either RTP stream inactivity or SIP session timer expiration. Event description: Event: SessionTimeout Source: source Channel: channel-name Uniqueid: channel-unique-id `source` can be either RTPTimeout or SIPSessionTimer (closes issue ASTERISK-16467) Patch-by: Kirill Katsnelson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20Adds setting of mwi_from field to check_auth_result check_peer_okJonathan Rose
(closes ASTERISK-19057) Reported By: Yuri Patches: 348360chan_sip.diff uploaded by Yuri (license 5242) ........ Merged revisions 351759 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351762 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19Misc minor fixes in reqresp_parser.c and chan_sip.c.Richard Mudgett
* Fix corner cases in get_calleridname() parsing and ensure that the output buffer is nul terminated. * Make get_calleridname() truncate the name it parses if the given buffer is too small rather than abandoning the parse and not returning anything for the name. Adjusted get_calleridname_test() unit test to handle the truncation change. * Fix get_in_brackets_test() unit test to check the results of get_in_brackets() correctly. * Fix parse_name_andor_addr() to not return the address of a local buffer. This function is currently not used. * Fix potential NULL pointer dereference in sip_sendtext(). * No need to memset(calleridname) in check_user_full() or tmp_name in get_name_and_number() because get_calleridname() ensures that it is nul terminated. * Reply with an accurate response if get_msg_text() fails in receive_message(). This is academic in v1.8 because get_msg_text() can never fail. ........ Merged revisions 351618 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351646 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19Eliminates doubling the :port part of SIP Notify Message-Account headers.Jonathan Rose
This patch prevents the domain string from getting mangled during the initreqprep step by moving the initialization to before its immediate use. It also documents this pitfall for the ast_sockaddr_stringify functions. (issue ASTERISK-19057) Reported by: Yuri Review: https://reviewboard.asterisk.org/r/1678/ ........ Merged revisions 351559 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351560 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-19Prevent crash when an SDP offer is received with an encrypted video stream ↵Joshua Colp
when support for video is disabled and res_srtp is loaded. (closes issue ASTERISK-19202) Reported by: Catalin Sanda ........ Merged revisions 351504 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351505 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-18The get_pai function in chan_sip.c didn't recognized a proper callerid name andStefan Schmidt
number from a P-Asserted-Identity cause the header parsing logic was wrong. Changing the parsing functions to the sip header parsing APIs in reqresp_parser.h solves this problem. Review: https://reviewboard.asterisk.org/r/1673 Reviewed by: wdoekes2 and Mark Michelson ........ Merged revisions 351396 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351408 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17Use built-in parsing functions for Contact and Record-Route headers.Mark Michelson
If a Contact or a Record-Route header had a quoted string with an item in angle brackets, then we would mis-parse it. For instance, "Bob <1234>" <1234@example.org> would be misparsed as having the URI "1234" The fix for this is to use parsing functions from reqresp_parser.h since they are heavily tested and are awesome. (issue ASTERISK-18990) ........ Merged revisions 351284 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351286 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17Fix udptl issue with initial INVITE introduced by r351027Matthew Jordan
When an inital INVITE occurs that contains image media, a channel is not yet associated with the SIP dialog. The file descriptor associated with the udptl session needs to be set in initialize_udptl or in sip_new to account for this scenario. ........ Merged revisions 351233 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351234 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17Merged revisions 351183 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r351183 | russell | 2012-01-16 20:43:19 -0500 (Mon, 16 Jan 2012) | 29 lines Merged revisions 351182 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r351182 | russell | 2012-01-16 20:37:03 -0500 (Mon, 16 Jan 2012) | 22 lines Add some missing locking in chan_sip. This patch adds some missing locking to the function send_provisional_keepalive_full(). This function is called from the scheduler, which is processed in the SIP monitor thread. The associated channel (or pbx) thread will also be using the same sip_pvt and ast_channel so locking must be used. The sip_pvt_lock_full() function is used to ensure proper locking order in a safe manner. In passing, document a suspected reference counting error in this function. The "fix" is left commented out because when the "fix" is present, crashes occur. My theory is that fixing it is exposing a reference counting error elsewhere, but I don't know where. (Or my analysis of this being a problem could have been completely wrong in the first place). Leave the comment in the code for so that someone may investigate it again in the future. Also add a bit of doxygen to transmit_provisional_response(). (closes issue ASTERISK-18979) Review: https://reviewboard.asterisk.org/r/1648 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Ensure ACK retransmit & hangup on non-200 response to INVITETerry Wilson
When handling a non-2xx final response on an INVITE transaction, we have to keep the transaction around after we send an ACK in case we receive a retransmission of the response so we can re-transmit the ACK, but also tear down the ast_channel as soon as we transmit the ACK. Before this patch, we could fail at both of these things. Calling sip_alreadygone/needdestroy prevented us from keeping the transaction up and retransmitting the ACK, and queueing CONGESTION was not sufficient to cause the channel to be torn down when originating calls via the CLI, for example. This patch queues a hangup with CONGESTION instead of just queueing CONGESTION for these responses and removes the sip_alreadygone and sip_needdestroy calls from handle_response_invite on non-2xx responses. It relies on the hangup calling sip_scheddestroy. For more information, see section 17.1.1.1 of RFC 3261. (closes issue ASTERISK-17717) Review: https://reviewboard.asterisk.org/r/1672/ ........ Merged revisions 351130 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351131 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Don't prematurely stop SIP session timerTerry Wilson
When Asterisk is the UAS (incoming call, endpoint is re-inviting) the SIP session timer expires after half the time the sip endpoint indicates in the Session-expires header in proc_session_timer(). The session timer was being stopped totally and being handled as an error case instead of running again until the second expiry. This patch treats the half-time expiry as a non-error case and continues the timer until the true expiry. (closes issue ASTERISK-18996) Reported by: Thomas Arimont Tested by: Thomas Arimont Patches: session_timer_fix.diff by Terry Wilson (License #5357) based on session_timer.patch by Thomas Arimont (License #5525) ........ Merged revisions 351080 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351081 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-16Create and initialize udptl only when dialog negotiates for image mediaMatthew Jordan
Prior to this patch, the udptl struct was allocated and initialized when a dialog was associated with a peer that supported T.38, when a new SIP channel was allocated, or what an INVITE request was received. This resulted in any dialog associated with a peer that supported T.38 having udptl support assigned to it, including the UDP ports needed for communication. This occurred even in non-INVITE dialogs that would never send image media. This patch creates and initializes the udptl structure only when the SDP for a dialog specifies that image media is supported, or when Asterisk indicates through the appropriate control frame that a dialog is to support T.38. (closes issue ASTERISK-16698) Reported by: under Tested by: Stefan Schmidt Patches: udptl_20120113.diff uploaded by mjordan (License #6283) (closes issue ASTERISK-16794) Reported by: Elazar Broad Tested by: Stefan Schmidt review: https://reviewboard.asterisk.org/r/1668/ ........ Merged revisions 351027 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 351028 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351029 65c4cc65-6c06-0410-ace0-fbb531ad65f3