AGI()
AGI(program
[,arguments
])
EAGI()
,
FastAGI()
,
DeadAGI()
)program
on the current channel. AGI scripts or programs can
be implemented in almost any conceivable language (e.g. Perl, PHP) and may
be used to manipulate the channel, play sound files, interpret DTMF tones,
and so on. Asterisk communicates with the AGI program over
stdin
and stdout
. The arguments
are passed directly to the AGI program at execution time./var/lib/asterisk/agi-bin/
by default.h
-extension, where the channel is on-hook), used
DeadAGI()
instead. To run AGI programs on
another server in the network, use
FastAGI()
.EAGI()
instead of
AGI()
. The incoming audio stream is
provided on file descriptor 3[59]; call my AGI application: exten => 123,1,AGI(agi-app) exten => 123,n,EAGI(eagi-app)
-= Info about application 'AGI' =- [Synopsis] Executes an AGI compliant application [Description] [E|Dead]AGI(command|args): Executes an Asterisk Gateway Interface compliant program on a channel. AGI allows Asterisk to launch external programs written in any language to control a telephony channel, play audio, read DTMF digits, etc. by communicating with the AGI protocol on stdin and stdout. This channel will stop dialplan execution on hangup inside of this application, except when using DeadAGI. Otherwise, dialplan execution will continue normally. A locally executed AGI script will receive SIGHUP on hangup from the channel except when using DeadAGI. This can be disabled by setting the AGISIGHUP channel variable to "no" before executing the AGI application. Using 'EAGI' provides enhanced AGI, with incoming audio available out of band on file descriptor 3 Use the CLI command 'agi show' to list available agi commands This application sets the following channel variable upon completion: AGISTATUS The status of the attempt to the run the AGI script text string, one of SUCCESS | FAILED | HANGUP
13,19c13,15 < This channel will stop dialplan execution on hangup inside of this < application, except when using DeadAGI. Otherwise, dialplan execution < will continue normally. < A locally executed AGI script will receive SIGHUP on hangup from the channel < except when using DeadAGI. This can be disabled by setting the AGISIGHUP channel < variable to "no" before executing the AGI application. < Using 'EAGI' provides enhanced AGI, with incoming audio available out of band --- > Returns -1 on hangup (except for DeadAGI) or if application requested > hangup, or 0 on non-hangup exit. > Using 'EAGI' provides enhanced AGI, with incoming audio available out of band 22,25c18 < Use the CLI command 'agi show' to list available agi commands < This application sets the following channel variable upon completion: < AGISTATUS The status of the attempt to the run the AGI script < text string, one of SUCCESS | FAILED | HANGUP --- > Use the CLI command 'show agi' to list available agi commands