Originate/Channel Creation as a two step process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20131204/b6ee242a/attachment.html>


[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux