Executes an AGI compliant application.
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.
The following variants of AGI exist, and are chosen based on the value passed to command:
AGI- The classic variant of AGI, this will launch the script specified by command as a new process. Communication with the script occurs on
stdout. If the full path to the script is not provided, the
asterisk.confwill be used.
FastAGI- Connect Asterisk to a FastAGI server using a TCP connection. The URI to the FastAGI server should be given in the form
[scheme]://host.domain[:port][/script/name], where scheme is either
In the case of
hagi, an SRV lookup will be performed to try to connect to a list of FastAGI servers. The hostname in the URI must be prefixed with
_agi._tcp. prior to the DNS resolution. For example, if you specify the URI
hagi://agi.example.com/foo.agithe DNS query would be for
_agi._tcp.agi.example.com. You will need to make sure this resolves correctly.
AsyncAGI- Use AMI to control the channel in AGI. AGI commands can be invoked using the
AMIaction, with a variety of AGI specific events passed back over the AMI connection. AsyncAGI should be invoked by passing
agi:asyncto the command parameter. 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:
command- How AGI should be invoked on the channel.
args- Arguments to pass to the AGI script or server.
- Asterisk 19 ManagerAction_AGI
- Asterisk 19 ManagerEvent_AsyncAGIStart
- Asterisk 19 ManagerEvent_AsyncAGIEnd
- Asterisk 19 Application_EAGI
- Asterisk 19 Application_DeadAGI
This documentation was imported from Asterisk Version GIT-19-56f9c28a50