[asterisk-dev] [Code Review] 2512: Move origination to dialing API

Mark Michelson reviewboard at asterisk.org
Thu May 9 13:17:47 CDT 2013


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



/trunk/main/dial.c
<https://reviewboard.asterisk.org/r/2512/#comment16517>

    No need to set this NULL.



/trunk/main/dial.c
<https://reviewboard.asterisk.org/r/2512/#comment16518>

    The bitwise or should be a logical or.



/trunk/main/dial.c
<https://reviewboard.asterisk.org/r/2512/#comment16520>

    The bitwise or should be a logical or



/trunk/main/pbx.c
<https://reviewboard.asterisk.org/r/2512/#comment16523>

    No need to have the if. It's fine to ast_free() a NULL pointer.



/trunk/main/pbx.c
<https://reviewboard.asterisk.org/r/2512/#comment16575>

    You're setting yourself up for deadlocks here by keeping the channel locked while a separate thread executes application/dialplan.
    
    Also, I don't see where the corresponding ast_channel_unlock() is (excepting when thread creation fail)



/trunk/main/pbx.c
<https://reviewboard.asterisk.org/r/2512/#comment16578>

    Hm, I don't think this if is correct. Consider an asynchronous outgoing exten operation. When the code reaches this point, there's a good chance that the outgoing dial is not answered. If the "failed" extension exists, it will run even though presumably the call just hasn't been answered yet. I think you need to add a check for synchronous > 1 to this as well.



/trunk/main/pbx.c
<https://reviewboard.asterisk.org/r/2512/#comment16580>

    Consider using ast_pbx_start() instead of ast_pbx_run() here. As is, this will block the thread until the failed extension completes.


- Mark Michelson


On May 8, 2013, 6:52 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2512/
> -----------------------------------------------------------
> 
> (Updated May 8, 2013, 6:52 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change adds a few minor features to the dialing API and moves origination to using it. As a result code duplication is reduced and readability has increased.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/dial.h 388010 
>   /trunk/main/dial.c 388010 
>   /trunk/main/manager_channels.c 388010 
>   /trunk/main/pbx.c 388010 
> 
> Diff: https://reviewboard.asterisk.org/r/2512/diff/
> 
> 
> Testing
> -------
> 
> Tested various origination scenarios and confirmed they all work as expected.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

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


More information about the asterisk-dev mailing list