This patch implements the REST API's for POST /channels/{channelId}/play
authorDavid M. Lee <dlee@digium.com>
Thu, 23 May 2013 20:11:35 +0000 (20:11 +0000)
committerDavid M. Lee <dlee@digium.com>
Thu, 23 May 2013 20:11:35 +0000 (20:11 +0000)
commit10ba6bf8a8114278ca974861ecebcb3a827d8d5b
tree1406ede124cf9665cb9f9244f9339b6cb522aa8b
parent3464e0919afe398717b93b20fff37560c6d4478f
This patch implements the REST API's for POST /channels/{channelId}/play
and GET /playback/{playbackId}.

This allows an external application to initiate playback of a sound on a
channel while the channel is in the Stasis application.

/play commands are issued asynchronously, and return immediately with
the URL of the associated /playback resource. Playback commands queue up,
playing in succession. The /playback resource shows the state of a
playback operation as enqueued, playing or complete. (Although the
operation will only be in the 'complete' state for a very short time,
since it is almost immediately freed up).

(closes issue ASTERISK-21283)
(closes issue ASTERISK-21586)
Review: https://reviewboard.asterisk.org/r/2531/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
20 files changed:
include/asterisk/app.h
include/asterisk/stasis_app_playback.h [new file with mode: 0644]
include/asterisk/stasis_channels.h
include/asterisk/stasis_http.h
main/channel_internal_api.c
main/stasis_channels.c
res/res_stasis_http.c
res/res_stasis_http_channels.c
res/res_stasis_json_events.c
res/res_stasis_json_events.exports.in
res/res_stasis_playback.c [new file with mode: 0644]
res/res_stasis_playback.exports.in [new file with mode: 0644]
res/stasis/control.c
res/stasis_http/resource_channels.c
res/stasis_http/resource_channels.h
res/stasis_http/resource_playback.c
res/stasis_json/resource_channels.h
res/stasis_json/resource_events.h
rest-api/api-docs/channels.json
rest-api/api-docs/events.json