]> git.ipfire.org Git - thirdparty/asterisk.git/commit
ARI: Ensure proper channel state on operations. 26/2926/3
authorMark Michelson <mmichelson@digium.com>
Wed, 1 Jun 2016 18:48:00 +0000 (13:48 -0500)
committerMark Michelson <mmichelson@digium.com>
Thu, 9 Jun 2016 19:43:15 +0000 (14:43 -0500)
commit1fd3a7849e3a1136f5722221a9f1874a5587b6d6
tree55340fac61b4a75868c7c8e8b6d1d05c4eca44d9
parent608e0267e8512e16e186cbdc874cd7902e287ff7
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
res/ari/resource_channels.c
res/res_ari_channels.c
res/res_ari_recordings.c
rest-api/api-docs/channels.json