ARI commands on GET/POST

Hi all!

Are there any site where I can find a list of commands that I can send to Asterisk via CURL?

For example:
$ curl -v -u asterisk:asterisk -X POST “http://localhost:8088/ari/channels/1400609726.3/play?media=sound:hello-world

This line reproduce hello-world into the channel (play?media=sound:hello-world)
I mean that orders.

Thanks in advance

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API

Too much thanks David!

And do u know if its possible to order a script from get or post? I mean, i have a .agi script for google stt and in the dialplan i put this rule if I want to load it:

n,agi(speech-recog.agi,es,2,#);

Are there any possibility to send this order vía CURL?
Or any other possibilitie to handle it?

Thanks in advance

As I understand it, ARI is processed by an application. You can’t nest the execution of applications on a channel, so nesting AGI would not be possible.

You could probably simulate it by setting channel variables and having the dialplan run AGI, then re-invoke Stasis, but I haven’t used ARI myself.

Okay I understand.

My Idea is to have the possibility of running .agi from curl (text-to-speech)
Example:

Okay, say “hi this is a test” into the channel XXXXXXXXXXXXX

And im not sure if CURL and ARI is the best idea…or if other possibility is better…

Thanks in advance

There’s nothing inherently built in as @david551 said. The closest thing you could do is as he says, set a channel variable and go back into the dialplan.

Hi,

Thanks for respones. I need you to excuse me but I dont understand it at all. Can you please expose a simple example of what u mean?

thx

I don’t have an example handy to do such a thing. But the documentation on the wiki previously linked has routes for setting a variable, and also for sending the channel back into the dialplan.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.