Asterisk EAGI

Synopsis:

Executes an AGI compliant application, with file descriptors

Description:

EAGI(command|args)

EAGI--Enhanced Asterisk Gateway Interface

EAGI is a slightly more advanced version of AGI, allowing the AGI script to interact with the inbound audio stream via file descriptor 3. Essentially, EAGI can be used to create applications that can tap into an inbound audio stream, analyze it, and perform tasks in accordance with that stream of data.

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

Synopsis:

Executes an AGI compliant application, with file descriptors

Description:

EAGI(command|args)

EAGI--Enhanced Asterisk Gateway Interface

EAGI is a slightly more advanced version of AGI, allowing the AGI script to interact with the inbound audio stream via file descriptor 3. Essentially, EAGI can be used to create applications that can tap into an inbound audio stream, analyze it, and perform tasks in accordance with that stream of data.

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

Created by: dantheman, Last modification: Tue 25 of Sep, 2012 (03:13 UTC) by dominic16y
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+