[asterisk-dev] [Code Review] 2943: Return 409 if trying to remove a channel (in Playback) from a bridge

David Lee reviewboard at asterisk.org
Thu Oct 31 14:22:22 CDT 2013


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


What might be a preferable solution would be to change
stasis_app_control_remove_channel_from_bridge() to be asynchronous.
We're ignoring the return code anyways, and by pre-checking that the
channel is indeed in the bridge the only failures removing the channel
from the bridge would be internal to Asterisk, and you'll find
yourself digging through the log trying to figure out what went wrong
anyways.


trunk/res/ari/resource_bridges.c
<https://reviewboard.asterisk.org/r/2943/#comment19341>

    There's a possible race condition here. Between the time that you
    check, and when you call the remove code below a playback could be
    started.



trunk/res/ari/resource_bridges.c
<https://reviewboard.asterisk.org/r/2943/#comment19343>

    We're responding with JSON, the channel id ought to be its own field
    instead (or maybe in addition to) being embedded in the message
    string.


- David Lee


On Oct. 18, 2013, 7:22 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2943/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2013, 7:22 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Ran into a blocking issue, if you try to remove a channel from a bridge while playback's are queue, the HTTP request will block.  Now we return 409 listing which channel is the issue.
> 
> 
> Diffs
> -----
> 
>   trunk/rest-api/api-docs/bridges.json 401279 
>   trunk/res/res_ari_bridges.c 401279 
>   trunk/res/ari/resource_bridges.c 401279 
> 
> Diff: https://reviewboard.asterisk.org/r/2943/diff/
> 
> 
> Testing
> -------
> 
> Local development box / swagger
> 
> 
> Thanks,
> 
> Paul Belanger
> 
>

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


More information about the asterisk-dev mailing list