Re: How create a dialplan (more exten in sequence) from ARI?

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

 




On Wed, Feb 11, 2015 at 1:50 AM, Oscar <scriviaoscar@xxxxxxxx> wrote:
How create a dialplan (more exten in sequence) from ARI?


ARI is not dialplan execution. ARI allows you to build an application that the dialplan executes.

See the overview article on the Asterisk wiki for more explanation [1].
 
My goal is:

in automatic asterisk launch a call (cron php curl), when the caller answer then start one or more exten...

I would to create one or more exten from ARI in sequence (not one exten alone, like a simple command from curl "http://.../channels/{channel_id}/play/").


I'm not sure what you mean by "create exten", as that's not a concept in Asterisk. An extension is a location in the dialplan that a channel can execute; you typically don't create them dynamically.

It sounds like you want to create outbound channels and play media to them. That is achievable using ARI. Through ARI, you can:
* Create channels using the POST /channels operation, and place them in your Stasis application [2]
* Control the channels in your Stasis application, including playing media to them using POST /channels/{channel_id}/play [3]
* Release channels back to the dialplan using POST /channels/{channel_id}/continue [4], or hang them up using DELETE /channels/{channel_id} [5]
 
ps. where is more ARI documents?


Documentation for ARI is on the Asterisk wiki. Several walk through tutorials have been written that cover basic usage of ARI and a Stasis application; manipulation of channels, bridges, and media; and more [1]. Code examples for those tutorials are on Github [6], and are available in a variety of languages, including Python, _javascript_, and C#.
 
thanks a lot
 

[1] https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-originate
[3] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-play
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-continueInDialplan
[5] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-hangup
[6] https://github.com/asterisk/ari-examples

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[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