diff options
author | Mark Michelson <mmichelson@digium.com> | 2016-06-01 13:48:00 -0500 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2016-06-09 14:43:15 -0500 |
commit | 1fd3a7849e3a1136f5722221a9f1874a5587b6d6 (patch) | |
tree | 55340fac61b4a75868c7c8e8b6d1d05c4eca44d9 /rest-api | |
parent | 608e0267e8512e16e186cbdc874cd7902e287ff7 (diff) |
ARI: Ensure proper channel state on operations.
ARI was recently outfitted with operations to create and dial channels.
This leads to the ability to try funny stuff. You could create a channel
and then immediately try to play back media on it. You could create a
channel, dial it, and while it is ringing attempt to make it continue in
the dialplan.
This commit attempts to fix this by adding a channel state check to
operations that should not be able to operate on outbound channels that
have not yet answered. If a channel is in an invalid state, we will send
a 412 response.
ASTERISK-26047 #close
Reported by Mark Michelson
Change-Id: I2ca51bf9ef2b44a1dc5a73f2d2de35c62c37dfd8
Diffstat (limited to 'rest-api')
-rw-r--r-- | rest-api/api-docs/channels.json | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json index aafd231a1..34436c7b8 100644 --- a/rest-api/api-docs/channels.json +++ b/rest-api/api-docs/channels.json @@ -453,6 +453,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -501,6 +505,10 @@ { "code": 422, "reason": "Endpoint is not the same type as the channel" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -533,6 +541,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -565,6 +577,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] }, @@ -591,6 +607,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -671,6 +691,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -720,6 +744,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] }, @@ -763,6 +791,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -795,6 +827,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] }, @@ -821,6 +857,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -862,6 +902,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] }, @@ -888,6 +932,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -921,6 +969,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] }, @@ -947,6 +999,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -1021,6 +1077,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } @@ -1095,6 +1155,10 @@ { "code": 409, "reason": "Channel not in a Stasis application" + }, + { + "code": 412, + "reason": "Channel in invalid state" } ] } |