Comments on: Asterisk Asynchronous AGI https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/ Abandon All Hope, Ye Who Read This Blog Fri, 14 Aug 2020 20:06:49 +0000 hourly 1 https://wordpress.org/?v=5.1.9 By: moy https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-11754 Sat, 30 Jul 2016 13:17:04 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-11754 @BrettNem, That’s what AGI is for, forking a process that will handle the call. AMI is for asynchronous control over the whole Asterisk system so you can do more powerful things beyond the scope of a single call.

]]>
By: BrettNem https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-11478 Fri, 01 Jul 2016 22:15:33 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-11478 Is there anyway to execute (fork) a background process once the async.agi is established? That would be really useful to have AMI script executed in the context of the channel itself handle the call rather than some long running monitoring process on AMI

]]>
By: Steve Mathers https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-1567 Sat, 09 Feb 2013 00:51:21 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-1567 Hey, this has me very interested. i would like to try it out. im a bit confused. I do everything through a php script, kinda like this:

[cloud]
exten => 999,1,Answer
exten => 999,n,AGI(cloud.php)
exten => 999,n,Hangup

so my script runs various things. what i would like to do is a stream file in the asyncAGI. then have the program continue on to do an exec_dial to a callcenter. once that callcenter answers ill run a post-dial macro that could break the asyncAGI stream file and then the 2 parties can only hear each other. also if a digit was pressed during the stream file can i catch it with commandID and do other processing?

Also normally i would just use asterisk manager proxy and post xml to execute the AMI commands. perhaps theres a better way? Thanks for your time!

]]>
By: Nati https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-1189 Thu, 13 Dec 2012 22:38:23 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-1189 I know a lot of my friends who use this in their ofcfie. Although I have no personal experience with it yeah.Opensource software is always great for the consumers as well as for the developers. Because the consumers gets something free and high quality while the developers get to hone their skills to create better software.

]]>
By: Jeryes Farah https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-607 Mon, 12 Nov 2012 21:55:42 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-607 Hi,

I have two asterisk-java applications, that connects to the same asterisk by AsyncAGI, and both of them are receiving the same events, but only one is going to process it. The application that won’t process the new event, basically does nothing and “leaves” that channel without any operations or actions, and after concluding it, the channel get released, and interrupts the processing of the other application.
So do you know if there is a way to connect more than one async java application on the same asterisk using AsyncAgi.
Thanks in advance!

]]>
By: Moy https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-512 Sat, 09 Jun 2012 22:00:17 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-512 I’m not familiar with the inner workings of adhearsion. What is an Adhearsion server? is it an AMI client connection?

You should be able to differentiate by sending arguments like:

AGI(agi:async,arg1,arg2,arg3)

The arguments will be sent in the initial AsyncAGI manager event that is sent each time a new channel enters the AGI application, the arguments are numbered as manager headers in this format:

agi_arg_%d: value

Where %d is the number of the argument you provided. This way you could route certain requests to one server or the other.

AGI(agi:async,server1) when you want server1 to take care of it.

]]>
By: Pavel Siderov https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-509 Thu, 07 Jun 2012 07:45:01 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-509 Hi Moy,

I have the same case as Zac. I have several adhearsion servers registered at asterisk. I need to address some prefixes in the dialplan to one adhearsion server and others to different adhearsion server. That’s why I need account association too. Is there any other way to achieve this?

Thanks in advance,
Pavel

]]>
By: cheap calls from the UK https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-489 Wed, 14 Dec 2011 10:44:42 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-489 cheap calls from the UK…

[…]Asterisk Asynchronous AGI « Moy Blog[…]…

]]>
By: Moises Silva https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-471 Thu, 28 Jul 2011 13:36:20 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-471 Hi Zac,

I’m glad you found it useful.

I am not sure I am following what you propose. When you say:

“the following would send the AGI request to sessions authenticated by the AMI user account ‘mark’”

What AGI “request” are you talking about? The initial AsyncAGI event that is launched when a channel executes the AGI(agi:async:ami_accnt=’mark’) application?

If that is the case, then, it looks like you’re talking about associating a given AsyncAGI execution (both manager commands and events??) to a single manager account?

]]>
By: Zac Wolfe https://moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/comment-page-1/#comment-470 Wed, 27 Jul 2011 17:12:45 +0000 http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-470 Great addition Moy! We use this feature extensively in our SafiServer product. Among other things it’s helped us work around some limitations in Asterisk 1.6+ FastAGI implementations. Nice Work!

One thing I would love to see is the ability to target a specific AMI session with the command to better support environments with multiple concurrent AMI sessions. For example, the following would send the AGI request to sessions authenticated by the AMI user account ‘mark’

AGI(agi:async:ami_acct=’mark’)

What are your thoughts. Would this be difficult to implement?

]]>