summaryrefslogtreecommitdiff
path: root/channels/sip
AgeCommit message (Collapse)Author
2012-06-15Allow chan_sip to decline unwanted media streamsKinsey Moore
This change replaces the static array of four representable media streams with an AST_LIST so that chan_sip can keep track of offered media streams. This allows chan_sip to deal with offers containing multiple same-type streams and many other situations without rejecting the SDP offer in its entirety, yet still generating a valid response. This also covers cases where Asterisk can not comprehend the offer if it is in the correct format. Previously, chan_sip would reject SDP offers or entirely ignore individual stream offers in an effort to be more compatible which would often result in invalid SDP responses. Review: https://reviewboard.asterisk.org/r/1988/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11Fix coverity UNUSED_VALUE findings in core support level filesKinsey Moore
Most of these were just saving returned values without using them and in some cases the variable being saved to could be removed as well. (issue ASTERISK-19672) ........ Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04Merge changes dealing with support for Digium phones.Mark Michelson
Presence support has been added. This is accomplished by allowing for presence hints in addition to device state hints. A dialplan function called PRESENCE_STATE has been added to allow for setting and reading presence. Presence can be transmitted to Digium phones using custom XML elements in a PIDF presence document. Voicemail has new APIs that allow for moving, removing, forwarding, and playing messages. Messages have had a new unique message ID added to them so that the APIs will work reliably. The state of a voicemail mailbox can be obtained using an API that allows one to get a snapshot of the mailbox. A voicemail Dialplan App called VoiceMailPlayMsg has been added to be able to play back a specific message. Configuration hooks have been added. Configuration hooks allow for a piece of code to be executed when a specific configuration file is loaded by a specific module. This is useful for modules that are dependent on the configuration of other modules. chan_sip now has a public method that allows for a custom SIP INFO request to be sent mid-dialog. Digium phones use this in order to display progress bars when files are played. Messaging support has been expanded a bit. The main visible difference is the addition of an AMI action MessageSend. Finally, a ParkingLots manager action has been added in order to get a list of parking lots. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01Help mitigate potential reinvite glare scenarios.Mark Michelson
When Asterisk servers are set up back-to-back, and direct media is to be used betweeen endpoints, it is fairly common for the two Asterisk servers to send direct media reinvites to each other simultaneously. This results in 491s and ACKs being exchanged between the servers. While the media eventually gets set up properly, the problem is that there can be a noticeable delay for the streams to stabilize. This patch adds a new directmedia option called "outgoing". With this set, an immediate direct media reinvite will only be sent if the call direction is outgoing. For incoming dialogs, an immediate direct media reinvite will not be sent, but further "reactionary" direct media reinvites may be sent. Review: https://reviewboard.asterisk.org/r/1954 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-23Re-add LastMsgsSent value for SIP peersMatthew Jordan
Previously, MWI logic utilized a counter called 'lastmsgssent' to know whether or not MWI NOTIFY requests had been sent to a specific peer. When MWI notifications were changed to use the internal event framework, this value was no longer needed for its original purpose. Hence, it was no longer updated with the new/old message counts for a peer. The value was previously removed for Asterisk 10; however, since it was still present in Asterisk 1.8 and still useful for reporting purposes, it was decided to re-add the value. This patch re-adds the 'LastMsgsSent' field in the response to an AMI/CLI 'sip show peer [peer]' command, and makes it so that the value of lastmsgssent is updated appropriately. The value should now display the new/old message counts for a particular peer. (closes issue ASTERISK-17866) Reported by: Steve Davies patches by: ast-17866-rb1272.patch (License #5041 by irroot) Modified slightly for this commit Review: https://reviewboard.asterisk.org/r/1939 ........ Merged revisions 367362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367369 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18Fix a variety of memory leaksMatthew Jordan
This patch addresses a number of memory leaks in a variety of modules that were found by a static analysis tool. A brief summary of the changes: * app_minivm: free ast_str objects on off nominal paths * app_page: free the ast_dial object if the requested channel technology cannot be appended to the dialing structure * app_queue: if a penalty rule failed to match any existing rule list names, the created rule would not be inserted and its memory would be leaked * app_read: dispose of the created silence detector in the presence of off nominal circumstances * app_voicemail: dispose of an allocated unique ID field for MWI event un-subscribe requests in off nominal paths; dispose of configuration objects when using the secret.conf option * chan_dahdi: dispose of the allocated frame produced by ast_dsp_process * chan_iax2: properly unref peer in CLI command "iax2 unregister" * chan_sip: dispose of the allocated frame produced by sip_rtp_read's call of ast_dsp_process; free memory in parse unit tests * func_dialgroup: properly deref ao2 object grhead in nominal path of dialgroup_read * func_odbc: free resultset in off nominal paths of odbc_read * cli: free match_list in off nominal paths of CLI match completion * config: free comment_buffer/list_buffer when configuration file load is unchanged; free the same buffers any time they were created and config files were processed * data: free XML nodes in various places * enum: free context buffer in off nominal paths * features: free ast_call_feature in off nominal paths of applicationmap config processing * netsock2: users of ast_sockaddr_resolve pass in an ast_sockaddr struct that is allocated by the method. Failures in ast_sockaddr_resolve could result in the users of the method not knowing whether or not the buffer was allocated. The method will now not allocate the ast_sockaddr struct if it will return failure. * pbx: cleanup hash table traversals in off nominal paths; free ignore pattern buffer if it already exists for the specified context * xmldoc: cleanup various nodes when we no longer need them * main/editline: various cleanup of pointers not being freed before being assigned to other memory, cleanup along off nominal paths * menuselect/mxml: cleanup of value buffer for an attribute when that attribute did not specify a value * res_calendar*: responses are allocated via the various *_request method returns and should not be allocated in the various write_event methods; ensure attendee buffer is freed if no data exists in the parsed node; ensure that calendar objects are de-ref'd appropriately * res_jabber: free buffer in off nominal path * res_musiconhold: close the DIR* object in off nominal paths * res_rtp_asterisk: if we run out of ports, close the rtp socket object and free the rtp object * res_srtp: if we fail to create the session in libsrtp, destroy the temporary ast_srtp object (issue ASTERISK-19665) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1922 ........ Merged revisions 366880 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366881 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18chan_sip: Fix a small TEST_FRAMEWORK related error that prevents compilingJonathan Rose
Introduced with r366842, a function call made only with TEST_FRAMEWORK enabled was missing an argument since the function arguments were changed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18Reorder and renumber tests appropriatelyKinsey Moore
It appears that a patch did not apply properly when adding tests 12 and 13 and test 11 was duplicated. These tests have been reordered and renumbered such that they make sense. ........ Merged revisions 366882 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366884 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-17logger: Adds additional support for call id logging and chan_sip specific stuffJonathan Rose
This patch improves the handling of call id logging significantly with regard to transfers and adding APIs to better handle specific aspects of logging. Also, changes have been made to chan_sip in order to better handle the creation of callids and to enable the monitor thread to bind itself to a particular call id when a dialog is determined to be related to a callid. It then unbinds itself before returning to normal monitoring. review: https://reviewboard.asterisk.org/r/1886/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Resolve FORWARD_NULL static analysis warningsKinsey Moore
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20, 22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111, and 115. Finding numbers 26, 33, and 29 were already resolved. Those skipped were either extended/deprecated or in areas of code that shouldn't be disturbed. (Closes issue ASTERISK-19650) ........ Merged revisions 366167 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366168 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04Fix many issues from the NULL_RETURNS Coverity reportKinsey Moore
Most of the changes here are trivial NULL checks. There are a couple optimizations to remove the need to check for NULL and outboundproxy parsing in chan_sip.c was rewritten to avoid use of strtok. Additionally, a bug was found and fixed with the parsing of outboundproxy when "outboundproxy=," was set. (Closes issue ASTERISK-19654) ........ Merged revisions 365398 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 365399 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28Add support for lightweight NAT keepalive.Joshua Colp
If enabled using the keepalive option in sip.conf a small packet will be sent at a regular interval to keep the NAT mapping open. This is lightweight as the remote side does not need to parse and handle a SIP message. (closes issue AST-783) Review: https://reviewboard.asterisk.org/r/1756/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-16Add IPv6 address support to security events framework.Michael L. Young
The current Security Events Framework API only supports IPv4 when it comes to generating security events. This patch does the following: * Changes the Security Events Framework API to support IPV6 and updates the components that use this API. * Eliminates an error message that was being generated since the current implementation was treating an IPv6 socket address as if it was IPv4. * Some copyright dates were updated on files touched by this patch. (closes issue ASTERISK-19447) Reported by: Michael L. Young Tested by: Michael L. Young Patches: security_events_ipv6v3.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/1777/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-16Missed lastinvite CSeq int to uint32_t changeAlec L Davis
from Review: https://reviewboard.asterisk.org/r/1699/ ........ Merged revisions 359809 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359810 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28Add a security event for the case where fake authentication challenge is sent.Mark Michelson
........ Merged revisions 357318 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Adds an option to sip.conf that prevents diversion headers from being added.Jonathan Rose
send_diversion=no will prevent Diversion headers from being added to SIP requests. This doesn't prevent Diversion from being added with dialplan such as with SIPAddHeader. (closes issue ASTERISK-16862) Reported by: rsw686 Review: https://reviewboard.asterisk.org/r/1769/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Fix worker thread resource leak in SIP TCP/TLS.Richard Mudgett
The SIP TCP/TLS worker threads were created joinable but noone could join them if they died on their own. * Fix the SIP TCP/TLS worker threads to not be created joinable. * _sip_tcp_helper_thread() only needs one parameter since the pvt parameter is only passed in as NULL and never used. (closes issue ASTERISK-19203) Reported by: Steve Davies Review: https://reviewboard.asterisk.org/r/1714/ ........ Merged revisions 356677 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356690 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Allow SRTP policies to be reloadedMatthew Jordan
Currently, when using res_srtp, once the SRTP policy has been added to the current session the policy is locked into place. Any attempt to replace an existing policy, which would be needed if the remote endpoint negotiated a new cryptographic key, is instead rejected in res_srtp. This happens in particular in transfer scenarios, where the endpoint that Asterisk is communicating with changes but uses the same RTP session. This patch modifies res_srtp to allow remote and local policies to be reloaded in the underlying SRTP library. From the perspective of users of the SRTP API, the only change is that the adding of remote and local policies are now added in a single method call, whereas they previously were added separately. This was changed to account for the differences in handling remote and local policies in libsrtp. Review: https://reviewboard.asterisk.org/r/1741/ (closes issue ASTERISK-19253) Reported by: Thomas Arimont Tested by: Thomas Arimont Patches: srtp_renew_keys_2012_02_22.diff uploaded by Matt Jordan (license 6283) (with some small modifications for this check-in) ........ Merged revisions 356604 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09Add auto_force_rport and auto_comedia NAT optionsTerry Wilson
This patch adds the auto_force_rport and auto_comedia NAT options. It also converts the nat= setting to a list of comma-separated combinable options: no, force_rport, comedia, auto_force_rport, and auto_comedia. nat=yes remains as an undocumented option equal to "force_rport,comedia". The first instance of 'yes' or 'no' in the list stops parsing and overrides any previously set options. If an auto_* option is specified with its non-auto_ counterpart, the auto setting takes precedence. This patch builds upon the patch posted to ASTERISK-17860 by JIRA user pedro-garcia. (closes issue ASTERISK-17860) Review: https://reviewboard.asterisk.org/r/1698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Add callbackextension matching & realtime callbackextensionsTerry Wilson
This patch is based on the one by David Vossel, developer extrodinaire, at https://reviewboard.asterisk.org/r/344/. If multiple peers are defined with the same host/port, but differing callbackextensions, it chooses the peer with the matching callbackextension. Since callbackextension creates an outbound registration with the callbackextension as the Contact address, matching an incoming request by that (in addition to the host/port) makes a lot of sense. This patch also adds support for callbackextension to realtime by querying all peers with callbackextensions on reload and adding registrations for them. (closes issue ASTERISK-13456) Review: https://reviewboard.asterisk.org/r/344/ Review: https://reviewboard.asterisk.org/r/1717/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30Merged revisions 353321 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r353321 | alecdavis | 2012-01-31 11:16:22 +1300 (Tue, 31 Jan 2012) | 25 lines Merged revisions 353320 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r353320 | alecdavis | 2012-01-31 10:57:49 +1300 (Tue, 31 Jan 2012) | 18 lines RFC3261 Section 8.1.1.5. The sequence number value MUST be expressible as a 32-bit unsigned integer * fix: use %u instead of %d when dealing with CSeq numbers - to remove possibility of -ve numbers. * fix: change all uses of seqno and friends (ocseq icseq) from 'int' or 'unsigned int' to uint32_t. Summary of CSeq numbers. An initial CSeq number must be less than 2^31 A CSeq number can increase in value up to 2^32-1 An incrementing CSeq number must not wrap around to 0. Tested with Asterisk 1.8.8.2 with Grandstream phones. alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1699/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Merged revisions 352863 via svnmerge from Alec L Davis
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r352863 | alecdavis | 2012-01-27 13:08:03 +1300 (Fri, 27 Jan 2012) | 19 lines Merged revisions 352862 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r352862 | alecdavis | 2012-01-27 13:05:30 +1300 (Fri, 27 Jan 2012) | 12 lines rfc4235 - Section 4.1: Versions MUST be representable using a non-negative 32 bit integer. If a BLF subscription exists for long enough, using %d may print negative version numbers. Unlikely, as 2^32 at 1 update per second is ~137 years, or half that before the versions number started going negative. Tested with Asterisk 1.8.8.2 with Grandstream phones. alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1694/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-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-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-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
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-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-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-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-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-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-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-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-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-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-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
2011-08-16Merged revisions 332042 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r332042 | mnicholson | 2011-08-16 10:20:48 -0500 (Tue, 16 Aug 2011) | 2 lines fix a code comment AST-580 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-16Merged revisions 332027 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r332027 | mnicholson | 2011-08-16 10:08:40 -0500 (Tue, 16 Aug 2011) | 9 lines Merged revisions 332026 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332026 | mnicholson | 2011-08-16 10:06:31 -0500 (Tue, 16 Aug 2011) | 2 lines use DEFAULT_STORE_SIP_CAUSE to set the default value for the 'storesipcause' option AST-580 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25Remove lastmsgssent from sip it has not been working since 1.6Gregory Nietsky
Clean up the return values to be consistant not currently used Add doxygen returns MWI Event is sent on Register (closes issue ASTERISK-17866) Reported by: one47 Tested by: irroot, mvanbaak Review: https://reviewboard.asterisk.org/r/1172/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05Merged revisions 326291 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r326291 | rmudgett | 2011-07-05 12:22:59 -0500 (Tue, 05 Jul 2011) | 23 lines Used auth= parameter freed during "sip reload" causes crash. If you use the auth= parameter and do a "sip reload" while there is an ongoing call. The peer->auth data points to free'd memory. The patch does several things: 1) Puts the authentication list into an ao2 object for reference counting to fix the reported crash during a SIP reload. 2) Converts the authentication list from open coding to AST list macros. 3) Adds display of the global authentication list in "sip show settings". (closes issue ASTERISK-17939) Reported by: wdoekes Patches: jira_asterisk_17939_v1.8.patch (license #5621) patch uploaded by rmudgett Review: https://reviewboard.asterisk.org/r/1303/ JIRA SWP-3526 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-29Merged revisions 325740 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r325740 | kmoore | 2011-06-29 16:49:21 -0500 (Wed, 29 Jun 2011) | 7 lines chan_sip: cleanup from the introduction of ast_str Remove the length field from sip_req and sip_pkt in chan_sip since they are redundant (ast_str holds its own length) and refactor the necessary functions. Review: https://reviewboard.asterisk.org/r/1281/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23Merged revisions 324685 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r324685 | dvossel | 2011-06-23 13:31:00 -0500 (Thu, 23 Jun 2011) | 8 lines Fixes sip crash when calling remove_uri_parameters with NULL AST-2011-009 (closes issue ASTERISK-18017) Reported by: jaredmauch ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-13Addition of "outofcall_message_context" sip.conf option.David Vossel
Review: https://reviewboard.asterisk.org/r/1265/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323212 65c4cc65-6c06-0410-ace0-fbb531ad65f3