summaryrefslogtreecommitdiff
path: root/bridges
AgeCommit message (Collapse)Author
2013-07-26Improved feature limits interval hook implementaion.Richard Mudgett
* Fixed feature limits to not use special members of struct ast_bridge_features. * Fixed memory leak in off nominal paths of bridge_builtin_set_limits(). * Fixed off nominal path in ast_bridge_features_limits_construct() freeing unallocated memory if it was not called by bridge_builtin_set_limits(). * Made bridge_builtin_interval_features.so unloadable. * Simplified parking's use of its duration interval hook. * Made BridgeWait S option not depend upon another module being loaded. (closes issue ASTERISK-22107) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2701/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25RevisionRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395466 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-25Move after bridge callbacks into their own fileMatthew Jordan
One more major refactoring to go. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-24Update bridge_channel refactorings; export bridge_ symbolMatthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-24Add missing line terminator to debug message.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-24Perform the initial renaming of the Bridging APIMatthew Jordan
This patch does the following: * It pulls out bridge_channel and puts it into its own translation unit * It adds public and protected headers for bridging_channel. Protected functions are appropriate only for the Bridging API and sub-classes of a bridge. (issue ASTERISK-22130) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23Fix a check in bridge_native_rtp which determined if attaching the framehook ↵Joshua Colp
failed or not. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23Add some debug messages to make it clear what RTP bridging functionality is ↵Joshua Colp
in use. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23Fix some logic so native RTP bridge will occur when monitor, audiohooks, or ↵Joshua Colp
framehooks are not present. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23Pull softmix bridge parameters into a sub structure.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23Restore chan_dahdi native bridging and PRI tromboned call elimination.Richard Mudgett
Created a native_dahdi bridging technology for use with the new bridging API. The new bridging technology is part of the chan_dahdi channel driver because it is very specific to that driver. Rather than include the new code directly into chan_dahdi.c the new bridge technology is in its own file and linked into chan_dahdi.so. A large part of this change is the mechanical process of moving declarations around so chan_dahdi.c can be split up into more files later. * Changed the bridging core to pass NULL frames into the channel technologies instead of discarding them. The channel technologies may need the proding to determine if their configuration is still valid. (closes issue ASTERISK-21886) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2681/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23Make DTMF attended transfer support feature-complete.Mark Michelson
This greatly modifies the operation of DTMF attended transfers so that the full range of options from features.conf applies. In addition, a new option has been added that allows for a transferer to switch between bridges during a transfer before completing the transfer. (closes issue ASTERISK-21543) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2654 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19Extract a repeated test into ast_channel_has_audio_frame_or_monitor().Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18bridge_holding/app_bridgewait: Add new entertainment optionsJonathan Rose
This patch adds more entertainment options to holding bridges and the bridge_wait application. Also, holding bridges will now use music on hold as the default entertainment option instead of none. The parameters for app_bridgewait have changed to (role, options) from the previous (options) and the options themselves have changed as well (entertainment options are now contained in an enumerator, role specification is handled by the role parameter, etc) (closes issue ASTERISK-21923) Reported by: Matthew Jordan Review: https://reviewboard.asterisk.org/r/2679/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16Simplify bridge_simple chan join code.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394470 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-07-03OneTouchRecord: Make so Monitor/MixMonitor can be toggled/started/stopped.Richard Mudgett
The OneTouchRecord feature has historically been a toggle. This patch adds the ability to make the OneTouchRecord hook optionally start/stop recording only. If OneTouchRecord is already doing what is requested then only the invoker hears the courtesy tone and/or start/stop recording message. The new feature is written so we could easily add explicit start/stop recording DTMF hooks for Monitor and MixMonitor. The majority of the changes in bridge_builtin_features.c is a refactoring of the OneTouchRecord code (Monitor and MixMonitor versions) so it is easy to direct the toggle/start/stop functionality. Review: https://reviewboard.asterisk.org/r/2655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01bridge_features: Support One touch Monitor/MixMonitorJonathan Rose
In addition to porting those features, they now enjoy greater feature parity with one another. Specifically, AutoMixMon now has a start and stop message that can be specified with TOUCH_MIXMONITOR_MESSAGE_START and TOUCH_MIXMONITOR_MESSAGE_STOP. (closes issue ASTERISK-21553) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2620/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393309 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-21Extract a useful routine from the softmix bridge technology.Richard Mudgett
* Extract a useful routine from the softmix bridge technology for other technologies. Make other technologies use it if they can. * Made native and 1-1 bridges write to all parties if the bridge channel writing the frame into the bridge is NULL. Softmix will also do the same for frame types that make sense. * Tweak the bridge write routine return value meaning and adjust the bridge technologies to match. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21Change several bridge functions to return error status.Richard Mudgett
The bridge frame queue functions need to return an error status if the frame failed to be queued because of an error condition. The main calls that needed to return the status are: ast_bridge_channel_queue_action_data() and ast_bridge_channel_write_action_data(). The other return changes are ripple effects. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-12Fix memory leaks in stasis_channels and bridge_native_rtpMatthew Jordan
This patch fixes two memory leaks: * A memory leak in packing channels into a multi-channel blob payload when publishing dial messages. The multi-channel blob payload does not steal the references - this approach was chosen because it works well with the RAII_VAR macro. Unfortunately, this does mean that you actually have to use the RAII_VAR macro (or manually deref it yourself) * RTP instances returned as a result of one of the glue operations are ref counted and have to be de-ref'd appropriately. We now do that, as saying that we should do it and then not would be silly. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11bridge_native_rtp: Fix native bridge tech being incompatible when it should be.Jonathan Rose
When checking compatability for the native RTP bridge technology there is a race condition between clearing framehooks that are destroyed when leaving certain bridges with certain technologies (such as bridge_native_rtp) and joining bridges with the bridge_native_rtp technology. Yes, that means a channel in a native RTP bridge could move to another native RTP bridge and be considered incompatible with the new native RTP bridge causing it to revert to a simple bridge technology0. This fixes that bug by ignoring framehooks that have been marked for destruction when checking for compatibility with the bridge_native_rtp technology. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11bridge_native_rtp: Fix possible segfaults on leaves/joinsJonathan Rose
native_rtp_bridge_get can return any result from the ast_rtp_glue_result enumerator and the join/leave functions for bridge_native_rtp seem to assume that if the result wasn't local that it was remote. Meanwhile forbid can be returned by that function which can mean certain glue pointers are NULL. Then when the join/leave functions try to use members of that pointer, boom. Segfault. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08Fix a crash when a bridge switches from the softmix bridge technology to ↵Richard Mudgett
another. A three party bridge uses the softmix bridging technology. This technology has a dedicated thread used to perform the analog mixing. When one of these parties leaves the bridge, the bridge technology is changed from the softmix technology to a two-party mixing technology. Changing technologies is done by removing channels from the old technology and adding them to the new technology. Since the remaining channels do not leave the bridge, the softmix mixing thread could continue to process all channels in the bridge. If the bridge code is not able to start destruction of the softmix technology before the softmix mixing thread wakes up, a crash happens. * Added a stop technology callback that technologies can use to request any helper threads to stop in preparation for being destroyed. (closes issue AST-1156) Reported by: John Bigelow git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08The bridge uniqueid is available for softmix destructor.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08Add some bridge identifiers to some softmix messages.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06Reimplement bridging and DTMF features related channel variables in the ↵Richard Mudgett
bridging core. * The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer channel driver specific. If the channel variable is set on the transferrer channel, the sound will be played to the target of an attended transfer. * The channel variable BRIDGEPEER becomes a comma separated list of peers in a multi-party bridge. The BRIDGEPEER value can have a maximum of 10 peers listed. Any more peers in the bridge will not be included in the list. BRIDGEPEER is not valid in holding bridges like parking since those channels do not talk to each other even though they are in a bridge. * The channel variable BRIDGEPVTCALLID is only valid for two party bridges and will contain a value if the BRIDGEPEER's channel driver supports it. * The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and is removed. The more useful DYNAMIC_WHO_ACTIVATED gives the channel name that activated the dynamic feature. * The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are set only on the channel executing the dynamic feature. Executing a dynamic feature on the bridge peer in a multi-party bridge will execute it on all peers of the activating channel. (closes issue ASTERISK-21555) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2582/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390771 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-05Remove remaining traces of remove_on_pull from hooks and hook APIs.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-04Add BUGBUG comment.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-04Simple lock, assignment, unlock sandwich optimization.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Fixup hold/unhold with attended and blind transfers.Richard Mudgett
* DTMF attended and blind transfers have hold/unhold behavior restored. * External attended and blind transfers unhold the transfered party when the transfer is initiated. * Made prohibit blind transferring a bridge marked as masquerade only. (ConfBridge bridges) * Made running an application or playing a file inside a bridge post the hold/unhold messages if MOH is requested. Review: https://reviewboard.asterisk.org/r/2574/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390289 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-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-01-31bridge_multiplexed: Keep the multiplexed thread until no more bridges use it.Richard Mudgett
* Fixed the potential of losing the multiplexed bridge thread when the last channel leaves and another joins while the multiplexed thread is being shut down. * Refactored and improved the management of the serviced channels array. * Changed the channels count to a bridges count so it only needs to be incremented rather than changed by two. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25bridge_multiplexed: Rename variables so they are not the same as the struct ↵Richard Mudgett
name. * Rename multiplexed_thread variables to muxed_thread. It is shorter and my editer tagging works much better. Struct names and variable names have different purposes and therefore should have different names. * Renamed the multiplexed_threads container to muxed_threads for consistency. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25Misc bridge code improvementsRichard Mudgett
* Made multiplexed_bridge_destroy() check if anything to destroy and cleared bridge_pvt pointer after destruction. * Made multiplexed_add_or_remove() handling of the chans array simpler. * Extracted bridge_channel_poke(). * Simplified bridge_array_remove() handling of the bridge->array[]. The array does not have a NULL sentinel pointer. * Made ast_bridge_new() not create a temporary bridge just to see if it can be done. Only need to check if there is an appropriate bridge tech available. * Made ast_bridge_new() clean up on allocation failures. * Made destroy_bridge() free resources in the opposite order of creation. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25More trivial bridge code cleanup.Richard Mudgett
* Breaking long lines * Word wrapping comment blocks. * Removing redundant initializers. * Debug message wording. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21Better protect bridge_channel state from other threads.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21Made some bridging API calls void. Some bridging comments updated.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21Bridge API comment tweaks.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09Trivial misc bridge code changes.Richard Mudgett
* softmix_bridge_thread() was redundantly initializing an 8K buffer. * Promoted a debug message to a warning in multiplexed_add_or_remove(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-09Trivial misc bridge code changes.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05Refactor ast_timer_ack to return an error and handle the error in timer usersMatthew Jordan
Currently, if an acknowledgement of a timer fails Asterisk will not realize that a serious error occurred and will continue attempting to use the timer's file descriptor. This can lead to situations where errors stream to the CLI/log file. This consumes significant resources, masks the actual problem that occurred (whatever caused the timer to fail in the first place), and can leave channels in odd states. This patch propagates the errors in the timing resource modules up through the timer core, and makes users of these timers handle acknowledgement failures. It also adds some defensive coding around the use of timers to prevent using bad file descriptors in off nominal code paths. Note that the patch created by the issue reporter was modified slightly for this commit and backported to 1.8, as it was originally written for Asterisk 10. Review: https://reviewboard.asterisk.org/r/2178/ (issue ASTERISK-20032) Reported by: Jeremiah Gowdy patches: jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358) ........ Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-30Fix ConfBridge crash if no timing module loaded.Richard Mudgett
(closes issue ASTERISK-19448) Reported by: feyfre Patches: smfix.patch (license #6099) patch uploaded by feyfre Modified for coding guidelines. ........ Merged revisions 375496 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375506 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14Title updateAndrew Latham
Update title that was left behind many years ago. Used revision 6596 as my guide for what it should be. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Finalize ast_channel opaquificationTerry Wilson
Review: https://reviewboard.asterisk.org/r/1786/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3