O'Reilly logo

Asterisk: The Future of Telephony by Leif Madsen, Jared Smith, Jim Van Meggelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

DeadAGI() — Executes an AGI-compliant script on a dead (hung-up) channel

Synopsis

    DeadAGI(program,args)

Executes an AGI-compliant program on a dead (hung-up) channel. AGI allows Asterisk to launch external programs written in almost any language to control a telephony channel, play audio, read DTMF digits, and so on by communicating with the AGI protocol on STDIN and STDOUT. The arguments specified by args will be passed to the program.

This application has been written specifically for dead channels, as the normal AGI interface doesn’t work correctly if the channel has been hung up.

Use the show agi command on the command-line interface to list all of the available AGI commands.

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

               exten => h,1,DeadAGI(agi-test)

See Also

AGI(), FastAGI()

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required