[asterisk-dev] [Code Review] 2535: Add ability to call a function when a channel leaves the bridging system.

Matt Jordan reviewboard at asterisk.org
Mon May 13 21:45:35 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2535/#review8591
-----------------------------------------------------------



/team/group/bridge_construction/include/asterisk/bridging.h
<https://reviewboard.asterisk.org/r/2535/#comment16756>

    Document that this locks chan



/team/group/bridge_construction/include/asterisk/bridging.h
<https://reviewboard.asterisk.org/r/2535/#comment16757>

    Document that this locks chan



/team/group/bridge_construction/include/asterisk/bridging.h
<https://reviewboard.asterisk.org/r/2535/#comment16754>

    "when will"



/team/group/bridge_construction/main/bridging.c
<https://reviewboard.asterisk.org/r/2535/#comment16755>

    Highlander!



/team/group/bridge_construction/main/bridging.c
<https://reviewboard.asterisk.org/r/2535/#comment16758>

    If a channel has an after_bridge_callback and it successfully runs, would we want to bother with an after_bridge_goto run? Should these return a success failure, and we only execute the next 'goto' option if the prior attempts to hand a channel off after a bridge fail?


- Matt Jordan


On May 13, 2013, 7:12 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2535/
> -----------------------------------------------------------
> 
> (Updated May 13, 2013, 7:12 p.m.)
> 
> 
> Review request for Asterisk Developers, David Lee, Matt Jordan, and Mark Michelson.
> 
> 
> Bugs: ASTERISK-21640
>     https://issues.asterisk.org/jira/browse/ASTERISK-21640
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> There are times when a module would like to gain control of a channel that is already in the bridging system but the module does not want the channel in the bridging system when it gains control.
> 
> 1) The mythical app_queue holding priority bridge when the channel is selected to dial an agent.
> 2) Stasis-HTTP when it needs to gain control before it initiates dialing.
> 3) Attended transferring a bridged channel to an application.
> 
> Example usage:
> ast_after_bridge_callback_set(chan, callback_fn, failed_fn, data);
> ast_bridge_remove(bridge, chan)
> 
> When the channel leaves the bridge the callback_fn(chan, data) will be made.
> 
> 
> Diffs
> -----
> 
>   /team/group/bridge_construction/include/asterisk/bridging.h 388574 
>   /team/group/bridge_construction/main/bridging.c 388574 
> 
> Diff: https://reviewboard.asterisk.org/r/2535/diff/
> 
> 
> Testing
> -------
> 
> Added test code to add a callback when a channel leaves a bridge.
> 1) The callback was called when the channel left the bridge and was not hung up.
> 2) The failed callback was called when the channel simply hung up.
> 
> Added an explicit remove of the callback datastore.
> The failed callback was called as expected.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130514/15bf0553/attachment-0001.htm>


More information about the asterisk-dev mailing list