summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
AgeCommit message (Collapse)Author
2011-11-21Default to nat=yes; warn when nat in general and peer differTerry Wilson
It is possible to enumerate SIP usernames when the general and user/peer nat settings differ in whether to respond to the port a request is sent from or the port listed for responses in the Via header. In 1.4 and 1.6.2, this would mean if one setting was nat=yes or nat=route and the other was either nat=no or nat=never. In 1.8 and 10, this would mean when one was nat=force_rport and the other was nat=no. In order to address this problem, it was decided to switch the default behavior to nat=yes/force_rport as it is the most commonly used option and to strongly discourage setting nat per-peer/user when at all possible. For more discussion of the issue, please see: http://lists.digium.com/pipermail/asterisk-dev/2011-November/052191.html (closes issue ASTERISK-18862) Review: https://reviewboard.asterisk.org/r/1591/ ........ Merged revisions 345776 from http://svn.asterisk.org/svn/asterisk/branches/1.4 ........ Merged revisions 345800 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2 ........ Merged revisions 345828 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345830 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14Restore SIP DTMF overlap dialing method.Richard Mudgett
The recent fix for ASTERISK-17288 to get RFC3578 SIP overlap support working correctly removed a long standing ability to do overlap dialing using DTMF in the early media phase of a call. See ASTERISK-18702 it has a very good description of the issue. I started with Pavel Troller's chan_sip.diff patch on issue ASTERISK-18702. * Added 'dtmf' enum value to sip.conf allowoverlap config option. The new option value causes the Incomplte application to not send anything with chan_sip so the caller can supply more digits via DTMF. * Renames SIP_GET_DEST_PICKUP_EXTEN_FOUND to SIP_GET_DEST_EXTEN_MATCHMORE since that is what it really means. * Fixed get_destination() inconsistency with the pickup extension matching. * Fixed initialization of PAGE3 of global_flags in reload_config(). (closes issue ASTERISK-18702) Reported by: Pavel Troller Review: https://reviewboard.asterisk.org/r/1517/ Review: https://reviewboard.asterisk.org/r/1582/ ........ Merged revisions 345273 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345275 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14Ensure that a null vmexten does not cause a segfaultKinsey Moore
When sip_send_mwi_to_peer was modified recently to avoid deadlocks, vmexten was not expected to be null. This change handles that situation to avoid a segfault. ........ Merged revisions 345063 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345064 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Fix regression introduced by SDP fixupsKinsey Moore
If capability is adjusted when switching to UDPTL during fax transmission, fax teardown fails. Make sure capability is only touched if RTP is active. This regression was introduced in R344385. ........ Merged revisions 344769 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344770 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Check sip.conf maxforwards parameter for range 1 <= x <= 255.Richard Mudgett
JIRA AST-710 ........ Merged revisions 344715 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344716 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10Fix several bugs with SDP parsing and well-formedness of responsesKinsey Moore
Fix bug ASTERISK-16558 which dealt with the order of responses to incoming streams defined by SDP. Fix unreported bug where offering multiple same-type streams would cause Asterisk to reply with an incorrect SDP response missing one or more streams without a proper declination. Fix bugs related to a single non-audio stream being offered with responses requesting codecs that were not offered in the initial invite along with an additional audio stream that was not in the initial invite. Review: https://reviewboard.asterisk.org/r/1516/ ........ Merged revisions 344385 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344386 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09Fix deadlock during dialplan reload.Richard Mudgett
Another deadlock between the conlock/hints and channels/channel locking orders. * Don't hold the channel and private lock in sip_new() when calling ast_exists_extension(). (closes issue ASTERISK-18740) Reported by: Byron Clark Patches: sip_exists_exten_dlock_3.diff (license #5041) patch uploaded by Gregory Hinton Nietsky ASTERISK-18740.patch (license #6157) patch uploaded by Byron Clark Tested by: Byron Clark ........ Merged revisions 344268 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344271 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09Don't treat a host:port string as a domainTerry Wilson
The domain matching code prior to 1.8 used to manually remove the port from the host:port string when determining if an incoming request matched the list of domains. When switching to the new parsing functions, the documentation implied that the "domain" was being returned by these functions, when instead it was returning the "hostport" as defined by RFC 3261. This led to confusion and resulted in 1.8+ rejecting an incoming request from x.x.x.x:xxxxx when domain=x.x.x.x was set in sip.conf. This patch renames the "domain" variables in the parsing functions to "hostport" to more accurately describe what it is that they are returning and also properly truncates the resulting hostport strings when dealing with domain matching. Review: https://reviewboard.asterisk.org/r/1574/ ........ Merged revisions 344215 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344216 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08Residual changes for Asterisk v10 branch from ASTERISK-18747.Richard Mudgett
Residual changes for Asterisk v10 branch from ASTERISK-18747 after https://reviewboard.asterisk.org/r/1564/ commit and associated dialogs callid hash key change fix. * Make check_rtp_timeout() return CMP_MATCH if need to delete dialog from dialogs_rtpcheck. This is an optimization to avoid an unneeded lock/unlock and object search when using ao2_unlink. * Prevent crash in check_rtp_timeout() if dialog->rtp is NULL. Review: https://reviewboard.asterisk.org/r/1557/ ........ Merged revisions 344004 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08Merged revisions 343900 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r343900 | dvossel | 2011-11-08 12:29:33 -0600 (Tue, 08 Nov 2011) | 11 lines Fixes regression caused by r343635 There was a missing unlock for a function return that is only present in Asterisk 10 and Asterisk Trunk. (closes issue ASTERISK-18839) Reported by: Michael L. Young Patches: asterisk-18839-missing-lock-trunk-v2.diff (License #5026) patch uploaded by Michael L. Young ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-08Fixed reference to incorrect variable if unknown host configured crash.Richard Mudgett
* Fixed a LOG_ERROR message referencing the config variable list v that had previously been processed and became NULL. * Added error return value set that was missing in an ast_append_ha() error return path. (closes issue ASTERISK-18743) Reported by: Michele Patches: issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes Tested by: Michele ........ Merged revisions 343851 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343852 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07Make "sip show settings" CLI command get RPID flags from the right global pageKinsey Moore
The "Trust RPID" and "Send RPID" entries in the "sip show settings" CLI command pulled the flags from the incorrect global flags page. These are now read from sip global flags page 0. (closes issue AST-711) ........ Merged revisions 343743 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07respect case changes in peer names on sip reloadMatthew Nicholson
ASTERISK-18669 ........ Merged revisions 343690 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343691 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07Fix __sip_subscribe_mwi_do() incorectly changing dialogs hash key callid.Richard Mudgett
Changing an object value used as a container key requires removing the object from the container and reinserting it. * Created change_callid_pvt() to call instead of build_callid_pvt(). The change_callid_pvt() will correctly change the dialog callid so the ao2 conainter can explicitly unlink it. ........ Merged revisions 343637 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343677 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07Prevent BLF subscriptions from causing deadlocksKinsey Moore
Fix a locking inversion in sip_send_mwi_to_peer that was causing deadlocks. This function now requires that both the peer and associated pvt be unlocked before it is called for cases where peer and peer->mwipvt form a circular reference. (closes issue ASTERISK-18663) Review: https://reviewboard.asterisk.org/r/1563/ ........ Merged revisions 343621 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343635 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-07Fix deadlock if peer is destroyed while sending MWI notice.Richard Mudgett
A dialog cannot be destroyed by the ao2_callback dialog_needdestroy because of a deadlock between the dialogs container lock and the RWLOCK of the events subscription list. * Create dialogs_to_destroy container to hold dialogs that will be destroyed. * Ensure that the event subscription callback will never happen with an invalid peer pointer by making the event callback removal the first thing in the peer destructor callback. NOTE: This particular deadlock will not happen with Asterisk 10, but some of the changes still apply. (closes issue ASTERISK-18747) Reported by: Gregory Hinton Nietsky Review: https://reviewboard.asterisk.org/r/1564/ ........ Merged revisions 343577 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343578 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02Remove registertrying option in chan_sipTerry Wilson
This option is not only useless, but has been broken since inception since the flag was never copied from the peer where it is set to the pvt where it was checked. RFC 3261 specificially states that you should not send a provisional response to a non-INVITE request, and if we did fix the code so that it worked, it would cause the same kind of user enumeration vulnerability that we've discussed with the nat= setting. This patch removes registertrying option and any code that would have sent a 100 response to a register. Review: https://reviewboard.asterisk.org/r/1562/ ........ Merged revisions 343220 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343221 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02Fix improper warning introduced by r342927 and more tweaksWalter Doekes
Changeset r342927 introduced a warning which was only supposed to be emitted when a found realtime peer had an empty (or no) name. It turned out that there were some inconsistencies left. Now found peers with an empty name are explicitly ignored like before r342927 but better. Reviewed by: Stefan Schmidts, Terry Wilson Review: https://reviewboard.asterisk.org/r/1560 ........ Merged revisions 343181 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343192 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01Several fixes to the chan_sip dynamic realtime peer/user lookupWalter Doekes
There were several problems with the dynamic realtime peer/user lookup code. The lookup logic had become rather hard to read due to lots of incremental changes to the realtime_peer function. And, during the addition of the sipregs functionality, several possibilities for memory leaks had been introduced. The insecure=port matching has always been broken for anyone using the sipregs family. And, related, the broken implementation forced those using sipregs to *still* have an ipaddr column on their sippeers table. Thanks Terry Wilson for comprehensive testing and finding and fixing unexpected behaviour from the multientry realtime call which caused the realtime_peer to have a completely unused code path. This changeset fixes the leaks, the lookup inconsistenties and that you won't need an ipaddr column on your sippeers table anymore (when you're using sipregs). Beware that when you're using sipregs, peers with insecure=port will now start matching! (closes issue ASTERISK-17792) (closes issue ASTERISK-18356) Reported by: marcelloceschia, Walter Doekes Reviewed by: Terry Wilson Review: https://reviewboard.asterisk.org/r/1395 ........ Merged revisions 342927 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342929 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-24Outbound SIP OPTIONS messages will now include fromuser of related peer.Jonathan Rose
This behavior matches up more closely with the way invite/register/etc are handled. This patch also modifies some adjacent code for code style compliance. Pretty minor. (closes issue ASTERISK-17616) Reported by: Jeremy Kister Patches: chan_sip.c-options-fromuser-fix-v1.patch uploaded by Jeremy Kister (license #6232) ........ Merged revisions 342061 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342062 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-19Don't use is_int() since it doesn't link well on all platformsTerry Wilson
Just create an normal API function in strings.h that does the same thing just to be safe. ASTERISK-17146 ........ Merged revisions 341379 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341380 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-19Don't sent in-dialog requests like UPDATE when Asterisk has not yet received ↵Stefan Schmidt
a Contact URI from a UAS ........ Merged revisions 341366 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341377 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-18Don't resolve numeric hosts or contact unresolved hostsTerry Wilson
If a SIP dial string contains a numeric hostname that is not a peer name, don't try to resolve it as it is unlikely that someone really means Dial(SIP/0.0.4.26) when Dial(SIP/1050) is called. Also, make sure that create_addr returns -1 if an address isn't resolved so that we don't attempt to send SIP requests to an address that doesn't resolve. (closes issue ASTERISK-17146, ASTERISK-17716) Review: https://reviewboard.asterisk.org/r/1532/ ........ Merged revisions 341314 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341315 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-18More parking issues.Richard Mudgett
* Fix potential deadlocks in SIP and IAX blind transfer to parking. * Fix SIP, IAX, DAHDI analog, and MGCP channel drivers to respect the parkext_exclusive option with transfers (Park(,,,,,exclusive_lot) parameter). Created ast_park_call_exten() and ast_masq_park_call_exten() to maintian API compatibility. * Made masq_park_call() handle a failed ast_channel_masquerade() setup. * Reduced excessive struct parkeduser.peername[] size. ........ Merged revisions 341254 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341255 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-17Initialize variables before calling parse_uriTerry Wilson
If parse_uri was called with an empty URI, some pointers would be modified and an invalid read could result. This patch avoids calling parse_uri with an empty contact uri when parsing REGISTER requests. AST-2011-012 (closes issue ASTERISK-18668) ........ Merged revisions 341189 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341190 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-17Don't try to remove peers without IPs from peers_by_ipTerry Wilson
(closes issue ASTERISK-18696) ........ Merged revisions 341088 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341089 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14Merged revisions 340971 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340971 | kmoore | 2011-10-14 15:50:37 -0500 (Fri, 14 Oct 2011) | 15 lines Merged revisions 340970 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340970 | kmoore | 2011-10-14 15:49:39 -0500 (Fri, 14 Oct 2011) | 8 lines Quiet RTCP Receiver Reports during fax transmission RTCP is now disabled for "inactive" RTP audio streams during SIP T.38 sessions. The ability to disable RTCP streams in res_rtp_asterisk was missing, so this code was added to support the bug fix. (closes issue ASTERISK-18400) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-13Merged revisions 340718 via svnmerge from Stefan Schmidt
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340718 | schmidts | 2011-10-13 06:59:50 +0000 (Thu, 13 Oct 2011) | 9 lines Merged revisions 340717 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340717 | schmidts | 2011-10-13 06:58:00 +0000 (Thu, 13 Oct 2011) | 3 lines storing the route-set also on a 181 response not only on 180,182 or 183. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-13Initialize ast_sockaddr before calling ast_sockaddr_resolveTerry Wilson
Avoid possible jump based on unitialized value ........ Merged revisions 340715 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340716 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-12Merged revisions 340577 via svnmerge from Stefan Schmidt
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340577 | schmidts | 2011-10-12 20:33:37 +0000 (Mit, 12 Okt 2011) | 9 lines Merged revisions 340576 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340576 | schmidts | 2011-10-12 20:30:37 +0000 (Mit, 12 Okt 2011) | 3 lines Store route-set from provisional SIP responses so early-dialog requests can be routed properly ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-12Merged revisions 340578 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340578 | twilson | 2011-10-12 13:57:19 -0700 (Wed, 12 Oct 2011) | 16 lines Merged revisions 340534 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340534 | twilson | 2011-10-12 13:19:36 -0700 (Wed, 12 Oct 2011) | 9 lines Update SIP realtime fullcontact regardless of caching We should update the fullcontact field in the realtime table whether or not rtcachefriends is set. There is no reason to treat a non-cached realtime entity differently than a cached in this regard. (closes issue ASTERISK-18446) Reported by: wdoekes ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-12Fix verbose messages when IPv6 logic was addedPaul Belanger
(closes issue ASTERISK-18612) Reported by: Tim Osman ........ Merged revisions 340418 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340419 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-11Fix some potential deadlocks pointed out by helgrind.Richard Mudgett
* Fixed deadlock potential calling dialog_unlink_all() in __sip_autodestruct(). Found by helgrind. * Fixed deadlock potential in handle_request_invite() after calling sip_new(). Found by helgrind. * The sip_new() function now returns with the created channel already locked. * Removed the dead code that starts a PBX in in sip_new(). No sip_new() callers caused that code to be executed and it was a bad thing to do anyway. * Removed unused parameters and return value from dialog_unlink_all(). * Made dialog_unlink_all() and __sip_autodestruct() safely obtain the owner and private channel locks without a deadlock avoidance loop. ........ Merged revisions 340284 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340310 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10Merged revisions 340165 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r340165 | mjordan | 2011-10-10 15:30:18 -0500 (Mon, 10 Oct 2011) | 20 lines Merged revisions 340164 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r340164 | mjordan | 2011-10-10 15:23:48 -0500 (Mon, 10 Oct 2011) | 13 lines Updated chan_sip to place calls on hold if SDP address in INVITE is ANY This patch fixes the case where an INVITE is received with c=0.0.0.0 or ::. In this case, the call should be placed on hold. Previously, we checked for the address being null; this patch keeps that behavior but also checks for the ANY IP addresses. Review: https://reviewboard.asterisk.org/r/1504/ (closes issue ASTERISK-18086) Reported by: James Bottomley Tested by: Matt Jordan ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-06Merged revisions 339626 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339626 | rmudgett | 2011-10-06 12:53:00 -0500 (Thu, 06 Oct 2011) | 25 lines Merged revisions 339625 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339625 | rmudgett | 2011-10-06 12:49:38 -0500 (Thu, 06 Oct 2011) | 18 lines Fix debugging messages generated by 'udptl debug'. * Makes chan_sip set the tag to the channel name. * Fixes received debug message sequence number. * Removed tx/rx debug message type since it was hard coded to 0. * Made udptl.c logged message header consistent if possible: "UDPTL (%s): ". * Removed unused rx_expected_seq_no from struct ast_udptl. (closes issue ASTERISK-18401) Reported by: Kevin P. Fleming Patches: jira_asterisk_18401_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: Matthew Nicholson ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03Merged revisions 339148 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339148 | lmadsen | 2011-10-03 15:13:16 -0500 (Mon, 03 Oct 2011) | 14 lines Merged revisions 339147 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339147 | lmadsen | 2011-10-03 15:12:43 -0500 (Mon, 03 Oct 2011) | 6 lines Remove duplicated Maxforwards line in AMI output. (Closes issue ASTERISK-18637) Reported by: Jacek Konieczny Patches: asterisk-sipshowpeer.patch (License #6298) uploaded by Jacek Konieczny ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03Merged revisions 339088 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339088 | twilson | 2011-10-03 11:44:27 -0700 (Mon, 03 Oct 2011) | 17 lines Merged revisions 339086 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339086 | twilson | 2011-10-03 11:40:52 -0700 (Mon, 03 Oct 2011) | 10 lines Properly ignore AST_CONTROL_UPDATE_RTP_PEER in more places After the change in r336294, the new AST_CONTROL_UPDATE_RTP_PEER frame is sent when a re-invite happens. If we receive a re-invite from a device the waitstream_core was not aware of the new control frame and would drop the call. (closes issue ASTERISK-18610) Reported by: Kristijan_Vrban ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-30Formatting changes onlyOlle Johansson
--Denna och nedanstående rader kommer inte med i loggmeddelandet-- M channels/chan_sip.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-30Fix formatting of AMI header for SIP show peer.Richard Mudgett
ASTERISK-17486 exposed the problem for AMI parsers. (closes issue ASTERISK-18649) Reported by: Jacek Konieczny Patches: asterisk-sipshowpeer_response_end.patch (license #6298) patch uploaded by Jacek Konieczny ........ Merged revisions 338663 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 338664 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-29Merged revisions 338417 via svnmerge from Gregory Nietsky
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r338417 | irroot | 2011-09-29 14:16:42 +0200 (Thu, 29 Sep 2011) | 19 lines Merged revisions 338416 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r338416 | irroot | 2011-09-29 14:13:05 +0200 (Thu, 29 Sep 2011) | 12 lines The rtptimeout setting is ignored on a per peer basis. Not only is the rtptimeout ignored in some cases but rtpkeepalive and rtpholdtimeout is affected. this commit also removes rtptimeout/rtpholdtimeout on text rtp. (closes issue ASTERISK-18559) Review: https://reviewboard.asterisk.org/r/1452 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-27Whitespace (red blobs) fixesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-22Merged revisions 337595,337597 via svnmerge from Jonathan Rose
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r337595 | jrose | 2011-09-22 10:35:50 -0500 (Thu, 22 Sep 2011) | 12 lines Generate Security events in chan_sip using new Security Events Framework Security Events Framework was added in 1.8 and support was added for AMI to generate events at that time. This patch adds support for chan_sip to generate security events. (closes issue ASTERISK-18264) Reported by: Michael L. Young Patches: security_events_chan_sip_v4.patch (license #5026) by Michael L. Young Review: https://reviewboard.asterisk.org/r/1362/ ........ r337597 | jrose | 2011-09-22 10:47:05 -0500 (Thu, 22 Sep 2011) | 10 lines Forgot to svn add new files to r337595 Part of Generating security events for chan_sip (issue ASTERISK-18264) Reported by: Michael L. Young Patches: security_events_chan_sip_v4.patch (License #5026) by Michael L. Young Reviewboard: https://reviewboard.asterisk.org/r/1362/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-20Merged revisions 336936 via svnmerge from Gregory Nietsky
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r336936 | irroot | 2011-09-20 18:51:59 +0200 (Tue, 20 Sep 2011) | 14 lines Allow Setting Auth Tag Bit length Based on invite or config option Update the SIP SRTP API to allow use of 32 or 80 bit taglen. Curently only 80 bit is supported. The outgoing invite will use the taglen of the incoming invite preventing one-way audio. (Closes issue ASTERISK-17895) Review: https://reviewboard.asterisk.org/r/1173/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19Merged revisions 336792 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r336792 | twilson | 2011-09-19 17:13:34 -0500 (Mon, 19 Sep 2011) | 9 lines Merged revisions 336791 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r336791 | twilson | 2011-09-19 17:07:58 -0500 (Mon, 19 Sep 2011) | 2 lines Don't interfere with T.38 reinvites This is an update to the fix for ASTERISK-18340 and ASTERISK-17725 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19Merged revisions 336502 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r336502 | oej | 2011-09-19 15:38:53 +0200 (Mån, 19 Sep 2011) | 12 lines Merged revisions 336501 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r336501 | oej | 2011-09-19 15:33:50 +0200 (Mån, 19 Sep 2011) | 5 lines Add diversion header to a 302 redirect response if we have diversion data (closes issue ASTERISK-18143) patch by oej ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19Merged revisions 336381 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r336381 | oej | 2011-09-19 12:05:00 +0200 (Mån, 19 Sep 2011) | 16 lines Merged revisions 336378 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r336378 | oej | 2011-09-19 11:40:44 +0200 (Mån, 19 Sep 2011) | 9 lines Add missing unlock at MWI message sending time (closes issue ASTERISK-18573) Patches: sip_mwi_lock.patch (license #5041) by Gregory Hinton Nietsky Thanks to irrot for the reminder, to Gregory for the patch! ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-16Merged revisions 336307 via svnmerge from Jonathan Rose
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r336307 | jrose | 2011-09-16 16:09:20 -0500 (Fri, 16 Sep 2011) | 20 lines Merged revisions 336294 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r336294 | jrose | 2011-09-16 14:53:40 -0500 (Fri, 16 Sep 2011) | 13 lines Fix bad RTP media bridges in directmedia calls on peers separated by multiple Asterisk nodes. In a situation involving devices on separate Asterisk trunks, the remote RTP bridge would break when starting a call with directmedia. This patch queues a new type of control frame so that our RTP bridge loop can properly detect when these situations occur and check to see if peers need to be updated in order to send their media to the proper location. (Closes issue ASTERISK-18340) Reported by: Thomas Arimont (Closes issue ASTERISK-17725) Reported by: kwk Tested by: twilson, jrose ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12Documentation updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12Small documentation updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-12New sip.conf option for setting default tonezone for channel or individual ↵Olle Johansson
devices Review: https://reviewboard.asterisk.org/r/1429/ (closes issue ASTERISK-18497) Thanks to russellb for peer review. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335325 65c4cc65-6c06-0410-ace0-fbb531ad65f3