ARI: Correct error codes for bridge operations
authorDavid M. Lee <dlee@digium.com>
Fri, 23 Aug 2013 17:19:02 +0000 (17:19 +0000)
committerDavid M. Lee <dlee@digium.com>
Fri, 23 Aug 2013 17:19:02 +0000 (17:19 +0000)
commit7a581537e8baaff143254415d782a492dec97a62
treebe5296efe1ee7f85581b3e0c69c8ad6be252eb00
parent9f4849724fce1a780771e11bd5273eac2b4f61b8
ARI: Correct error codes for bridge operations

This patch adds error checking to ARI bridge operations, when
adding/removing channels to/from bridges.

In general, the error codes fall out as follows:
 * Bridge not found - 404 Not Found
 * Bridge not in Stasis - 409 Conflict
 * Channel not found - 400 Bad Request
 * Channel not in Stasis - 422 Unprocessable Entity
 * Channel not in this bridge (on remove) - 422 Unprocessable Entity

(closes issue ASTERISK-22036)
Review: https://reviewboard.asterisk.org/r/2769/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/stasis_app.h
include/asterisk/stasis_app_impl.h
res/ari/resource_bridges.c
res/res_ari_bridges.c
res/stasis/control.c
rest-api/api-docs/bridges.json