[asterisk-dev] [Code Review] 2572: Stasis-HTTP: Flesh out bridging capabilities
David Lee
reviewboard at asterisk.org
Mon Jun 3 16:00:50 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2572/#review8773
-----------------------------------------------------------
Very good! This also seems to address ASTERISK-21622, ASTERISK-21621, ASTERISK-21624, ASTERISK-21623, ASTERISK-21626, and ASTERISK-21625.
trunk/include/asterisk/stasis_app.h
<https://reviewboard.asterisk.org/r/2572/#comment17236>
This should really take an ast_bridge_capability instead of a string. The string-to-flag conversion should happen at a higher layer (although a parsing function makes sense in bridging.h, so it's consistent.)
trunk/include/asterisk/stasis_app.h
<https://reviewboard.asterisk.org/r/2572/#comment17235>
s/bridge not in Stasis/bridge not created by Stasis/
trunk/res/res_stasis.c
<https://reviewboard.asterisk.org/r/2572/#comment17237>
What's with the copy?
trunk/res/stasis_http/resource_bridges.c
<https://reviewboard.asterisk.org/r/2572/#comment17239>
You should distinguish between 404 (bridge does not exist) and 409 (bridge isn't a Stasis bridge).
trunk/res/stasis_http/resource_bridges.c
<https://reviewboard.asterisk.org/r/2572/#comment17241>
404/409 would indicate that the bridge was not found/not in Stasis. Since this is the channel, it's not an appropriate error code.
I would go with a 422 Unprocessable Entity, since that indicates that the query is syntactically correct, but semantically invalid.
http://stackoverflow.com/a/4786067/115478
trunk/res/stasis_http/resource_bridges.c
<https://reviewboard.asterisk.org/r/2572/#comment17242>
Unnecessary code.
trunk/res/stasis_http/resource_bridges.c
<https://reviewboard.asterisk.org/r/2572/#comment17243>
Idem.
trunk/res/stasis_http/resource_bridges.c
<https://reviewboard.asterisk.org/r/2572/#comment17244>
There's also a 409 condition where the given channel isn't in the given bridge.
trunk/res/stasis_http/resource_bridges.c
<https://reviewboard.asterisk.org/r/2572/#comment17245>
I wouldn't bother fetching the snapshot from cache. Be consistent and always build the snapshot from the bridge you just created.
- David Lee
On May 29, 2013, 2:09 p.m., opticron wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2572/
> -----------------------------------------------------------
>
> (Updated May 29, 2013, 2:09 p.m.)
>
>
> Review request for Asterisk Developers and David Lee.
>
>
> Bugs: ASTERISK-21711
> https://issues.asterisk.org/jira/browse/ASTERISK-21711
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> This adds support for Stasis applications to receive bridge-related messages when the application shows interest in a given bridge.
>
> To supplement this work and test it, this also adds support for the following bridge-related Stasis-HTTP functionality:
> * GET stasis/bridges
> * GET stasis/bridges/{bridgeId}
> * POST stasis/bridges
> * DELETE stasis/bridges/{bridgeId}
> * POST stasis/bridges/{bridgeId}/addChannel
> * POST stasis/bridges/{bridgeId}/removeChannel
>
>
> Diffs
> -----
>
> trunk/include/asterisk/stasis_app.h 390037
> trunk/include/asterisk/stasis_bridging.h 390037
> trunk/main/stasis_bridging.c 390037
> trunk/res/res_stasis.c 390037
> trunk/res/res_stasis_bridge_add.c PRE-CREATION
> trunk/res/res_stasis_bridge_add.exports.in PRE-CREATION
> trunk/res/res_stasis_json_events.c 390037
> trunk/res/res_stasis_json_events.exports.in 390037
> trunk/res/stasis/app.h 390037
> trunk/res/stasis/app.c 390037
> trunk/res/stasis/control.c 390037
> trunk/res/stasis_http/resource_bridges.c 390037
> trunk/res/stasis_json/resource_events.h 390037
> trunk/rest-api/api-docs/bridges.json 390037
> trunk/rest-api/api-docs/events.json 390037
>
> Diff: https://reviewboard.asterisk.org/r/2572/diff/
>
>
> Testing
> -------
>
> Manual testing of the 6 implemented interfaces with curl and wscat to ensure bridge-related messages are delivered when appropriate.
>
>
> Thanks,
>
> opticron
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130603/e10b7b24/attachment-0001.htm>
More information about the asterisk-dev
mailing list