mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
res_ari_channels: Add ring operation, dtmf operation, hangup reasons, and tweak early media.
The ring operation sends ringing to the specified channel it is invoked on. The dtmf operation can be used to send DTMF digits to the specified channel of a specific length with a wait time in between. Finally hangup reasons allow you to specify why a channel is being hung up (busy, congestion). Early media behavior has also been tweaked slightly. When playing media to a channel it will no longer automatically answer. If it has not been answered a progress indication is sent instead. (closes issue ASTERISK-22701) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2916/ ........ Merged revisions 402358 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -138,9 +138,30 @@
|
||||
"required": true,
|
||||
"allowMultiple": false,
|
||||
"dataType": "string"
|
||||
},
|
||||
{
|
||||
"name": "reason",
|
||||
"description": "Reason for hanging up the channel",
|
||||
"paramType": "query",
|
||||
"required": false,
|
||||
"allowMultiple": false,
|
||||
"dataType": "string",
|
||||
"defalutValue": "normal",
|
||||
"allowableValues": {
|
||||
"valueType": "LIST",
|
||||
"values": [
|
||||
"normal",
|
||||
"busy",
|
||||
"congestion"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"errorResponses": [
|
||||
{
|
||||
"code": 400,
|
||||
"reason": "Invalid reason for hangup provided"
|
||||
},
|
||||
{
|
||||
"code": 404,
|
||||
"reason": "Channel not found"
|
||||
@@ -237,6 +258,118 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/channels/{channelId}/ring",
|
||||
"description": "Send a ringing indication to a channel",
|
||||
"operations": [
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Indicate ringing to a channel.",
|
||||
"nickname": "ringChannel",
|
||||
"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}/dtmf",
|
||||
"description": "Send DTMF to a channel",
|
||||
"operations": [
|
||||
{
|
||||
"httpMethod": "POST",
|
||||
"summary": "Send provided DTMF to a given channel.",
|
||||
"nickname": "sendDTMFChannel",
|
||||
"responseClass": "void",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "channelId",
|
||||
"description": "Channel's id",
|
||||
"paramType": "path",
|
||||
"required": true,
|
||||
"allowMultiple": false,
|
||||
"dataType": "string"
|
||||
},
|
||||
{
|
||||
"name": "dtmf",
|
||||
"description": "DTMF To send.",
|
||||
"paramType": "query",
|
||||
"required": false,
|
||||
"allowMultiple": false,
|
||||
"dataType": "string"
|
||||
},
|
||||
{
|
||||
"name": "before",
|
||||
"description": "Amount of time to wait before DTMF digits (specified in milliseconds) start.",
|
||||
"paramType": "query",
|
||||
"required": false,
|
||||
"allowMultiple": false,
|
||||
"dataType": "int",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
"name": "between",
|
||||
"description": "Amount of time in between DTMF digits (specified in milliseconds).",
|
||||
"paramType": "query",
|
||||
"required": false,
|
||||
"allowMultiple": false,
|
||||
"dataType": "int",
|
||||
"defaultValue": 100
|
||||
},
|
||||
{
|
||||
"name": "duration",
|
||||
"description": "Length of each DTMF digit (specified in milliseconds).",
|
||||
"paramType": "query",
|
||||
"required": false,
|
||||
"allowMultiple": false,
|
||||
"dataType": "int",
|
||||
"defaultValue": 100
|
||||
},
|
||||
{
|
||||
"name": "after",
|
||||
"description": "Amount of time to wait after DTMF digits (specified in milliseconds) end.",
|
||||
"paramType": "query",
|
||||
"required": false,
|
||||
"allowMultiple": false,
|
||||
"dataType": "int",
|
||||
"defaultValue": 0
|
||||
}
|
||||
],
|
||||
"errorResponses": [
|
||||
{
|
||||
"code": 400,
|
||||
"reason": "DTMF is required"
|
||||
},
|
||||
{
|
||||
"code": 404,
|
||||
"reason": "Channel not found"
|
||||
},
|
||||
{
|
||||
"code": 409,
|
||||
"reason": "Channel not in a Stasis application"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "/channels/{channelId}/mute",
|
||||
"description": "Mute a channel",
|
||||
|
Reference in New Issue
Block a user