[asterisk-dev] [Code Review] 2868: call forwarding: When forwarding calls from originate, Asterisk would crash.

Matt Jordan reviewboard at asterisk.org
Wed Sep 18 16:01:41 CDT 2013


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



/branches/12/main/dial.c
<https://reviewboard.asterisk.org/r/2868/#comment18914>

    I know you copied this approach from elsewhere, but this should really just be AST_MAX_CONTEXT + AST_MAX_EXTENSION + 1.
    
    Also: tmp variable names are a last resort. How about destination? That's used elsewhere when constructing an extension at context that is used as the destination location for a channel.



/branches/12/main/dial.c
<https://reviewboard.asterisk.org/r/2868/#comment18916>

    Put a line between variable declarations and code.



/branches/12/main/dial.c
<https://reviewboard.asterisk.org/r/2868/#comment18915>

    You can technically unlock the channel after the snprintf.


- Matt Jordan


On Sept. 18, 2013, 5:35 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2868/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2013, 5:35 p.m.)
> 
> 
> Review request for Asterisk Developers, Joshua Colp and Matt Jordan.
> 
> 
> Bugs: ASTERISK-22487
>     https://issues.asterisk.org/jira/browse/ASTERISK-22487
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When forwarding a call (basically a blind transfer when ringing) that has been originated, Asterisk would crash because a the original channel would be hung up twice. Also the context of the forwarding channel wouldn't be respected. This patch brings things more in line with how forwarding is handled in basic calls.
> 
> 
> Diffs
> -----
> 
>   /branches/12/main/dial.c 399197 
> 
> Diff: https://reviewboard.asterisk.org/r/2868/diff/
> 
> 
> Testing
> -------
> 
> Originated a call to SIP/A which would send the call into a holding bridge
> While SIP/A was ringing, it requests forwarding to SIP/B
> SIP/B picks up.
> 
> Prior to changes:
> SIP/B wouldn't ring
> Asterisk would crash due to hanging up a channel without a technology (since the first hangup strips the technology)
> 
> After the change:
> SIP/B rings, picking up the call causes SIP/B to enter the holding bridge as expected (once local channels optimize out anyway).
> Asterisk no longer crashes.
> 
> 
> Thanks,
> 
> jrose
> 
>

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


More information about the asterisk-dev mailing list