summaryrefslogtreecommitdiff
path: root/channels
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-17Remove dead code since pri_grab() can never fail.Richard Mudgett
Dead code makes programmers sick. I am sick of looking at it. ........ Merged revisions 345546 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345558 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-15Fix typo in sig_pri using wrong structure name.Richard Mudgett
It is fortunate that the typo does not alter generated code since the e->restart.channel and e->ring.channel members are in the same position. (closes issue ASTERISK-18868) Reported by: zvision Patches: sig_pri.c.diff (License #5755) patch uploaded by zvision ........ Merged revisions 345370 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345371 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345375 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-14Update reqresp_parser parse_uri doxygen comments.Walter Doekes
The issue mentioned in the bug report had been fixed recently by twilson. The reporter included this documentation fix. (closes issue ASTERISK-18572) Reported by: Richard Miller Patch by: Richard Miller (modified) ........ Merged revisions 345160 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 345161 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345162 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-12mISDN Round Robin break when no channel is availableGregory Nietsky
Prevent channels been parsed repetitively. ........ Merged revisions 344965 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344966 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Remove unneeded if(params) checks in reqresp_parser.Walter Doekes
Nick Lewis added them in https://reviewboard.asterisk.org/r/549/diff/1-2/ for no apparent reason. There is no way that params could become NULL in that piece of code, so I removed these excess checks again. ........ Merged revisions 344837 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344839 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344840 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-03Make room for the fax detect flagsTerry Wilson
The original REGISTERTRYING flag, in addition to being impossible to check, also encroached on the space for the flag above it. This patch moves the flags that were below REGISTERTRYING back to where they were as though we had just removed the REGISTERTRYING option. ........ Merged revisions 343276 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 343277 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343278 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-31Fixed invalid memory access when adding extension to pattern match treeMatthew Jordan
When an extension is removed from a context, its entry in the pattern match tree is not deleted. Instead, the extension is marked as deleted. When an extension is removed and re-added, if that extension is also a prefix of another extension, several log messages would report an error and did not check whether or not the extension was deleted before accessing the memory. Additionally, if the extension was already in the tree but previously deleted, and the pattern was at the end of a match, the findonly flag was not honored and the extension would be erroneously undeleted. Additionaly, it was discovered that an IAX2 peer could be unregistered via the CLI, while at the same time it could be scheduled for unregistration by Asterisk. The unregistration method now checks to see if the peer was already unregistered before continuing with an unregistration. (closes issue ASTERISK-18135) Reported by: Jaco Kroon, Henry Fernandes, Kristijan Vrban Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1526 ........ Merged revisions 342769 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342770 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25Change D-channel warning to be less confusing on non-NFAS setups.Richard Mudgett
The "No D-channels available! Using Primary channel as D-channel anyway!" WARNING message has been confusing on non-NFAS setups. The message refers to things that are NFAS specific. * Changed the warning to several different warnings to be more accurate for the situation and less confusing as a result: "No D-channels up! Switching selected D-channel from X to Y.", "No D-channels up!", and "D-channel is down!". ........ Merged revisions 342484 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342485 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342486 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-19Outgoing calls with Google VoicePaul Belanger
Google has recently make some changes (again) to their protocol. Rather then patching asterisk to flip between the two different methods, we now allow both. Lets hope this keeps Google Voice happy for a while. (closes issue ASTERISK-18714) Reported by: Iordan Iordanov Patches: chan_gtalk.patch uploaded by Iordan Iordanov (licenses 6311) ........ Merged revisions 341435 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 341436 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341437 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-14Fix simple switch to not progress a call when call already progressed.Damien Wedhorn
If a simple switch was started on a device and then a specific call made (such as redial or speed dial), on timeout of the simple switch the call would be attempted again. This patch only allows the simple switch to make a call if the substate is still in the collecting digits mode. Also added small debug message to dialAndAactivate sub. Tested by snuff and myself. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340973 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-12Initialize the PRI channel alarms properly on startup.Richard Mudgett
The PRI channel alarms were initialized with an inverted sense. (closes issue ASTERISK-18710) Reported by: Tzafrir Cohen ........ Merged revisions 340522 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340523 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340524 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-11Add protection for SS7 channel allocation and better glare handling.Richard Mudgett
* Added a CLI "ss7 show channels" command that might prove useful for future debugging. * Made the incoming SS7 channel event check and gripe message uniform. * Made sure that the DNID string for an incoming call is always initialized. (issue ASTERISK-17966) Reported by: Kenneth Van Velthoven Patches: jira_asterisk_17966_v1.8_glare.patch (license #5621) patch uploaded by rmudgett ........ Merged revisions 340365 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340366 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340367 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-10Add skinny version 17 protocol support.Damien Wedhorn
Added some data to skinny packet structures to make compatible with v17. Added protocolversion to device, set on registration based on the version provided by device. v17 includes some increased ip space for ip6. This patch increases ip space in the packets but still only uses ip4. Some packet structures duplicated (ip4 and ip6 types). ip4 type used unless version is greater or equal to 17. Tested by snuff and myself on 7961 with recent 8.5 firmware. Also tested compatible with old 7960 and older 30VIPs. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-10Increase SKINNY_MAX_PACKET and add some logging.Damien Wedhorn
Increase SKINNY_MAX_PACKET to 2000 bytes to handle some messages in v17 that are greater than the old 1000 bytes. Also add some useful logging regarding packet and session handling. A device (with protocol v17) was sending a packet with length greater than 1000 which resulted in the TCP session being destroyed and registration being retryed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-09Merged revisions 340031 via svnmerge from Damien Wedhorn
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r340031 | wedhorn | 2011-10-10 09:18:27 +1100 (Mon, 10 Oct 2011) | 8 lines Return -1 to skinny_session if register rejected. If device registration is rejected, return -1 so that the session is destroyed immediately. Previously, a segfault would occur on a graceful shutdown if a register is rejected and the skinny_session has not yet timed out. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-09Merged revisions 339992 via svnmerge from Damien Wedhorn
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r339992 | wedhorn | 2011-10-10 08:09:12 +1100 (Mon, 10 Oct 2011) | 9 lines Remove log message on traverse session list. On destroying a session, a list of sessions is traversed to find the matching session. For each session not matching, skinny erroneously logged that the session was not matched. While technically correct the message was misleading, and tended to indicate errors that were not there. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339993 65c4cc65-6c06-0410-ace0-fbb531ad65f3