Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to GIT-16-3746b1e

...

  • AGI - The classic variant of AGI, this will launch the script specified by command as a new process. Communication with the script occurs on stdin and stdout. If the full path to the script is not provided, the astagidir specified in asterisk.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 either agi or hagi.
    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.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 the AMI action, with a variety of AGI specific events passed back over the AMI connection. AsyncAGI should be invoked by passing agi:async to the command parameter.
    Info
    titleNote

    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 using DeadAGI (or when the channel is already hungup). A fast AGI server will correspondingly receive a HANGUP inline with the command dialog. Both of these signals may be disabled by setting the AGISIGHUP channel variable to no before executing the AGI application. Alternatively, if you would like the AGI application to exit immediately after a channel hangup is detected, set the AGIEXITONHANGUP variable to yes.

    Code Block
    titleExample: AGI invocation examples
    linenumberstrue
    
    				; Start the AGI script /tmp/my-cool-script.sh, passing it the contents
    				; of the channel variable FOO
    				same => n,AGI(/tmp/my-cool-script.sh,${FOO})
    
    				; Start the AGI script my-cool-script.sh located in the astagidir
    				; directory, specified in asterisk.conf
    				same => n,AGI(my-cool-script.sh)
    
    				; Connect to the FastAGI server located at 127.0.0.1 and start the script
    				; awesome-script
    				same => n,AGI(agi://127.0.0.1/awesome-script)
    
    				; Start AsyncAGI
    				same => n,AGI(agi:async)
    			
    
    This application sets the following channel variable upon completion:

...

This documentation was imported from Asterisk Version GIT-16-324a6093746b1e