From d1ad4a95f8967cc407d828af258c772aa69ab6e3 Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Thu, 21 Nov 2013 15:56:34 +0000 Subject: ari: Add silence generator controls This patch adds the ability to start a silence generator on a channel via ARI. This generator will play silence on the channel (avoiding audio timeouts on the peer) until it is stopped, or some other media operation is started (like playing media, starting music on hold, etc.). (closes issue ASTERISK-22514) Review: https://reviewboard.asterisk.org/r/3019/ ........ Merged revisions 402926 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402928 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- rest-api/api-docs/channels.json | 61 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) (limited to 'rest-api') diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json index dd611ccaa..bb63c9ad6 100644 --- a/rest-api/api-docs/channels.json +++ b/rest-api/api-docs/channels.json @@ -553,7 +553,7 @@ { "httpMethod": "POST", "summary": "Play music on hold to a channel.", - "notes": "Using media operations such as playOnChannel on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", + "notes": "Using media operations such as /play on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.", "nickname": "startMoh", "responseClass": "void", "parameters": [ @@ -613,6 +613,65 @@ } ] }, + { + "path": "/channels/{channelId}/silence", + "description": "Play silence to a channel", + "operations": [ + { + "httpMethod": "POST", + "summary": "Play silence to a channel.", + "notes": "Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.", + "nickname": "startSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + }, + { + "httpMethod": "DELETE", + "summary": "Stop playing silence to a channel.", + "nickname": "stopSilence", + "responseClass": "void", + "parameters": [ + { + "name": "channelId", + "description": "Channel's id", + "paramType": "path", + "required": true, + "allowMultiple": false, + "dataType": "string" + } + ], + "errorResponses": [ + { + "code": 404, + "reason": "Channel not found" + }, + { + "code": 409, + "reason": "Channel not in a Stasis application" + } + ] + } + ] + }, { "path": "/channels/{channelId}/play", "description": "Play media to a channel", -- cgit v1.2.3