ARI: Add method to create a new channel.

This adds a new ARI method to the channels resource that allows for the
creation of a new channel. The channel is created and then placed into
the specified Stasis application.

This is different from the existing originate method that creates a
channel, dials it, and then places the answered channel into the
dialplan or a Stasis application. This method does not attempt to call
the channel at all. Dialing is left as a later step after channel
creation. This allows for pre-dialing channel manipulation if desired.

ASTERISK-25889

Change-Id: I3c96a0aba914b08e39f6256371a5bd4c92cbded8
This commit is contained in:
Mark Michelson
2016-03-30 17:01:28 -05:00
committed by Joshua Colp
parent ef4d3f1328
commit dd48d60c5b
5 changed files with 349 additions and 2 deletions

View File

@@ -139,6 +139,68 @@
}
]
},
{
"path": "/channels/create",
"description": "Create a channel and place it in a Stasis app, but do not dial the channel yet.",
"operations": [
{
"httpMethod": "POST",
"summary": "Create channel.",
"nickname": "create",
"responseClass": "Channel",
"parameters": [
{
"name": "endpoint",
"description": "Endpoint for channel communication",
"paramType": "query",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "app",
"description": "Stasis Application to place channel into",
"paramType": "query",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "appArgs",
"description": "The application arguments to pass to the Stasis application provided by 'app'. Mutually exclusive with 'context', 'extension', 'priority', and 'label'.",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "channelId",
"description": "The unique id to assign the channel on creation.",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "otherChannelId",
"description": "The unique id to assign the second channel when using local channels.",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "originator",
"description": "Unique ID of the calling channel",
"paramType": "query",
"required": false,
"allowMultiple": false,
"dataType": "string"
}
]
}
]
},
{
"path": "/channels/{channelId}",
"description": "Active channel",