summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
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
2012-01-14Multiple revisions 350788-350789Kevin P. Fleming
........ r350788 | kpfleming | 2012-01-14 09:22:33 -0600 (Sat, 14 Jan 2012) | 8 lines Ensure that two prerequisites are properly installed on Debian-style distributions. * Don't specify a specific version of libgmime; newer versions are available now and acceptable. * Install libsrtp so that res_srtp can be built. ........ r350789 | kpfleming | 2012-01-14 09:23:32 -0600 (Sat, 14 Jan 2012) | 3 lines Correct some 'set-but-not-used' variable warnings. ........ Merged revisions 350788-350789 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350790 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13Set port to a default sane value if a bogus one is provided when parsing ↵Mark Michelson
hostnames. ........ Merged revisions 350679 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350680 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13Fix crash from bridge channel hangup race condition in ConfBridgeMatthew Jordan
This patch addresses two issues in ConfBridge and the channel bridge layer: 1. It fixes a race condition wherein the bridge channel could be hung up 2. It removes the deadlock avoidance from the bridging layer and makes the bridge_pvt an ao2 ref counted object Patch by David Vossel (mjordan was merely the commit monkey) (issue ASTERISK-18988) (closes issue ASTERISK-18885) Reported by: Dmitry Melekhov Tested by: Matt Jordan Patches: chan_bridge_cleanup_v.diff uploaded by David Vossel (license 5628) (closes issue ASTERISK-19100) Reported by: Matt Jordan Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1654/ ........ Merged revisions 350550 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Fix joinable thread terminating without joiner memory leak in chan_iax.c.Richard Mudgett
The iax2_process_thread() can exit without anyone waiting to join the thread. If noone is waiting to join the thread then a large memory leak occurs. * Made iax2_process_thread() deatach itself if nobody is waiting to join the thread. (closes issue ASTERISK-17339) Reported by: Tzafrir Cohen Patches: asterisk-1.8.4.4-chan_iax2-detach-thread-on-non-stop-exit.patch (license #5617) patch uploaded by Alex Villacis Lasso (modified) (closes issue ASTERISK-17825) Reported by: wangjin ........ Merged revisions 350220 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 350221 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-06Don't leak CID in From header when presentation=unavailableTerry Wilson
When someone does Set(CALLERPRES()=unavailable) (or Set(CALLERID(pres)=unavailable)) when sendrpid=no, the From header shows "Anonymous" <anonymous@anonymous.invalid>. When sendrpid=yes/pai, the From header will still display the callerid info, even though we supply an rpid header with the anonymous info. It seems like we shouldn't leak that info in any case. Skimming http://tools.ietf.org/html/draft-ietf-sip-privacy-04 seems to indicate that one shouldn't send identifying info in the From in this case. This patch anonymizes the From header as well even when sendrpid=yes/pai. (closes issue ASTERISK-16538) Review: https://reviewboard.asterisk.org/r/1649/ ........ Merged revisions 349968 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349977 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-04Fix segfault in chan_dahdi for CHANNEL(dahdi_span) evaluation on hangup.Richard Mudgett
* Added NULL private pointer checks in the following chan_dahdi channel callbacks: dahdi_func_read(), dahdi_func_write(), dahdi_setoption(), and dahdi_queryoption(). (closes issue ASTERISK-19142) Reported by: Diego Aguirre Tested by: rmudgett ........ Merged revisions 349558 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349559 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-04Adds Subscription-State header to notify with call completion. per RFC3265Jonathan Rose
(Closes issue ASTERISK-17953) Reported by: George Konopacki Patches: 19400.patch uploaded by mmichelson (license 5049) ........ Merged revisions 349482 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349502 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-31Fix some minor formatting issues based on coding guidelines.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-31Constify tag argument in REF_DEBUG related code.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23INFO/Record request configurable to use dynamic featuresJonathan Rose
Adds two new options to SIP peers allowing them to specify features (dynamic or builtin) to use when sending INFO/record requests. Recordonfeature activates whatever feature is specified when recieving a record: on request while recordofffeature activates whatever feature is specified when receiving a record: off request. Both of these features can be disabled by setting the feature to an empty string. (closes issue ASTERISK-16507) Reported by: Jon Bright Review: https://reviewboard.asterisk.org/r/1634/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23chan_sip autocreatepeer=persist option for auto-created peers to survive reloadJonathan Rose
This patch moves destruction of sip peers to immediately after the general section of sip.conf is read so that autocreatepeer setting can be read before deletion of peers. If autocreatepeer=persist at reload, then peers created by the autocreatepeer setting will be skipped when purging the current SIP peer list. (closes ASTERISK-16508) Reported by: Kirill Katsnelson Patches: 017797-kkm-persist-autopeers-1.8.patch uploaded by Kirill Katsnelson (license 5845) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23Fix extension state callback references in chan_sip.Richard Mudgett
Chan_sip gives a dialog reference to the extension state callback and assumes that when ast_extension_state_del() returns, the callback cannot happen anymore. Chan_sip then reduces the dialog reference count associated with the callback. Recent changes (ASTERISK-17760) have resulted in the potential for the callback to happen after ast_extension_state_del() has returned. For chan_sip, this could be very bad because the dialog pointer could have already been destroyed. * Added ast_extension_state_add_destroy() so chan_sip can account for the sip_pvt reference given to the extension state callback when the extension state callback is deleted. * Fix pbx.c awkward statecbs handling in ast_extension_state_add_destroy() and handle_statechange() now that the struct ast_state_cb has a destructor to call. * Ensure that ast_extension_state_add_destroy() will never return -1 or 0 for a successful registration. * Fixed pbx.c statecbs_cmp() to compare the correct information. The passed in value to compare is a change_cb function pointer not an object pointer. * Make pbx.c ast_merge_contexts_and_delete() not perform callbacks with AST_EXTENSION_REMOVED with locks held. Chan_sip is notorious for deadlocking when those locks are held during the callback. * Removed unused lock declaration for the pbx.c store_hints list. (closes issue ASTERISK-18844) Reported by: rmudgett Review: https://reviewboard.asterisk.org/r/1635/ ........ Merged revisions 348940 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348952 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-22Fix segfault on answer.Damien Wedhorn
Only update/change RTP source if RTP has already been started and connected to the subchannel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-20Fix chan_iax2 to not report an RDNIS number if it is blank.Richard Mudgett
Some ISDN switches complain or block the call if the RDNIS number is empty. * Made chan_iax2 not save a RDNIS number into the ast_channel if the string is blank. This is what other channel drivers do. (closes issue ASTERISK-17152) Reported by: rmudgett ........ Merged revisions 348735 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348736 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-13Fix possible misshandling of an incoming SIP response as a peer poke response.Stefan Schmidt
Also make sure peer has even qualify enabled when handle a peer poke response. (closes issue ASTERISK-18940) Reported by: Vitaliy Tested by: Vitaliy and UnixDev Review: https://reviewboard.asterisk.org/r/1620 Reviewed by: David Vossel ........ Merged revisions 348048 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348056 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08Fix regression when using tcpenable=no and tlsenable=yes.Walter Doekes
The tlsenable settings are tucked away in main/tcptls.c, so I missed them when resolving ASTERISK-18837. This should resolve the test suite breakage of the sip tls tests. Review: https://reviewboard.asterisk.org/r/1615 Reviewed by: Matt Jordan ........ Merged revisions 347718 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347727 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08Don't crash on INFO automon request with no channelTerry Wilson
AST-2011-014. When automon was enabled in features.conf, it was possible to crash Asterisk by sending an INFO request if no channel had been created yet. (closes issue ASTERISK-18805) ........ Merged revisions 347530 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2 ........ Merged revisions 347531 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347532 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08Fix segfault on answer.Damien Wedhorn
Fix a segfault if an attempt to answer a call is made between when the inbound call gives up (and the channel is removed) and when the device is notified and removes the call from the device. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06Make SIP INFO messages for dtmf-relay signals case insensitive.Richard Mudgett
(closes issue ASTERISK-18924) Reported by: Kevin Taylor ........ Merged revisions 347292 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347293 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06Don't allow transport=tcp when tcpenable=no.Walter Doekes
When tcpenable=no, sending to transport=tcp hosts was still allowed. Resolving the source address wasn't possible and yielded the string "(null)" in SIP messages. Fixed that and a couple of not-so-correct log messages. (closes issue ASTERISK-18837) Reported by: Andreas Topp Review: https://reviewboard.asterisk.org/r/1585 Reviewed by: Matt Jordan ........ Merged revisions 347166 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347167 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06Fixed crash from orphaned MWI subscriptions in chan_sipMatthew Jordan
This patch resolves the issue where MWI subscriptions are orphaned by subsequent SIP SUBSCRIBE messages. When a peer is removed, either by pruning realtime SIP peers or by unloading / loading chan_sip, the MWI subscriptions that were orphaned would still be on the event engine list of valid subscriptions but have a pointer to a peer that no longer was valid. When an MWI event would occur, this would cause a seg fault. (closes issue ASTERISK-18663) Reported by: Ross Beer Tested by: Ross Beer, Matt Jordan Patches: blf_mwi_diff_12_06_11.txt uploaded by Matt Jordan (license 6283) Review: https://reviewboard.asterisk.org/r/1610/ ........ Merged revisions 347058 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347068 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-05Restore call progress code for analog ports.Richard Mudgett
Extracting sig_analog from chan_dahdi lost call progress detection functionality. * Fix analog ports from considering a call answered immediately after dialing has completed if the callprogress option is enabled. (closes issue ASTERISK-18841) Reported by: Richard Miller Patches: chan_dahdi.diff (license #5685) patch uploaded by Richard Miller (Modified by me) sig_analog.c.diff (license #5685) patch uploaded by Richard Miller (Modified by me) sig_analog.h.diff (license #5685) patch uploaded by Richard Miller ........ Merged revisions 347006 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 347007 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-04For SIP REGISTER fix domain-only URIs and domain ACL bypass.Walter Doekes
The code that allowed admins to create users with domain-only uri's had stopped to work in 1.8 because of the reqresp parser rewrites. This is fixed now: if you have a [mydomain.com] sip user, you can register with useraddr sip:mydomain.com. Note that in that case -- if you're using domain ACLs (a configured domain list) -- mydomain.com must be in the allow list as well. Reviewboard r1606 shows a list of registration combinations and which SIP response codes are returned. Review: https://reviewboard.asterisk.org/r/1533/ Reviewed by: Terry Wilson (closes issue ASTERISK-18389) (closes issue ASTERISK-18741) ........ Merged revisions 346899 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346900 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-02Update SIP MESSAGE To parsing to correctly handle URIMatthew Jordan
The previous patch (r346040) incorrectly parsed the URI in the presence of a port, e.g., user@hostname:port would fail as the port would be double appended to the SIP message. This patch uses the parse_uri function to correctly parse the URI into its username and hostname parts, and places them in the correct fields in the sip_pvt structure. (issue ASTERISK-18903) Review: https://reviewboard.asterisk.org/r/1597/ ........ Merged revisions 346856 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-02Merged revisions 346763 via svnmerge from Alexandr Anikin
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r346763 | may | 2011-12-02 20:42:32 +0400 (Fri, 02 Dec 2011) | 14 lines Merged revisions 346762 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r346762 | may | 2011-12-02 20:19:19 +0400 (Fri, 02 Dec 2011) | 7 lines process null frame pointer returned by ast_rtp_instance_read correctly (closes issue ASTERISK-16697) Reported by: under Patches: segfault.diff (License #5871) patch uploaded by under ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-01Change 183 Ringing in sipfrag body to 180 ringing. 183 Ringing isn't even a ↵Jonathan Rose
thing. 183 is actually a session progress message. (closes issue ASTERISK-18925) Reported by: Sebastian Denz Tested by: jrose Patches: asterisk18-use_180_instead_of_183_in_sipfrag.diff by Sebastian Denz (License #6139) ........ Merged revisions 346697 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 346698 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30Remove the few places where we try to ast_verbose() without a newline.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346655 65c4cc65-6c06-0410-ace0-fbb531ad65f3