summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2013-07-01Refactor extraneous channel eventsKinsey Moore
This change removes JitterBufStats, ChannelReload, and ChannelUpdate and refactors the following events to travel over Stasis-Core: * LocalBridge * DAHDIChannel * AlarmClear * SpanAlarmClear * Alarm * SpanAlarm * DNDState * MCID * SIPQualifyPeerDone * SessionTimeout Review: https://reviewboard.asterisk.org/r/2627/ (closes issue ASTERISK-21476) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28Add stasis publications for blind and attended transfers.Mark Michelson
This creates stasis messages that are sent during a blind or attended transfer. The stasis messages also are converted to AMI events. Review: https://reviewboard.asterisk.org/r/2619 (closes issue ASTERISK-21337) Reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-26Fix incorrect calls to ast_bridge_impart().Richard Mudgett
There was a misunderstanding about ast_bridge_impart()'s handling of the imparted channel's reference. The channel reference is passed by the caller unless ast_bridge_impart() returns an error. * Fixed a memory leak in conf_announce_channel_push() if the impart failed. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25Fix memory/ref counting leaks in a variety of locationsMatthew Jordan
This patch fixes the following memory leaks: * http.c: The structure containing the addresses to bind to was not being deallocated when no longer used * named_acl.c: The global configuration information was not disposed of * config_options.c: An invalid read was occurring for certain option types. * res_calendar.c: The loaded calendars on module unload were not being properly disposed of. * chan_motif.c: The format capabilities needed to be disposed of on module unload. In addition, this now specifies the default options for the maxpayloads and maxicecandidates in such a way that it doesn't cause the invalid read in config_options.c to occur. (issue ASTERISK-21906) Reported by: John Hardin patches: http.patch uploaded by jhardin (license 6512) named_acl.patch uploaded by jhardin (license 6512) config_options.patch uploaded by jhardin (license 6512) res_calendar.patch uploaded by jhardin (license 6512) chan_motif.patch uploaded by jhardin (license 6512) ........ Merged revisions 392810 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22Merge in current pimp_my_sip work, including:Joshua Colp
1. Security events 2. Websocket support 3. Diversion header + redirecting support 4. An anonymous endpoint identifier 5. Inbound extension state subscription support 6. PIDF notify generation 7. One touch recording support (special thanks Sean Bright!) 8. Blind and attended transfer support 9. Automatic inbound registration expiration 10. SRTP support 11. Media offer control dialplan function 12. Connected line support 13. SendText() support 14. Qualify support 15. Inband DTMF detection 16. Call and pickup groups 17. Messaging support Thanks everyone! Side note: I'm reminded of the song "How Far We've Come" by Matchbox Twenty. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22Migrate PeerStatus events to stasis, add stasis endpoints, and add ↵Joshua Colp
chan_pjsip device state. (closes issue ASTERISK-21489) (closes issue ASTERISK-21503) Review: https://reviewboard.asterisk.org/r/2601/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21Add BUGBUG for broken direct media in chan_gulpMatthew Jordan
(issue ASTERISK-21947) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21Change chan_unistim to use core transfer API.Mark Michelson
Review: https://reviewboard.asterisk.org/r/2553 (closes issue ASTERISK-21527) Reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17chan_vpb: Fix compile error and __ast_channel_alloc() prototype const ↵Richard Mudgett
inconsistency. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17chan_misdn: Fix compile error after CDR merge.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17Update Asterisk's CDRs for the new bridging frameworkMatthew Jordan
This patch is the initial push to update Asterisk's CDR engine for the new bridging framework. This patch guts the existing CDR engine and builds the new on top of messages coming across Stasis. As changes in channel state and bridge state are detected, CDRs are built and dispatched accordingly. This fundamentally changes CDRs in a few ways. (1) CDRs are now *very* reflective of the actual state of channels and bridges. This means CDRs track well with what an actual channel is doing - which is useful in transfer scenarios (which were previously difficult to pin down). It does, however, mean that CDRs cannot be 'fooled'. Previous behavior in Asterisk allowed for CDR applications, channels, and other properties to be spoofed in parts of the code - this no longer works. (2) CDRs have defined behavior in multi-party scenarios. This behavior will not be what everyone wants, but it is a defined behavior and as such, it is predictable. (3) The CDR manipulation functions and applications have been overhauled. Major changes have been made to ResetCDR and ForkCDR in particular. Many of the options for these two applications no longer made any sense with the new framework and the (slightly) more immutable nature of CDRs. There are a plethora of other changes. For a full description of CDR behavior, see the CDR specification on the Asterisk wiki. (closes issue ASTERISK-21196) Review: https://reviewboard.asterisk.org/r/2486/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11Fix issue with no sound in both way in case of previous call to chan_unistim ↵Igor Goncharovskiy
phone was canceled. (related to ASTERISK-20183) ........ Merged revisions 391379 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11IAX2: Transfer Reject: Lock bridgecallno before touching it, refactorAlec L Davis
1). When touching the bridgecallno, we need to lock it. 2). Remove magic number '0' and replace with TRANSFER_NONE. 3). Exit early if no bridgecallno. 4). Reduce indentation. Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2613/ ........ Merged revisions 391333 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 391334 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10Change chan_skinny to use core transfer API.Damien Wedhorn
Changes for both attended and blind transfers in chan_skinny to use the new transfer API instead of masquerade. (closes issue ASTERISK-21526) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2557/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10chan_iax2: nativebridge refactor, missed unlock bridgecallnoAlec L Davis
........ Merged revisions 391143 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 391148 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10fix bad edit after conflict resolutionAlec L Davis
........ Merged revisions 391107 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 391111 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10IAX2: refactor nativebridge transferAlec L Davis
remove triple checking of iaxs[fr->callno]->transferring reduce indentation. Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2602/ ........ Merged revisions 391065 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 391084 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10IAX2: fix race condition with nativebridge transfers.Alec L Davis
1). When touching the bridgecallno, we need to lock it. 2). stop_stuff() which calls iax2_destroy_helper() Assumes the lock on the pvt is already held, when iax2_destroy_helper() is called. Thus we need to lock the bridgecallno pvt before we call stop_stuff(iaxs[fr->callno]->bridgecallno); 3). When evaluating the state of 'callno->transferring' of the current leg, we can't change it to READY unless the bridgecallno is locked. Why, if we are interrupted by the other call leg before 'transferring = TRANSFER_RELEASED', the interrupt will find that it is READY and that the bridgecallno is also READY so Releases the legs. (closes issue ASTERISK-21409) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2594/ ........ Merged revisions 391062 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 391063 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07Refactor chan_dahdi/sig_analog/sig_pri and chan_misdn to use the common ↵Richard Mudgett
transfer functions. (closes issue ASTERISK-21523) Reported by: Matt Jordan (closes issue ASTERISK-21524) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2600/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06Refactor the features configuration scheme.Mark Michelson
Features configuration is handled in its own API in features_config.h and features_config.c. This way, features configuration is accessible to anything that needs it. In addition, features configuration has been altered to be more channel-oriented. Most callers of features API code will be supplying a channel so that the individual channel's settings will be acquired rather than the global setting. Missing from this commit is XML documentation for the features configuration. That will be handled in a separate commit. Review: https://reviewboard.asterisk.org/r/2578/ (issue ASTERISK-21542) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06Add a BUGBUG note.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28Add attended transfer support for chan_sip.cMark Michelson
This now uses the core API for performing attended transfers. Review https://reviewboard.asterisk.org/r/2513 (Closes issue ASTERISK-21520) reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28Adds support for a core attended transfer function plus adds some hiding of ↵Mark Michelson
masquerades. The attended transfer API call can complete the attended transfer in a number of ways depending on the current bridged states of the channels involved. The hiding of masquerades is done in some bridging-related functions, such as the manager Bridge action and the Bridge dialplan application. In addition, call pickup was edited to "move" a channel rather than masquerade it. Review: https://reviewboard.asterisk.org/r/2511 (closes issue ASTERISK-21334) Reported by Matt Jordan (closes issue Asterisk-21336) Reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Split Hold event into Hold/Unhold, and move it into core.Jason Parker
(closes issue ASTERISK-21487) Review: https://reviewboard.asterisk.org/r/2565/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Migrate a large number of AMI events over to Stasis-CoreMatthew Jordan
This patch moves a number of AMI events over to the Stasis-Core message bus. This includes: * ChanSpyStart/Stop * MonitorStart/Stop * MusicOnHoldStart/Stop * FullyBooted/Reload * All Voicemail/MWI related events In addition, it adds some Stasis-Core and AMI support for generic AMI messages, refactors the message router in AMI to use a single router with topic forwarding for the topics that AMI cares about, and refactors MWI message types and topics to be more name compliant. Review: https://reviewboard.asterisk.org/r/2532 (closes issue ASTERISK-21462) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Fix several problems caused by multiple line usage with i2004 phones.Igor Goncharovskiy
Reported by: Daniel Bohling, MihaiMircea (closes issue ASTERISK-21061) (closes issue ASTERISK-21120) ........ Merged revisions 389661 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Merge in the bridge_construction branch to make the system use the Bridging API.Richard Mudgett
Breaks many things until they can be reworked. A partial list: chan_agent chan_dahdi, chan_misdn, chan_iax2 native bridging app_queue COLP updates DTMF attended transfers Protocol attended transfers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-19Add transfer softkey to ringout state to enable blond transfers.Damien Wedhorn
(closes issue ASTERISK-21327) Reported by: wedhorn Tested by: myself Patches: skinny-blindxfer01.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-18Add call forward no answer to skinny and cleanup general callfwd handling.Damien Wedhorn
CallforwardNoAnswer uses a sched to determine when to forward the call. Defaults to 20secs but configurable in skinny.conf. Adds dialType to each subchannel structure to be used to differentiate between normal dials that result in a call being placed (default) and other uses for the skinny_dialer (such as cfwd digit collection). Restructured all cfwd handling to use this new arrangement. (closes issue ASTERISK-21292) Reported by: wedhorn Tested by: myself Patches: skinny-callfwdnoans03.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-17Fix shutdown assertions in stasis-coreDavid M. Lee
In r388005, macros were introduced to consistently define message types. This added an assert if a message type was used either before it was initialized or after it had been cleaned up. It turns out that this assertion fires during shutdown. This actually exposed a hidden shutdown ordering problem. Since unsubscribing is asynchronous, it's possible that the message types used by the subscription could be freed before the final message of the subscription was processed. This patch adds stasis_subscription_join(), which blocks until the last message has been processed by the subscription. Since joining was most commonly done right after an unsubscribe, a stasis_unsubscribe_and_join() convenience function was also added. Similar functions were also added to the stasis_caching_topic and stasis_message_router, since they wrap subscriptions and have similar problems. Other code in trunk was refactored to join() where appropriate, or at least verify that the subscription was complete before being destroyed. Review: https://reviewboard.asterisk.org/r/2540 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-17Remove Character Limit On "inkeys" For IAX2Michael L. Young
Currently, the buffer for processing "inkeys" is limited to 256 characters. If the user has many keys and the names of those key files are long, the 256 character limit is not enough. * Change inkeys buffer to be dynamic (closes issue ASTERISK-21398) Reported by: Pavel Kopchyk Tested by: Pavel Kopchyk, Michael L. Young Patches: asterisk-21398-iax2-inkeys-dynamic-buffer_v3.diff by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2501/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-17Stasis: Update security events to use StasisJonathan Rose
Also moves ACL messages to the security topic and gets rid of the ACL topic (closes issue ASTERISK-21103) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2496/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13Fix Crash Caused By One-way Audio With auto_* NAT Settings FixMichael L. Young
The prior code committed, r385473, failed to take into consideration that not all outgoing calls will be to a peer. My fault. This patch does the following: * Check if there is a related peer involved. If there is, check and set NAT settings according to the peer's settings. * Fix a problem with realtime peers. If the global setting has auto_force_rport set and we issued a "sip reload" while a peer is still registered, the peer's flags for NAT are reset to off. When this happens, we were always setting the contact address of the peer to that of the full contact info that we had. (closes issue ASTERISK-21374) Reported by: jmls Tested by: Michael L. Young Patches: asterisk-21374-fix-crash-and-rt-peers.diff by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2524/ ........ Merged revisions 388601 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-13chan_gulp: Minor readability Improvements to chan_gulpJonathan Rose
(closes issue ASTERISK-21670) Reported by: Snuffy Review: https://reviewboard.asterisk.org/r/2473/ Patches: gulp-coding-guide.diff uploaded by snuffy (license 5024) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Allow mISDN to send PROGRESS messsage.Richard Mudgett
* Made isdn_msg_parser.c build a progress message with the mandatory progress indicator IE. (The mISDNuser NT state machine rejected sending the incomplete message.) Note: The associated mISDN and mISDNuser patches respectively are viewable here: http://svnview.digium.com/svn/thirdparty?view=rev&rev=200 http://svnview.digium.com/svn/thirdparty?view=rev&rev=201 (closes issue AST-1153) Reported by: Guenther Kelleter Patches: progress-chan_misdn.diff (license #6372) patch uploaded by Guenther Kelleter progress-misdn.diff (license #6372) mISDN patch uploaded by Guenther Kelleter progress-misdnuser.diff (license #6372) mISDNuser patch uploaded by Guenther Kelleter ........ Merged revisions 388425 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 388426 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Fix copy/paste error in one-touch-recording implementation.Sean Bright
........ Merged revisions 388253 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08Initial support for endpoints.David M. Lee
An endpoint is an external device/system that may offer/accept channels to/from Asterisk. While this is a very useful concept for end users, it is surprisingly not a core concept within Asterisk itself. This patch defines ast_endpoint as a separate object, which channel drivers may use to expose their concept of an endpoint. As the channel driver creates channels, it can use ast_endpoint_add_channel() to associate channels to the endpoint. This updated the endpoint appropriately, and forwards all of the channel's events to the endpoint's topic. In order to avoid excessive locking on the endpoint object itself, the mutable state is not accessible via getters. Instead, you can create a snapshot using ast_endpoint_snapshot_create() to get a consistent snapshot of the internal state. This patch also includes a set of topics and messages associated with endpoints, and implementations of the endpoint-related RESTful API. chan_sip was updated to create endpoints with SIP peers, but the state of the endpoints is not updated with the state of the peer. Along for the ride in this patch is a Stasis test API. This is a stasis_message_sink object, which can be subscribed to a Stasis topic. It has functions for blocking while waiting for conditions in the message sink to be fulfilled. (closes issue ASTERISK-21421) Review: https://reviewboard.asterisk.org/r/2492/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08chan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after ↵Alec L Davis
retries fail RFC6665 4.2.2: ... after a failed State NOTIFY transaction remove the subscription The problem is that the State Notify requests rely on the 200OK reponse for pacing control and to not confuse the notify susbsystem. The issue is, the pendinginvite isn't cleared if a response isn't received, thus further notify's are never sent. The solution, follow RFC 6665 4.2.2's 'SHOULD' and remove the subscription after failure. (closes issue ASTERISK-21677) Reported by: Dan Martens Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2475/ ........ Merged revisions 387875 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387880 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Make a log NOTICE more explicit that the event comes from DAHDI and not PRI.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-03Stasis: Convert network change events into network change stasis messagesJonathan Rose
(issue ASTERISK-21103) Review: https://reviewboard.asterisk.org/r/2490/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-03Use the configured formats for Gulp sessions if there are no joint formats ↵Joshua Colp
between requested formats and configured formats. (closes issue ASTERISK-21756) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02chan_sip: Session-Expires: Set timer to correctly expire at (~2/3) of the ↵Alec L Davis
interval when not the refresher RFC 4028 Section 10 if the side not performing refreshes does not receive a session refresh request before the session expiration, it SHOULD send a BYE to terminate the session, slightly before the session expiration. The minimum of 32 seconds and one third of the session interval is RECOMMENDED. Prior to this asterisk would refresh at 1/2 the Session-Expires interval, or if the remote device was the refresher, asterisk would timeout at interval end. Now, when not refresher, timeout as per RFC noted above. (closes issue ASTERISK-21742) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2488/ ........ Merged revisions 387344 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387345 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02chan_sip: Honor Session-Expires in 200OK response when it's a RE-INVITE when ↵Alec L Davis
asterisk is the refresher. RFC 4028 Section 7.2 "UACs MUST be prepared to receive a Session-Expires header field in a response, even if none were present in the request." What changed After ASTERISK-20787, inbound calls to asterisk with no Session-Expires in the INVITE are now are offered a Session-Expires (1800 asterisk default) in the response, with asterisk as the refresher. Symptom: After 900 seconds (asterisk default refresher period 1800), asterisk RE-INVITEs the device, the device may respond with a much lower Session-Expires (180 in our case) value that it is now using. Asterisk ignores this response, as it's deemed both an INBOUND CALL, and a RE-INVITE. After 180 seconds the device times out and sends BYE (hangs up), asterisk is still working with the refresher period of 1800 as it ignored the 'Session Expires: 180' in the previous 200OK response. Fix: handle_response_invite() when 200OK, remove check for outbound and reinvite. (closes issue ASTERISK-21664) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2463/ ........ Merged revisions 387312 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387319 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02chan_dahdi: fix lower bound check with -ve integer conversion from a float Alec L Davis
Lower bound of a 16bit signed int is -32768 not -32767 (closes issue ASTERISK-21744) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) ........ Merged revisions 387297 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387298 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Simplify chan_local.c:manager_optimize_away() using ao2_find().Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Cleanup chan_local.c:local_new().Richard Mudgett
* Remove t and ama local variables. There is no way they could be anything other than default because p->owner can only be NULL at this point. * Rename tmp and tmp2 to owner and chan respectively. * Remove redundant initialization of channel context, exten, priority. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Trivial changes. Comments, parentheses, spelling, wording.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Make chan_local locals container an explicit list container.Richard Mudgett
Pretending that chan_local locals container can have more than one bucket is silly. The container has no key to help search. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Whitespace changes.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Remove some unnecessary calls to ast_bridged_channel() in chan_unistim.cRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387185 65c4cc65-6c06-0410-ace0-fbb531ad65f3