<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Asterisk Asynchronous AGI</title>
	<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/</link>
	<description>Abandon All Hope, Ye Who Read This Blog</description>
	<pubDate>Thu, 20 Nov 2008 00:10:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>By: SinoLogic &#187; Cómo ejecutar AGI de forma asíncrona</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-168</link>
		<author>SinoLogic &#187; Cómo ejecutar AGI de forma asíncrona</author>
		<pubDate>Mon, 24 Dec 2007 13:06:04 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-168</guid>
					<description>[...] http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/           Autor:  Elio Rojano &#124;  Asterisk, Curiosidades &#124; Permalink &#124;  Comentarios [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href="http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/" rel="nofollow">http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/</a>           Autor:  Elio Rojano |  Asterisk, Curiosidades | Permalink |  Comentarios [&#8230;]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: el_pop</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-187</link>
		<author>el_pop</author>
		<pubDate>Wed, 06 Feb 2008 19:43:37 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-187</guid>
					<description>Why no "ActionID" in place of "CommandID"?. In all Manager commands is used "ActionID".  only to have a homogeneus notation with AMI.</description>
		<content:encoded><![CDATA[<p>Why no &#8220;ActionID&#8221; in place of &#8220;CommandID&#8221;?. In all Manager commands is used &#8220;ActionID&#8221;.  only to have a homogeneus notation with AMI.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: moy</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-188</link>
		<author>moy</author>
		<pubDate>Wed, 06 Feb 2008 21:21:36 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-188</guid>
					<description>The "CommandID" header is independent of the "ActionID" header. This means you can actually specify both. ActionID is used internally by the core AMI system, so you will get an AMI packet with the specified ActionID as soon as the command enter the Async AGI queue. The "CommandID" will be sent as part of an AsyncAGI event to notify execution of the command, hence, you can add 3 commands in a row and get almost immediate response with the proper ActionID, but the CommandID will only get back until the each queued command gets actually executed.</description>
		<content:encoded><![CDATA[<p>The &#8220;CommandID&#8221; header is independent of the &#8220;ActionID&#8221; header. This means you can actually specify both. ActionID is used internally by the core AMI system, so you will get an AMI packet with the specified ActionID as soon as the command enter the Async AGI queue. The &#8220;CommandID&#8221; will be sent as part of an AsyncAGI event to notify execution of the command, hence, you can add 3 commands in a row and get almost immediate response with the proper ActionID, but the CommandID will only get back until the each queued command gets actually executed.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Asterisk-Java</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-233</link>
		<author>Asterisk-Java</author>
		<pubDate>Sat, 05 Apr 2008 03:03:41 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-233</guid>
					<description>&lt;strong&gt;Preview: Support for AsyncAGI&lt;/strong&gt;

 I've just finished adding support for Asynchronous AGI to Asterisk-Java. The way AsyncAGI is supported by Asterisk-Java hides the differences in the underlying communication from the differences in the underlying communication from the users of our l...</description>
		<content:encoded><![CDATA[<p><strong>Preview: Support for AsyncAGI</strong></p>
<p> I&#8217;ve just finished adding support for Asynchronous AGI to Asterisk-Java. The way AsyncAGI is supported by Asterisk-Java hides the differences in the underlying communication from the differences in the underlying communication from the users of our l&#8230;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: manuna</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-330</link>
		<author>manuna</author>
		<pubDate>Wed, 02 Jul 2008 15:24:36 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-330</guid>
					<description>Last days i tried to make something usable with AsyncAgi (using Asterisk-Java). It's a nice thing, but really undocumented over the internet. 
The question is: what's the simplest way of replacing FastAGI server with AsyncAGI server? I guess, all AGI scripts can be left intact, but i don't quite understand, how should dialplan look like.

ie, Fastagi call looked like:
123 =&#62;{
      AGI(agi://hostname:4567/scriptname?param1=val1&#38;param2=val2);
};

How should this be implemented with AsyncAGI?</description>
		<content:encoded><![CDATA[<p>Last days i tried to make something usable with AsyncAgi (using Asterisk-Java). It&#8217;s a nice thing, but really undocumented over the internet.<br />
The question is: what&#8217;s the simplest way of replacing FastAGI server with AsyncAGI server? I guess, all AGI scripts can be left intact, but i don&#8217;t quite understand, how should dialplan look like.</p>
<p>ie, Fastagi call looked like:<br />
123 =&gt;{<br />
      AGI(agi://hostname:4567/scriptname?param1=val1&amp;param2=val2);<br />
};</p>
<p>How should this be implemented with AsyncAGI?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: moy</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-335</link>
		<author>moy</author>
		<pubDate>Wed, 02 Jul 2008 21:22:31 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-335</guid>
					<description>You are correct in that it's quite undocumented. Sorry about that, I will fix that as soon as I have a chance, I will add an entry into voip-info.org

Even when anything you can do through FastAGI you can do it as well throug Async AGI, the client code has to change quite a bit since now, froma single connection you have to be aware of ALL channels, not of a single channel. This brings power but also complexity when dealing with many channels.

Currently you cannot pass parameters directly to AsyncAGI, but you can 

Set(param1=val1)
Set(param2=val2)
AGI(agi:async)

Then from your manager connection
Action: AGI
Command: GetVariable param1

However I agree is easier to just pass parameters, so I will add that support.</description>
		<content:encoded><![CDATA[<p>You are correct in that it&#8217;s quite undocumented. Sorry about that, I will fix that as soon as I have a chance, I will add an entry into voip-info.org</p>
<p>Even when anything you can do through FastAGI you can do it as well throug Async AGI, the client code has to change quite a bit since now, froma single connection you have to be aware of ALL channels, not of a single channel. This brings power but also complexity when dealing with many channels.</p>
<p>Currently you cannot pass parameters directly to AsyncAGI, but you can </p>
<p>Set(param1=val1)<br />
Set(param2=val2)<br />
AGI(agi:async)</p>
<p>Then from your manager connection<br />
Action: AGI<br />
Command: GetVariable param1</p>
<p>However I agree is easier to just pass parameters, so I will add that support.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: manuna</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-336</link>
		<author>manuna</author>
		<pubDate>Thu, 03 Jul 2008 08:58:25 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-336</guid>
					<description>Will this be implemented in a way like:
AGI(agi:async/scriptname?par1=val1&#38;par2=val2...) ?
For me it's crucial to determine scriptname, because my FastAGI server processes different kinds of scripts, depending on extension dialed.</description>
		<content:encoded><![CDATA[<p>Will this be implemented in a way like:<br />
AGI(agi:async/scriptname?par1=val1&amp;par2=val2&#8230;) ?<br />
For me it&#8217;s crucial to determine scriptname, because my FastAGI server processes different kinds of scripts, depending on extension dialed.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: moy</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-337</link>
		<author>moy</author>
		<pubDate>Thu, 03 Jul 2008 13:47:43 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-337</guid>
					<description>Then probably AsyncAGI is not for you.

 What you don't seem to understand is what I just said to you, AsyncAGI HANDLES ALL THE CHANNELS THROUGH THE MANAGER, there is no such thing as an execution script (sure thing probably there will be manager connections controled from scripts, but that's outside the AsyncAGI scope to know). That's what "Async" means, Asynchronous. 

When you execute a script via FastAGI that script will control the channel during the life of the script, your script just takes care of that single channel and when you execute an AGI command your script "blocks" its execution until the command finishes.

AsyncAGI just puts the channel to wait for Asynchronous AGI commands, where those commands will come from? is up to you. In my case I had a program that connected to the Asterisk manager and handled all the channels, so I had a single script that worked pretty much like a PBX in a scripting language, took care of knowing which channels were active and what to do with ALL of them, bridging them, un-bridging them, put in them in conferences, play audio etc. 

If  you do anything at all with Async AGI you will have to understand event-oriented programming, because that's how  you do to control channels over AsyncAGI.</description>
		<content:encoded><![CDATA[<p>Then probably AsyncAGI is not for you.</p>
<p> What you don&#8217;t seem to understand is what I just said to you, AsyncAGI HANDLES ALL THE CHANNELS THROUGH THE MANAGER, there is no such thing as an execution script (sure thing probably there will be manager connections controled from scripts, but that&#8217;s outside the AsyncAGI scope to know). That&#8217;s what &#8220;Async&#8221; means, Asynchronous. </p>
<p>When you execute a script via FastAGI that script will control the channel during the life of the script, your script just takes care of that single channel and when you execute an AGI command your script &#8220;blocks&#8221; its execution until the command finishes.</p>
<p>AsyncAGI just puts the channel to wait for Asynchronous AGI commands, where those commands will come from? is up to you. In my case I had a program that connected to the Asterisk manager and handled all the channels, so I had a single script that worked pretty much like a PBX in a scripting language, took care of knowing which channels were active and what to do with ALL of them, bridging them, un-bridging them, put in them in conferences, play audio etc. </p>
<p>If  you do anything at all with Async AGI you will have to understand event-oriented programming, because that&#8217;s how  you do to control channels over AsyncAGI.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: manuna</title>
		<link>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-338</link>
		<author>manuna</author>
		<pubDate>Fri, 04 Jul 2008 08:37:25 +0000</pubDate>
		<guid>http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-338</guid>
					<description>Sorry, i've really misunderstood the way it works. My mind was that asynchronous channel can execute some AGI script (determined in dialplan), meanwhile being able to receive and execute asynchronous commands  (from an external AMI application). So the initial script sets up a call, and later on it can be asynchronously bridged, put on hold, etc.</description>
		<content:encoded><![CDATA[<p>Sorry, i&#8217;ve really misunderstood the way it works. My mind was that asynchronous channel can execute some AGI script (determined in dialplan), meanwhile being able to receive and execute asynchronous commands  (from an external AMI application). So the initial script sets up a call, and later on it can be asynchronously bridged, put on hold, etc.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
