summaryrefslogtreecommitdiff
path: root/main/parking.c
AgeCommit message (Collapse)Author
2014-05-22res_pjsip_refer: Fix bugs involving Parking/PJSIP/transfersJonathan Rose
PJSIP would never send the final 200 Notify for a blind transfer when transferring to parking. This patch fixes that. In addition, it fixes a reference leak when performing blind transfers to non-bridging extensions. Review: https://reviewboard.asterisk.org/r/3485/ ........ Merged revisions 414400 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09Allow Asterisk to compile under GCC 4.10Kinsey Moore
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06astobj2: Add warn unused attribute to some functions.Richard Mudgett
* Fixed resulting warnings with improper use of ao2_global_obj_replace(). * Made a couple uses of ao2_global_obj_replace_unref(x, NULL) into the equivalent and more appropriate ao2_global_obj_release() call. ........ Merged revisions 398533 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17Allow res_parking to be unloadableKinsey Moore
This change protects accesses of res_parking such that it can unload safely once transient uses of its registered functions are complete. The parking API has been restructured such that its consumers do not have access to the vtable exposed by the parking provider, but instead route through stubs to prevent consumers from holding on to function pointers. This adds calls to all the parking unload functions and moves application loading and unloading into functions in parking_applications.c similar to the rest of the parts of res_parking. Review: https://reviewboard.asterisk.org/r/2763/ (closes issue ASTERISK-22142) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Support externally initiated parking requests; remove some dead codeMatthew Jordan
This patch does the following: * It adds support for externally initiated parking requests. In particular, chan_skinny has a protocol level message that initiates a call park. This patch now supports that option, as well as the protocol specific mechanisms in chan_dahdi/sig_analog and chan_mgcp. * A parking bridge features virtual table has been added that provides access to the parking functionality that the Bridging API needs. This includes requests to park an entire 'call' (with little or no additional information, thank you chan_skinny), perform a blind transfer to a parking extension, determine if an extension is a parking extension, as well as the actual "do the parking" request from the Bridging API. * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new functions * The removal of some - but not all - dead parking code from features.c This also fixed blind transferring a multi-party bridge to a parking lot (which was implemented, but had at least one code path where using the parking features kK might not have worked) Review: https://reviewboard.asterisk.org/r/2710 (closes issue ASTERISK-22134) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-26Remove the unsafe bridge parameter from ast_bridge_hook_callback's.Richard Mudgett
Most hook callbacks did not need the bridge parameter. The pointer value could become invalid if the channel is moved to another bridge while it is executing. * Fixed some issues in feature_attended_transfer() as a result. * Reduce the bridge inhibit count in attended_transfer_properties_shutdown() after it has restored the bridge channel hooks. * Removed basic bridge requirement on feature_blind_transfer(). It does not require the basic bridge like feature_attended_transfer(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25A great big renaming patchMatthew Jordan
This patch renames the bridging* files to bridge*. This may seem pedantic and silly, but it fits better in line with current Asterisk naming conventions: * channel is not "channeling" * monitor is not "monitoring" etc. A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is the act of using a bridge on a set of channels - and the API that fulfills that role is more than just the action. (closes issue ASTERISK-22130) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-04res_parking: Replace Parker snapshots with ParkerDialStringJonathan Rose
This process also involved a large amount of rework regarding how to redial the Parker when a channel leaves a parking lot due to timeout. An attended transfer channel variable has been added to attended transfers to extensions that will eventually park (but haven't at the time of transfer) as well. This resolves one of the two BUGBUG comments remaining in res_parking. (issues ASTERISK-21877) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2638/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24Fix a variety of memory leaksMatthew Jordan
This patch addresses the following memory/ref counting leaks: * main/devicestate.c - unsubscribe and join our devicestate message subscription * main/cel.c - clean up the datastore and config objects on exist * main/parking.c - cleanup memory leak of retriever snapshot on message payload destruction * res/parking/parking_bridge.c - cleanup memory leak of retrieve snapshot on message payload destruction * main/presencestate.c - unsubscribe and join the caching topic on exit * manager.c - properly unregister the manager action "BlindTransfer" * sorcery.c - shutdown the threadpool on exit and dispose of any wizards (issue ASTERISK-21906) Reported by: John Hardin patches: cel.patch uploaded by jhardin (license #6512) devicestate.patch uploaded by jhardin (license #6512) manager.patch uploaded by jardin (license #6512) presencestate.patch uploaded by jhardin (license #6512) retriever-channel-snapshot.patch uploaded by jhardin (license #6512) sorcery.patch uploaded by jhardin (license #6512) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13Refactor CEL bridge events on top of Stasis-CoreKinsey Moore
This pulls bridge-related CEL event triggers out of the code in which they were residing and pulls them into cel.c where they are now triggered by changes in bridge snapshots. To get access to the Stasis-Core parking topic in cel.c, the Stasis-Core portions of parking init have been pulled into core Asterisk init. This also adds a new CEL event (AST_CEL_BRIDGE_TO_CONF) that indicates a two-party bridge has transitioned to a multi-party conference. The reverse cannot occur in CEL terms even though it may occur in actuality and two party bridges which receive a AST_CEL_BRIDGE_TO_CONF will be treated as multi-party conferences for the duration of the bridge. Review: https://reviewboard.asterisk.org/r/2563/ (closes issue ASTERISK-21564) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11Add vtable and methods for to_json and to_ami for Stasis messagesDavid M. Lee
When a Stasis message type is defined in a loadable module, handling those messages for AMI and res_stasis events can be cumbersome. This patch adds a vtable to stasis_message_type, with to_ami and to_json virtual functions. These allow messages to be handled abstractly without putting module-specific code in core. As an example, the VarSet AMI event was refactored to use the to_ami virtual function. (closes issue ASTERISK-21817) Review: https://reviewboard.asterisk.org/r/2579/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391403 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