cURL AGI actions possible?

Hi all!

Im wondering if there are a possibility to manipulate a channel and send an agi action from outside via CURL. Some of u helped me before with dialplan variables etc… But im studing the Wiki and not having solutions from my part.

I want to do this for example:
The same as dialplan —> n,agi(speech-recog.agi,es,2,“hello-world”);

But from outside for example:
$ curl -v -u asterisk:asterisk -X POST “http://localhost:8088/ari/channels/1400609726.3/… (thats what I need)

Is that possible? Sorry if im a bit clumsy with that but dont understand how to focus this with variables…

If u can help me with some expample wil apreciate it a lot!

Thanks

Are you trying to externally ‘trigger’ transcribing a call in progress?

I dont understand, what is the relation between

Hi, thanks for respondes.

What Im trying to do is to launch an agi script (speech-recog.agi located at agi-bin) from outside if i know the channel number.

Something like: Ok, lets say “Hi this is a test” into the chanel XXXXXXXXXXX

But from external server via curl for example, if its possible…

You can only make a channel run AGI by redirecting it to a dialplan step that does that. That is probably most easily done using AMI, but AMI does not use URIs. ARI uses URIs, but I’m not sure that there is anything that would allow a channel redirect, and if there is, redirecting the channel will disconnect it from further ARI operations until the dialplan puts it back into the Stasis application.

Even with AMI, it would be a forced Goto, would tear down any bridges and hangup the other side of the bridge, and would require the new dialplan sequence to know where to return to, if any continuation of the original sequence was required.

If all you wanted to do was to inject the auido, you would probably need to create a new channel and use whispering to inject the audio.

Hi David,

Yea thats a good idea. I was thinking about snoop channel but… It means to have the text-to-speech script outside from asterisk server. And my idea is that other people can use the TTS Zaf script .agi that i have inside my asterisk server (agi-bin). If I do what u said my server will only recieve a post coomand injecting audio with some file…

You understand me? Sorry if im not expressing at all

Thanks in advance

this can be done using Chanspy and Local channel, I made something similar on the past https://www.youtube.com/watch?v=2eOYq0Mvoyk

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