[asterisk-dev] [Code Review] The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.

Russell Bryant reviewboard at asterisk.org
Sun Nov 21 12:32:32 CST 2010



> On 2010-11-16 17:14:29, rmudgett wrote:
> > /branches/1.8/apps/app_macro.c, line 545
> > <https://reviewboard.asterisk.org/r/1013/diff/1/?file=12919#file12919line545>
> >
> >     This needs a resolution.  I am leaning toward just removing the test since it is always true.
> >     
> >     The comment about softhangup and ASYNCGOTO does not seem to apply anymore.  (For code 1.6.2 and later anyway.)

You'd have to dig through svn history on this one to find out what happened here.  I bet that this got changed as a part of a mass change to move away from doing direct reads of chan->softhangup.  If you look back to when the line was first added, there may have been a good reason for it.

Other than coming to a resolution on this part, the rest of this patch looks good to me.


- Russell


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


On 2010-11-16 16:32:25, rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1013/
> -----------------------------------------------------------
> 
> (Updated 2010-11-16 16:32:25)
> 
> 
> Review request for Asterisk Developers, Russell Bryant, Terry Wilson, and David Vossel.
> 
> 
> Summary
> -------
> 
> To recreate the problem:
> 1) Party A calls Party B
> 2) Invoke CLI "channel redirect" command to redirect channel call leg associated with A.
> 3) All associated channels are hung up.
> 
> Note that if the CLI command were done on the channel call leg associated with B it works.
> 
> This regression was a result of the fix for issue 16946 (https://reviewboard.asterisk.org/r/740/).
> 
> The regression affects all features that use an async goto to execute the dialplan because of an external event: Channel redirect, AMI redirect, SIP REFER, FAX detection.
> 
> The struct ast_channel._softhangup code is a mess.  The variable is used for several purposes that do not necessarily result in the call being hung up.  I have added doxygen comments to describe how the various _softhangup bits are used.  I have corrected all the places where the variable was tested in a non-bit oriented manner.  
> 
> 
> This addresses bugs 18171, 18185, 18192, 18211, and 18230.
>     https://issues.asterisk.org/view.php?id=18171
>     https://issues.asterisk.org/view.php?id=18185
>     https://issues.asterisk.org/view.php?id=18192
>     https://issues.asterisk.org/view.php?id=18211
>     https://issues.asterisk.org/view.php?id=18230
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/apps/app_macro.c 295221 
>   /branches/1.8/include/asterisk/channel.h 295221 
>   /branches/1.8/include/asterisk/frame.h 295221 
>   /branches/1.8/main/channel.c 295221 
>   /branches/1.8/main/pbx.c 295221 
> 
> Diff: https://reviewboard.asterisk.org/r/1013/diff
> 
> 
> Testing
> -------
> 
> The channel redirect command no longer causes the call leg of party A to be hungup.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20101121/7d880173/attachment.htm 


More information about the asterisk-dev mailing list