[asterisk-dev] [Code Review] 3672: Bridging: Allow DTMF hook to pass execution to a different hook

rmudgett reviewboard at asterisk.org
Wed Jun 25 18:26:21 CDT 2014


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



trunk/main/bridge_channel.c
<https://reviewboard.asterisk.org/r/3672/#comment22502>

    There is no need to lock the channel if res == 0.
    
    Also assignment inside the if test should be avoided if possible.  Pulling the res test outside of the channel lock area allows avoiding the assignment in the if test.
    
    if !res
      break
    lock(chan)
    reinterpret = getvar("REINTERPRET")
    if !strlen_zero(reinterpret)
       ast_debug("requested reinterpret to")
       hook = ao2_find()
       if !hook
          ast_debug()
    unlock(chan)


- rmudgett


On June 25, 2014, 2:14 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3672/
> -----------------------------------------------------------
> 
> (Updated June 25, 2014, 2:14 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change allows DTMF hooks to request that an alternative DTMF hook be executed. This behavior is triggered by a new return value for DTMF hooks while the hook to be executed is specified in the REINTERPRET_FEATURE channel variable.
> 
> 
> Diffs
> -----
> 
>   trunk/tests/test_channel_feature_hooks.c PRE-CREATION 
>   trunk/main/bridge_channel.c 416731 
>   trunk/include/asterisk/bridge_features.h 416731 
> 
> Diff: https://reviewboard.asterisk.org/r/3672/diff/
> 
> 
> Testing
> -------
> 
> Manual testing as well as the attached unittest. Note that the DTMF and interval tests have already been reviewed as part of https://reviewboard.asterisk.org/r/3649/ and that only the reinterpret DTMF test is new along with helper function reinterpret_callback().
> 
> 
> Thanks,
> 
> opticron
> 
>

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


More information about the asterisk-dev mailing list