[asterisk-app-dev] Originate/Channel Creation as a two step process
Paul Belanger
paul.belanger at polybeacon.com
Wed Dec 4 14:09:46 CST 2013
On Wed, Dec 4, 2013 at 2:59 PM, Matthew Jordan <mjordan at digium.com> wrote:
> Ben Langfeld asked an excellent question at AdhearsionConf about channel
> creation in ARI. Currently, when a channel is created via ARI, the response
> contains the channel that was created in the message body. Asterisk will
> then immediately begin running the channel (that is, dialling the specified
> endpoint) while the response is being sent back to the client. While
> "speedy", this creates the situation where the client can potentially
> receive events for a channel before it has received the successful response
> to the channel creation.
>
> That seems less than ideal.
>
> Ideally, you would create the channel and receive a response indicating what
> channel you just created. Once you've done that, you'd initiate another
> request to start running the channel. This is really the only way to keep
> events from showing up until after you've received the handle to the
> channel.
>
> Something like:
>
> POST /channels?endpoint=PJSIP/matt&app=hello-world
> => Returns 200 OK with channel 12345
> POST /channels/12345/run
>
> Thoughts?
>
My immediate response is how do we get around the issue using AMI
Originate async? IIRC you would track the event using the ActionID
which is user generated. So why don't we do the same thing? Add the
ability for an application to tag events to transactions.
--
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger
More information about the asterisk-app-dev
mailing list