AGI Scripts

You are here:
← All Topics
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
Each AGI Script can have at least 5 parameters and some can be assigned by the admin and others can be assigned by the user.
When the AGI Script is used as a condition, the variable AGIRESULT is tested and if it is TRUE, the call flows as the condition is matched. A simple AGI Script to say the date and time. Remember to set the execution bit. #!/usr/bin/php
$agi = new AGI();
?> Another simple AGI Script randmizing a number and comparing with the one provided as parameter. #!/usr/bin/php
$agi = new AGI();
$agi­>Verbose(“Your guess is with the number “.$argv[1]);
$agi­>Verbose(“The random number $number as been selected”);
if ($number==$argv[1]) {
} else {

Please contact support for more info on this feature.