[asterisk-dev] [Code Review] 3649: Bridging: Allow channels to define additional bridging hooks

Mark Michelson reviewboard at asterisk.org
Thu Jun 19 12:48:18 CDT 2014


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



trunk/include/asterisk/bridge_channel.h
<https://reviewboard.asterisk.org/r/3649/#comment22274>

    Document that for all three of these functions, chan should be locked before calling.



trunk/include/asterisk/bridge_channel.h
<https://reviewboard.asterisk.org/r/3649/#comment22268>

    Add documentation that chan must be locked when calling this.



trunk/include/asterisk/bridge_features.h
<https://reviewboard.asterisk.org/r/3649/#comment22263>

    If you can, make from const.



trunk/main/bridge.c
<https://reviewboard.asterisk.org/r/3649/#comment22264>

    You might want to give this a test run with something that uses interval hooks. I believe that if from has any interval hooks, this will result in an infinite loop. You either need to:
    
    1) remove the hook from from->interval_hooks instead of just peeking at it, or
    2) Increase the index that you peek at on each iteration.
    
    Since it seems like the idea is not to actually mess with from any, option 2 seems like the way to go.



trunk/main/bridge_channel.c
<https://reviewboard.asterisk.org/r/3649/#comment22275>

    It's a minor thing, but since this stores general bridge features and not just DTMF hooks, I think the name of this should be changed.



trunk/main/bridge_channel.c
<https://reviewboard.asterisk.org/r/3649/#comment22266>

    Is this cast required? Either way, it's one of the weirder-looking things I've come across :)


- Mark Michelson


On June 19, 2014, 3:36 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3649/
> -----------------------------------------------------------
> 
> (Updated June 19, 2014, 3:36 p.m.)
> 
> 
> Review request for Asterisk Developers and rmudgett.
> 
> 
> Bugs: AFS-78
>     https://issues.asterisk.org/jira/browse/AFS-78
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch allows the current owner of a channel to define various feature hooks to be made available once the channel has entered a bridge.
> 
> Currently, it is only possible to attach these hooks by calling ast_bridge_join or as_bridge_impart directly.
> 
> 
> Diffs
> -----
> 
>   trunk/main/bridge_channel.c 416438 
>   trunk/main/bridge.c 416438 
>   trunk/include/asterisk/bridge_features.h 416438 
>   trunk/include/asterisk/bridge_channel.h 416438 
> 
> Diff: https://reviewboard.asterisk.org/r/3649/diff/
> 
> 
> Testing
> -------
> 
> Ensured that DTMF hooks could be attached to the channel via this mechanism and that they became available and were executable once the channel entered a bridge via Dial().
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140619/bc8dba39/attachment-0001.html>


More information about the asterisk-dev mailing list