From 10ba6bf8a8114278ca974861ecebcb3a827d8d5b Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Thu, 23 May 2013 20:11:35 +0000 Subject: 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 --- rest-api/api-docs/events.json | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'rest-api/api-docs/events.json') diff --git a/rest-api/api-docs/events.json b/rest-api/api-docs/events.json index 4a36da3b8..0e0a822cf 100644 --- a/rest-api/api-docs/events.json +++ b/rest-api/api-docs/events.json @@ -69,7 +69,31 @@ "channel_hangup_request": { "type": "ChannelHangupRequest" }, "channel_varset": { "type": "ChannelVarset" }, "stasis_end": { "type": "StasisEnd" }, - "stasis_start": { "type": "StasisStart" } + "stasis_start": { "type": "StasisStart" }, + "playback_started": { "type": "PlaybackStarted" }, + "playback_finished": { "type": "PlaybackFinished" } + } + }, + "PlaybackStarted": { + "id": "PlaybackStarted", + "description": "Event showing the start of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } + } + }, + "PlaybackFinished": { + "id": "PlaybackFinished", + "description": "Event showing the completion of a media playback operation.", + "properties": { + "playback": { + "type": "Playback", + "description": "Playback control object", + "required": true + } } }, "ApplicationReplaced": { -- cgit v1.2.3