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
This commit is contained in:
David M. Lee
2013-11-21 15:56:34 +00:00
parent 71612fb007
commit d1ad4a95f8
6 changed files with 318 additions and 4 deletions

View File

@@ -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",