ARI: Add method to Dial a created channel.

This adds a new ARI method that allows for you to dial a channel that
you previously created in ARI.

By combining this with the create method for channels, it allows for a
workflow where a channel can be created, manipulated, and then dialed.
The channel is under control of the ARI application during all stages of
the Dial and can even be manipulated based on channel state changes
observed within an ARI application.

The overarching goal for this is to eventually be able to add a dialed
channel to a Stasis bridge earlier than the "Up" state. However, at the
moment more work is needed in the Dial and Bridge APIs in order to
facilitate that.

ASTERISK-25889 #close

Change-Id: Ic6c399c791e66c4aa52454222fe4f8b02483a205
This commit is contained in:
Mark Michelson
2016-03-30 17:18:39 -05:00
committed by Joshua Colp
parent dd48d60c5b
commit abbb2edd4c
8 changed files with 371 additions and 104 deletions

View File

@@ -1502,6 +1502,59 @@
]
}
]
},
{
"path": "/channels/{channelId}/dial",
"description": "Dial a channel",
"operations": [
{
"httpMethod": "POST",
"summary": "Dial a created channel.",
"nickname": "dial",
"responseClass": "void",
"parameters": [
{
"name": "channelId",
"description": "Channel's id",
"paramType": "path",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "caller",
"description": "Channel ID of caller",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "timeout",
"description": "Dial timeout",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "int",
"defaultValue": 0,
"allowableValues": {
"valueType": "RANGE",
"min": 0
}
}
],
"errorResponses": [
{
"code": 404,
"reason": "Channel cannot be found."
},
{
"code": 409,
"reason": "Channel cannot be dialed."
}
]
}
]
}
],
"models": {