summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
AgeCommit message (Collapse)Author
2012-09-04Fix issue where SIP devices were not notified when custom devices changed to ↵Mark Michelson
"ringing". The problem had to do with logic used when checking for what the oldest ringing channel was. The problem was that if no channel was found, then no notification would be sent. For custom device states, there is no associated channel, so no notification would get sent. This fixes the issue by still sending the notification even if no associated channel can be found for a ringing device state change. (closes issue ASTERISK-20297) Reported by Noah Engelberth ........ Merged revisions 372137 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30Clean up doxygen warningsMatthew Jordan
This patch fixes numerous doxygen warnings across Asterisk. It also updates the makefile to regenerate the doxygen configuration on the local system before running doxygen to help prevent warnings/errors on the local system. Much thanks to Andrew for tackling one of the Asterisk janitor projects! (issue ASTERISK-20259) Reported by: Andrew Latham Patches: doxygen_partial.diff uploaded by Andrew Latham (license 5985) make_progdocs.diff uploaded by Andrew Latham (license 5985) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29chan_sip: Change manager event to confirm SIPqualifypeer into an ackJonathan Rose
Matt Jordan informed me that it was more appropriate to use an astman_send_ack here instead of making an event response. I've also used this opportunity to update UPGRADE.txt to mention this change in behavior. (issue AST-969) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29chan_sip: Send 408 on retransmit timeout instead of 603Jonathan Rose
(closes issue ASTERISK-20124) Reported by: Walter Doekes ........ Merged revisions 371824 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371825 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371845 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-29chan_sip: Send a manager event to confirm SIPqualifypeer completesJonathan Rose
Prior to this patch, Issuing SIPqualifypeer either resulted in an error or if it succeeded, a few \r\ns. This patch adds a SIPqualifypeerComplete event issued as a response when the command is successfully executed. (closes issue AST-969) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-21Fix misuses of asprintf throughout the code.Mark Michelson
This fixes three main issues * Change asprintf() uses to ast_asprintf() so that it pairs properly with ast_free() and no longer causes MALLOC_DEBUG to freak out. * When ast_asprintf() fails, set the pointer NULL if it will be referenced later. * Fix some memory leaks that were spotted while taking care of the first two points. (Closes issue ASTERISK-20135) reported by Richard Mudgett Review: https://reviewboard.asterisk.org/r/2071 ........ Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371592 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-17When a peer registers using WebSocket do not resolve the Contact provided.Joshua Colp
(closes issue ASTERISK-20238) Reported by: james.mortensen ........ Merged revisions 371482 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16chan_sip: Use pvt outgoing_call variable to set Remote-Party-ID HeaderJonathan Rose
Previously the pvt SIP_OUTGOING flag was used instead, which will frequently flip during reinvites. (closes issue AST-897) Reported by: Thomas Arimont ........ Merged revisions 371357 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371358 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371382 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16chan_sip: Trigger reinvite if the SDP answer is included in the SIP ACKJonathan Rose
Under certain conditions, a SIP transaction involving directmedia wouldn't trigger a re-invite because the SDP answer was included in an ACK instead of in a message that we would have triggered the invite with. This patch just queues a source change control frame if the dialog is using directmedia when we find sdp for an ACK. (closes issue AST-913) Reported by: Thomas Arimont ........ Merged revisions 371337 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371338 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371355 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15Fix Segfault When Registering SIP Over WebSocketsMichael L. Young
The helper function, get_address_family_filter, in chan_sip for dns resolution by address family was not recognizing the websockets transport and resulting in a null pointer being sent to functions in netsock2, in an attempt to determine if we are bound to ANY address ([::]) or not. This patch fixes this issue by handling the transport types SIP_TRANSPORT_WS and SIP_TRANSPORT_WSS which results in a sock address being set properly for use in determining the address family. (closes issue ASTERISK-20221) Reported by: Sven Beisiegel Tested by: Sven Beisiegel, James Mortensen Patches: asterisk-20221-ws-family-filter.diff uploaded by Michael L. Young (license 5026) ........ Merged revisions 371295 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15Avoid unconditional NULLing of mwipvt on relatedpeer on SIP dialog destructionKinsey Moore
The other instance of this bug was fixed by jcolp/file in r121496. If we are destroying a dialog only set the MWI dialog pointer on the related peer to NULL if it is the dialog currently being destroyed. (closes issue ASTERISK-20119) Patch-by: Misha Vodsedalek ........ Merged revisions 371270 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371271 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371272 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-15Add HANGUPCAUSE information to callee channelsKinsey Moore
This adds HANGUPCAUSE information to called channels so that hangup handlers can, in conjunction with predial dialplan execution, access the hangupcause information when the dialed channel hangs up on a one-to-one basis instead of a many-to-one basis as with HANGUPCAUSE usage on the caller channel. Review: https://reviewboard.asterisk.org/r/2069/ (closes issue ASTERISK-20198) ........ Merged revisions 371258 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-13Fix problem where incorrect pointer was checked for nullity.Mark Michelson
........ Merged revisions 371198 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371199 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371200 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10Add private representation of caller, connected and redirecting party ids.Richard Mudgett
This patch adds the feature "Private representation of caller, connected and redirecting party ids", as previously discussed with us (DATUS) and Digium. 1. Feature motivation Until now it is quite difficult to modify a party number or name which can only be seen by exactly one particular instantiated technology channel subscriber. One example where a modified party number or name on one channel is spread over several channels are supplementary services like call transfer or pickup. To implement these features Asterisk internally copies caller and connected ids from one channel to another. Another example are extension subscriptions. The monitoring entities (watchers) are notified of state changes and - if desired - of party numbers or names which represent the involving call parties. One major feature where a private representation of party names is essentially needed, i.e. where a party name shall be exclusively signaled to only one particular user, is a private user-specific name resolution for party numbers. A lookup in a private destination-dependent telephone book shall provide party names which cannot be seen by any other user at any time. 2. Feature Description This feature comes along with the implementation of additional private party id elements for caller id, connected id and redirecting ids inside Asterisk channels. The private party id elements can be read or set by the user using Asterisk dialplan functions. When a technology channel is initiating a call, receives an internal connected-line update event, or receives an internal redirecting update event, it merges the corresponding public id with the private id to create an effective party id. The effective party id is then used for protocol signaling. The channel technologies which initially support the private id representation with this patch are SIP (chan_sip), mISDN (chan_misdn) and PRI (chan_dahdi). Once a private name or number on a channel is set and (implicitly) made valid, it is generally used for any further protocol signaling until it is rewritten or invalidated. To simplify the invalidation of private ids all internally generated connected/redirecting update events and also all connected/redirecting update events which are generated by technology channels -- receiving regarding protocol information - automatically trigger the invalidation of private ids. If not using the private party id representation feature at all, i.e. if using only the 'regular' caller-id, connected and redirecting related functions, the current characteristic of Asterisk is not affected by the new extended functionality. 3. User interface Description To grant access to the private name and number representation from the Asterisk dialplan, the CALLERID, CONNECTEDLINE and REDIRECTING dialplan functions are extended by the following data types. The formats of these data types are equal to the corresponding regular 'non-private' already existing data types: CALLERID: priv-all priv-name priv-name-valid priv-name-charset priv-name-pres priv-num priv-num-valid priv-num-plan priv-num-pres priv-subaddr priv-subaddr-valid priv-subaddr-type priv-subaddr-odd priv-tag CONNECTEDLINE: priv-name priv-name-valid priv-name-pres priv-name-charset priv-num priv-num-valid priv-num-pres priv-num-plan priv-subaddr priv-subaddr-valid priv-subaddr-type priv-subaddr-odd priv-tag REDIRECTING: priv-orig-name priv-orig-name-valid priv-orig-name-pres priv-orig-name-charset priv-orig-num priv-orig-num-valid priv-orig-num-pres priv-orig-num-plan priv-orig-subaddr priv-orig-subaddr-valid priv-orig-subaddr-type priv-orig-subaddr-odd priv-orig-tag priv-from-name priv-from-name-valid priv-from-name-pres priv-from-name-charset priv-from-num priv-from-num-valid priv-from-num-pres priv-from-num-plan priv-from-subaddr priv-from-subaddr-valid priv-from-subaddr-type priv-from-subaddr-odd priv-from-tag priv-to-name priv-to-name-valid priv-to-name-pres priv-to-name-charset priv-to-num priv-to-num-valid priv-to-num-pres priv-to-num-plan priv-to-subaddr priv-to-subaddr-valid priv-to-subaddr-type priv-to-subaddr-odd priv-to-tag Reported by: Thomas Arimont Review: https://reviewboard.asterisk.org/r/2030/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-10Fix a comparison that was causing presence tests to fail.Mark Michelson
A recent change made it so that device state changes that were not actual "changes" would not get reported to subscribers. The problem was that this inadvertently blocked presence updates as well. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-09Extend extension state callbacks to have more information.Mark Michelson
Quote from review board: This patch extends the extension state callbacks so that monitoring channels (as chan_sip) get more information of the devices which are responsible for an extension state change. The additional information is needed by chan_sip to present names/numbers of the caller and callee in an early-state SIP notification. Users of extenstion state callback not interested in the additional information are not affected by the changes. Motivation: to present the involved party's name/number in an early-state nofification (used by the notified device as a pickup offer) one after another so that a user can see which call he will pick up in an undirected pickup. Such a pickup offer to a user shall indicate the same call (number/name-A calls number/name-B) as the call which would be picked up when an undirected pickup is executed. Users interested in additional state info must use the new functions ast_extension_state_add_extended() resp. ast_extension_state_add_destroy_extended() to register an extended state callback. When the callback is registered this way, an extra member device_state_info of struct ast_state_cb_info is passed to the callback in addition to the aggregated extension state. This container holds an object for every device of the monitored extension hint consisting of the device name, the device state and a channel reference to the channel which (presumably) caused the device state. The information is used by chan_sip for early-state notifications. When the state of a device changes and the new state contains AST_EVENT_RINGING, an early-state notification is sent to the subscribed devices with the caller/callee names/numbers of the oldest ringing channel of the monitored extension. The notified user may then invoke a direct pickup, which will pickup exactly this channel. Users of the old non-extended callbacks will only be called when the aggregated state did change (same behavior as before). Users of the extended callback will also be called when the state is unchanged but does contain AST_EVENT_RINGING. That could be the case if two channels are ringing at one device and one of them hangs up, so the aggregated state does not change. This way the monitoring channel can create a new early-state notification with the now ringing party-ids. Review: https://reviewboard.asterisk.org/r/2048 This contribution comes from Guenther Kelleter git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Reduce memory consumption significantly for users of the RTP engine API by ↵Joshua Colp
storing only the payloads present and in use instead of every possible one. Review: https://reviewboard.asterisk.org/r/2052/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-07Add named callgroups/pickupgroupsMatthew Jordan
This patch adds named calledgroups/pickupgroups to Asterisk. Named groups are implemented in parallel to the existing numbered callgroup/pickupgroup implementation. However, unlike the existing implementation, which is limited to a maximum of 64 defined groups, the number of defined groups allowed for named callgroups/pickupgroups is effectively unlimited. Named groups are configured with the keywords "namedcallgroup" and "namedpickupgroup". This corresponds to the numbered group definitions of "callgroup" and "pickupgroup". Note that as the implementation of named groups coexists with the existing numbered implementation, a defined named group of "4" does not equate to numbered group 4. Support for the named groups has been added to the SIP, DAHDI, and mISDN channel drivers. Review: https://reviewboard.asterisk.org/r/2043 Uploaded by: Guenther Kelleter(license #6372) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-06Improve debug message for temporary outbound proxies.Mark Michelson
Thanks to Paul Belanger for pointing this out. ........ Merged revisions 370797 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370798 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-03Multiple revisions 370769-370771Mark Michelson
........ r370769 | mmichelson | 2012-08-03 16:35:00 -0500 (Fri, 03 Aug 2012) | 24 lines Fix error in the "IPorHost" section of a SIP dialstring. This is based on the review request posted by Walter Doekes (referenced lower in the commit message) The main fix here is to treat the IPorHost portion of the dial string as a temporary outbound proxy. This ensures requests get sent to the proper location. Due to the age of the request, some parts were no longer relevant. For instance, the request moved outbound proxy parsing code into a single method. This is done in a previous commit, so it was not necessary to do again. Also, the review request fixed some errors with regards to request routing for CANCEL and ACK requests. This has also been fixed in more recent commits. (closes issue ASTERISK-19677) reported by Walter Doekes Review https://reviewboard.asterisk.org/r/1859 ........ r370770 | mmichelson | 2012-08-03 16:39:35 -0500 (Fri, 03 Aug 2012) | 3 lines Remove unused variable. ........ r370771 | mmichelson | 2012-08-03 16:43:52 -0500 (Fri, 03 Aug 2012) | 5 lines Seriously? Another compilation error fixed. Somebody beat me. ........ Merged revisions 370769-370771 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370772 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-02Fix regression from r370636Kinsey Moore
When the chan_sip cleanup went in, a typo was included that caused some subscriptions of non-Polycom phones to be limited to the same capabilities as Polycom phones. This resolves the failures in the test suite resulting from this regression. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Add headers from SIPAddHeader to outbound REFER requests.Mark Michelson
This is a patch from kkm from review board. This is useful for adding headers to REFER requests that emanate from a Transfer() dialplan application call. This also fixes some uses of the Referred-by header, removing an extra set of angle brackets. I've modified the reporter's original patch to not require any additions to the sip_refer header and to just remove the referred_by_name from sip_refer since it is no longer needed or used. (closes Issue ASTERISK-17639) reported by Kirill Katsnelson Patches: 019059-sip-refer-addheaders-trunk-353549.diff uploaded by Kirill Katsnelson (license #5845) Review: https://reviewboard.asterisk.org/r/1159 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Schedule pokes of registered SIP peers within a given timespan after SIP reloadMatthew Jordan
With a large number of SIP peers registered, performing a SIP reload causes a flood of SIP OPTIONS request packets. These are immediately sent out, and, as responses come back, can cause peers to be flagged as 'lagged' due to handling of the many response messages. This fix prevents this "packet storm" and schedules the pokes for a random time. That time varies between 1 ms and the peer's qualify time, or, if the qualify time is unknown, the global qualifyfreq setting. The committed patch has some very small modifications to the patch schmidts wrote for the review. (closes issue ASTERISK-19154) Reported by: Nicolo Mazzon patches: issue19154.patch license #6034 uploaded by schmidts Review: https://reviewboard.asterisk.org/r/1652 ........ Merged revisions 370666 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370672 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up chan_sipKinsey Moore
This clean up was broken out from https://reviewboard.asterisk.org/r/1976/ and addresses the following: - struct sip_refer converted to use the stringfields API. - sip_{refer|notify}_allocate -> sip_{notify|refer}_alloc to match other *alloc functions. - Replace get_msg_text, get_msg_text2 and get_pidf_body -> No, not get_pidf_msg_text_body3 but get_content, to match add_content. - get_body doesn't get the request body, renamed to get_content_line. - get_body_by_line doesn't get the body line, and is just a simple if test. Moved code inline and removed function. - Remove camelCase in struct sip_peer peer state variables, onHold -> onhold, inUse -> inuse, inRinging -> ringing. - Remove camelCase in struct sip_request rlPart1 -> rlpart1, rlPart2 -> rlpart2. - Rename instances of pvt->randdata to pvt->nonce because that is what it is, no need to update struct sip_pvt because _it already has a nonce field_. - Removed struct sip_pvt randdata stringfield. - Remove useless (and inconsistent) 'header' suffix on variables in handle_request_subscribe. - Use ast_strdupa on Event header in handle_request_subscribe to avoid overly complicated strncmp calls to find the event package. - Move get_destination check in handle_request_subscribe to avoid duplicate checking for packages that don't need it. - Move extension state callback management in handle_request_subscribe to avoid duplicate checking for packages that don't need it. - Remove duplicate append_date prototype. - Rename append_date -> add_date to match other add_xxx functions. - Added add_expires helper function, removed code that manually added expires header. - Remove _header suffix on add_diversion_header (no other header adding functions have this). - Don't pass req->debug to request handle_request_XXXXX handlers if req is also being passed. - Don't pass req->ignore to check_auth as req is already being passed. - Don't create a subscription in handle_request_subscribe if p->expiry == 0. - Don't walk of the back of referred_by_name when splitting string in get_refer_info - Remove duplicate check for no dialog in handle_incoming when sipmethod == SIP_REFER, handle_request_refer checks for that. Review: https://reviewboard.asterisk.org/r/1993/ Patch-by: gareth git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-26chan_sip: Add SIPpeerstatus command to AMIJonathan Rose
This patch was submitted by mnicholson a while back. It adds a new AMI action which allows users to request SIP peer status on demand similar to existing PeerStatus events and to the output you would see from CLI with sip show peer Review: https://reviewboard.asterisk.org/r/1098/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-23Add separate configuration options for subscription and registration ↵Mark Michelson
minexpiry and maxexpiry. This offers more fine-grained control over how long subscriptions last without negatively affecting the expiration range for registrations. Uploaded by: Guenther Kelleter(license #6372) Review: https://reviewboard.asterisk.org/r/2051 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-22Prevent multiple local candidates from being added with the same information ↵Joshua Colp
and add support for disabling ICE on a per-peer basis. (closes issue ASTERISK-20088) Reported by: wimpy Review: https://reviewboard.asterisk.org/r/2044/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-20Add hangupcause translation supportKinsey Moore
The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan functions to better facilitate access to the AST_CAUSE translations for technology-specific cause codes. The HangupCauseClear application has also been added to remove this data from the channel. (closes issue SWP-4738) Review: https://reviewboard.asterisk.org/r/2025/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Add the ability to specify technology specific documentationMatthew Jordan
A number of applications/AMI commands in Asterisk have specific behavioral differences depending on the resource or channel technology those applications are executed on. For example, the MessageSend application/ command is technology agnostic, but how the channel drivers that support that functionality behave is dependant on the protocols and channel driver implementation. Prior to this patch, those details were either documented in the application/command documentation itself, or were left undocumented. This patch adds a new element to the documentation schema, <info/>. An info node is essentially a piece of technology specific reference information that can be included by any top level XML documentation node. For example, the MessageSend application can now include XMPP/SIP specific information, where that technology specific information can be defined in chan_motif/res_xmpp/ chan_sip. Likewise, that information can also be included in the MessageSend AMI command. Review: https://reviewboard.asterisk.org/r/2049 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-18Fix a crash occurring as a result of excess stack usage.Joshua Colp
This fix involves moving the allocation of some temporary codec structures to the heap and also reduces the number of maximum payloads to something more sane for both regular and low memory builds. (closes issue ASTERISK-20140) Reported by: jonnt git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-16Code cleanup and bugfix in chan_sip outboundproxy parsing.Walter Doekes
The bug was clearing the global outboundproxy when a peer-specific outboundproxy was bad. The cleanup reduces duplicate code. Review: https://reviewboard.asterisk.org/r/2034/ Reviewed by: Mark Michelson ........ Merged revisions 370131 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370132 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-16Fix a bug exposed by the testsuite where text streams would no longer be ↵Joshua Colp
parsed correctly. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-16Add support for SIP over WebSocket.Joshua Colp
This allows SIP traffic to be exchanged over a WebSocket connection which is useful for rtcweb. Review: https://reviewboard.asterisk.org/r/2008 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-13Add support for parsing SDP attributes, generating SDP attributes, and ↵Joshua Colp
passing it through. This support includes codecs such as H.263, H.264, SILK, and CELT. You are able to set up a call and have attribute information pass. This should help considerably with video calls. Review: https://reviewboard.asterisk.org/r/2005/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-12Include Expires header for SIP PUBLISH requestsKinsey Moore
RFC3903 requres SIP PUBLISH requests to have Expires headers, so add them. Review: https://reviewboard.asterisk.org/r/2003/ Patch-by: gareth ........ Merged revisions 370014 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370015 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-12Prevent double uri_escaping in chan_sip when pedantic is enabledKinsey Moore
If pedantic mode is enabled, outbound invites will have double-escaped contacts. This avoids setting an already-escaped string into a field where it is expected to be unescaped. (closes issue ASTERISK-20023) Reported by: Walter Doekes ........ Merged revisions 369993 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369994 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-11Named ACLs: Introduces a system for creating and sharing ACLsJonathan Rose
This patch adds Named ACL functionality to Asterisk. This allows system administrators to define an ACL and refer to it by a unique name. Configurable items can then refer to that name when specifying access control lists. It also includes updates to all core supported consumers of ACLs. That includes manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk by Olle E. Johansson and provides a subset of the Named ACL functionality implemented in that branch. For more information on this feature, see acl.conf and/or the Asterisk wiki. Review: https://reviewboard.asterisk.org/r/1978/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-10Fix failing SDP_offer_answer testKinsey Moore
Asterisk now generates image stream declinations with the same transport case that it used to before the stream declination improvements. (udptl vs UDPTL) (closes issue SWP-4736) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-09Add support for exposing the received contact URI and also for setting the ↵Joshua Colp
request URI in messages. (closes issue AST-911) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-09chan_sip: Fix small behavioral change accidentally introduced in r369750Jonathan Rose
When removing the warning for AST_CONTROL_FLASH from sip_indicate, I also inadvertently changed the return value, which would likely make the indication not be sent in audio. This fixes that while still removing the warning message. ........ Merged revisions 369792 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369793 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-06chan_sip: Add case for FLASH control frames so that we don't display a warning.Jonathan Rose
chan_sip channels can receive flash control frames when connected to analog phones and possibly for other reasons. There really isn't a reason to warn when these frames are received, we can safely ignore them. Patches: dahdi_sip_flash.diff uploaded by Jonathan Rose (license 6182) ........ Merged revisions 369750 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369751 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-05Do not send a BYE when a provisional response arrives during a re-INVITEMatthew Jordan
Commits r369557 and r369579 were done to improve handling of re-INVITEs when the UA that was supposed to receive the re-INVITE fails to respond. A limitation of those patches occurred when a UA sent a provisional response to the re-INVITE. This triggered a sending of a BYE in check_pending. This patch tweaks the handling of the re-INVITE such that a BYE is not sent in response to those messages. (issue ASTERISK-19992) Reported by: Steve Davies Tested by: Steve Davies patches: (reinvite_tweak.diff license #5012 by Steve Davies) ........ Merged revisions 369626 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369627 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-03More improvements to re-INVITEs timing out after a provisional responseTerry Wilson
There is no need to call check_pendings() on a final response to an INVITE when destroying the scheduler entry as it will be done later during normal processing. (issue ASTERISK-19992) ........ Merged revisions 369579 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369580 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-03Better handle re-INVITEs with provisional but no final repsonsesTerry Wilson
A previous attempt at fixing this issue had negative side effects related to attended transfers which this patch should resolve. Many thanks to Steve Davies for all of the good suggestions and testing. (closes issue ASTERISK-19992) Reported by: Steve Davies Tested by: Steve Davies, Terry Wilson Review: https://reviewboard.asterisk.org/r/2009/ ........ Merged revisions 369557 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369558 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-01Add support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip.Joshua Colp
Review: https://reviewboard.asterisk.org/r/1891/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29With some configurations a transport is not actually specified so assume UDP ↵Joshua Colp
in these cases. ........ Merged revisions 369490 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369491 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-29Make the address family filter specific to the transport.Joshua Colp
(closes issue ASTERISK-16618) Reported by: Leif Madsen Review: https://reviewboard.asterisk.org/r/1667/ ........ Merged revisions 369471 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369472 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-27AST-2012-010: Clean up after a reinvite that never gets a final responseTerry Wilson
The basic problem is that if a re-INVITE is sent by Asterisk and it receives a provisional response, but no final response, then the dialog is never torn down. In addition to leaking memory, this also leaks file descriptors and will eventually lead to Asterisk no longer being able to process calls. This patch just keeps track of whether there is an outstanding re-INVITE, and if there is goes ahead and cleans up everything as though there was no outstanding reinvite. Review: https://reviewboard.asterisk.org/r/2009/ (closes issue ASTERISK-19992) Reported by: Steve Davies Tested by: Steve Davies, Terry Wilson ........ Merged revisions 369436 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369437 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Re-fix how local tag is generated when sending a 481 to an INVITE.Mark Michelson
Match our local tag to whatever to-tag was sent in the initial INVITE. Because the size of the to-tag may not fit in the buffer in the sip_pvt, it has been changed to a string field. (closes issue ASTERISK-19892) reported by Walter Doekes Review: https://reviewboard.asterisk.org/r/1977 ........ Merged revisions 369352 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369353 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369367 65c4cc65-6c06-0410-ace0-fbb531ad65f3