ari: Add Snoop operation for spying/whispering on channels.

The Snoop operation can be invoked on a channel to spy or
whisper on it. It returns a channel that any channel operations
can then be invoked on (such as record to do monitoring).

(closes issue ASTERISK-22780)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3003/
........

Merged revisions 403117 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-11-23 12:40:46 +00:00
parent a368df42d4
commit eda7126862
8 changed files with 729 additions and 10 deletions

View File

@@ -954,6 +954,91 @@
]
}
]
},
{
"path": "/channels/{channelId}/snoop",
"description": "Snoop (spy/whisper) on a channel",
"operations": [
{
"httpMethod": "POST",
"summary": "Start snooping.",
"notes": "Snoop (spy/whisper) on a specific channel.",
"nickname": "snoopChannel",
"responseClass": "Channel",
"parameters": [
{
"name": "channelId",
"description": "Channel's id",
"paramType": "path",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "spy",
"description": "Direction of audio to spy on",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string",
"defaultValue": "none",
"allowableValues": {
"valueType": "LIST",
"values": [
"none",
"both",
"out",
"in"
]
}
},
{
"name": "whisper",
"description": "Direction of audio to whisper into",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string",
"defaultValue": "none",
"allowableValues": {
"valueType": "LIST",
"values": [
"none",
"both",
"out",
"in"
]
}
},
{
"name": "app",
"description": "Application the snooping channel is placed into",
"paramType": "query",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "appArgs",
"description": "The application arguments to pass to the Stasis application",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 400,
"reason": "Invalid parameters"
},
{
"code": 404,
"reason": "Channel not found"
}
]
}
]
}
],
"models": {