Search:
Asterisk EAGI
Synopsis:
Executes an AGI compliant application, with file descriptorsDescription:
EAGI(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.
Variables Passed
- AST_CONFIG_DIR
- AST_CONFIG_FILE
- AST_MODULE_DIR
- AST_SPOOL_DIR
- AST_MONITOR_DIR
- AST_VAR_DIR
- AST_DATA_DIR
- AST_LOG_DIR
- AST_AGI_DIR
- AST_KEY_DIR
- AST_RUN_DIR
Return codes
Returns -1 on hangup or if application requested hangup, or 0 on non-hangup exit.Requirements for applications
- must be located in /var/lib/asterisk/agi-bin
- must be specified in the dialplan complete with an extension
- must be executable (use "chmod 770 file" in the linux shell)
- must be owned by the "asterisk" user (use "chown asterisk file" in the linux shell)
EAGI File descriptors
- 0 (STDIN) = fromast pipe: sends data out of asterisk
- 1 (STDOUT) = toast pipe: sends data into asterisk
- 3 (STDERR+1) = audio pipe: Linear pcm audio pipe
See Also
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Page Changes
