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/channels.json | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'rest-api/api-docs/channels.json') diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json index c2d77b22c..3b4d4d486 100644 --- a/rest-api/api-docs/channels.json +++ b/rest-api/api-docs/channels.json @@ -405,6 +405,14 @@ "required": true, "allowMultiple": false, "dataType": "string" + }, + { + "name": "lang", + "description": "For sounds, selects language for sound", + "paramType": "query", + "required": false, + "allowMultiple": false, + "dataType": "string" } ], "errorResponses": [ @@ -640,6 +648,44 @@ "description": "Timestamp when channel was created" } } + }, + "Playback": { + "id": "Playback", + "description": "Object representing the playback of media to a channel", + "properties": { + "id": { + "type": "string", + "description": "ID for this playback operation", + "required": true + }, + "media_uri": { + "type": "string", + "description": "URI for the media to play back.", + "required": true + }, + "target_uri": { + "type": "string", + "description": "URI for the channel or bridge to play the media on", + "required": true + }, + "language": { + "type": "string", + "description": "For media types that support multiple languages, the language requested for playback." + }, + "state": { + "type": "string", + "description": "Current state of the playback operation.", + "required": true, + "allowableValues": { + "valueType": "LIST", + "values": [ + "queued", + "playing", + "complete" + ] + } + } + } } } } -- cgit v1.2.3