login | register
Sat 30 of Aug, 2008 [01:52 UTC]

voip-info.org

History

Asterisk cmd AGI

Created by: oej,Last modification on Tue 29 of Jul, 2008 [06:31 UTC] by rushowr

Synopsis:

 Executes an AGI compliant application

Description:

 [E|Dead]AGI(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.

Return codes

Returns -1 on hangup or if application requested hangup, or 0 on non-hangup exit.

Requirements for applications

  • must be executable
  • must be located in /var/lib/asterisk/agi-bin
  • must be specified in the dialplan complete with an extension

EAGI gives you a sound channel

Using 'EAGI' provides enhanced AGI, with audio available out of band on file descriptor 3

Use DeadAGI when you have no living channel

If you want to execute an AGI script in the 'h' hangup extension of a context, use the DEADAGI() application instead of agi().

See also



Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ


Comments