System information
Pros of Enhanced AGI
It has the simplicity of process-based AGI, with the addition of a simple read-only
stream of the channel’s audio. This is the only variant that offers this feature.
Cons of Enhanced AGI
Since a new process must be spawned to run your application for every call, it has
the same efficiency concerns as regular process-based AGI.
For an alternative way of getting access to the audio outside of
Asterisk, consider using JACK. Asterisk has a module for JACK
integration, called app_jack. It provides the JACK() dialplan appli-
cation and the JACK_HOOK() dialplan function.
DeadAGI Is Dead
In versions of Asterisk prior to 1.8, there was a dialplan application called DeadAGI().
Its purpose was similar to that of AGI(), except you used it on a channel that had already
been hung up. This would usually be done in the special h extension, when you wanted
to use an AGI application to aid in some type of post-call processing. Invoking Dead
AGI() from the dialplan will still work, but you will get a WARNING message in the Asterisk
log. It has been deprecated in favor of using AGI() in all cases. The code for AGI() has
been updated so it knows how to correctly adjust its operation after a channel has been
hung up.
Pros of DeadAGI
None. It’s dead.
Cons of DeadAGI
It’s dead. Really, don’t use it. If you do, your configuration may break if Dead
AGI() is completely removed from Asterisk in a future version.
FastAGI—AGI over TCP
FastAGI is the term used for AGI call control over a TCP connection. With process-
based AGI, an instance of an AGI application is executed on the system for every call
and communication with that application is done over stdin and stdout. With FastAGI,
a TCP connection is made to a FastAGI server. Call control is done using the same AGI
protocol, but the communication is over the TCP connection and does not require a
new process to be started for every call. The AGI protocol is discussed in more detail
in “AGI Communication Overview” on page 480. Using FastAGI is much more scal-
able than process-based AGI, though it is also more complex to implement.
FastAGI is used by invoking the AGI() application in the Asterisk dialplan, but instead
of providing the name of the application to execute, you provide an agi:// URL. For
example:
exten => 1234,1,AGI(agi://127.0.0.1)
478 | Chapter 21: Asterisk Gateway Interface (AGI)