...
AGI
- The classic variant of AGI, this will launch the script specified by command as a new process. Communication with the script occurs onstdin
andstdout
. If the full path to the script is not provided, theastagidir
specified inasterisk.conf
will 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 eitheragi
orhagi
.
In the case ofhagi
, 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 URIhagi://agi.example.com/foo.agi
the 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 theAMI
action, with a variety of AGI specific events passed back over the AMI connection. AsyncAGI should be invoked by passingagi:async
to the command parameter.Info title Note As of
1.6.0
, this channel will not stop dialplan execution on hangup inside of this application. Dialplan execution will continue normally, even upon hangup until the AGI application signals a desire to stop (either by exiting or, in the case of a net script, by closing the connection).A locally executed AGI script will receive
SIGHUP
on hangup from the channel except when usingDeadAGI
(or when the channel is already hungup). A fast AGI server will correspondingly receive aHANGUP
inline with the command dialog. Both of these signals may be disabled by setting theAGISIGHUP
channel variable tono
before executing the AGI application. Alternatively, if you would like the AGI application to exit immediately after a channel hangup is detected, set theAGIEXITONHANGUP
variable toyes
.Code Block ;title Example: AGI invocation examples linenumbers true Start the AGI script /tmp/my-cool-script.sh, passing it the ;contents of the channel variable FOO linenumbers true same => n,AGI(/tmp/my-cool-script.sh,${FOO}) ; Start the AGI script
Code Block title Example: Start the AGI script my-cool-script.sh located in the ;astagidir directory, specified in asterisk.conf linenumbers true same => n,AGI(my-cool-script.sh) ; Connect to the FastAGI server located at
Code Block title Example: Connect to the FastAGI server located at 127.0.0.1 and start the ;script awesome-script linenumbers true same => n,AGI(agi://127.0.0.1/awesome-script) ; Start AsyncAGI
This application sets the following channel variable upon completion:Code Block title Example: Start AsyncAGI linenumbers true same => n,AGI(agi:async)
...
This documentation was imported from Asterisk Version GIT-19-56f9c28a50edaf3a6