[Asterisk-Users] AGI questions..

Olle E. Johansson oej at edvina.net
Fri Oct 24 10:45:44 MST 2003


> Are there corresponding AGI commands for the Asterisk commands?? eg a 
> command to dial instead or using the Asterisk "Dial" command..

Not one-to-one correspondence. Some of the basic ones you need are there.

ANSWER
AUTOHANGUP <time>
CHANNEL STATUS [<channelname>]
EXEC <application> <options>
GET DATA <filename> [<timeout>] [<max digits>]
GET VARIABLE <variablename>
HANGUP [<channelname>]
RECEIVE CHAR <timeout>
RECORD FILE <filename> <format> <escape digits> <timeout> [BEEP]
SAY DIGITS <digit string> <escape digits>
SAY NUMBER <number> <escape digits>
SEND IMAGE <image>
SEND TEXT "<text to send>"
SET CALLERID <number>
SET CONTEXT <desired context>
SET EXTENSION <new extension>
SET PRIORITY <new priority number>
SET VARIABLE <variablename> <value>
STREAM FILE <filename> <escape digits>
TDD MODE <on|off>
VERBOSE <level>
WAIT FOR DIGIT <timeout>

See here:
http://www.voip-info.org/tiki-index.php?page=Asterisk+AGI
for an overview

On that page you'll find a pointer to
http://home.cogeco.ca/~camstuff/agi.html
which is a good, but a bit out of date, documentation. Here you'll find examples and
advice on how to programme in C, Java, perl and python - not PHP, but I think you'll
grasp the stuff anyway and is able to adopt it to PHP.

One of the commands is EXEC which deliver the power of all
your registred applications.

I believe that there are samples in the distribution as well as in the Perl library,
which you'll have to download from another site (referenced on the Wiki). Even though
you won't develop in Perl, those are good examples to read through.

I hope this helps. When you're done, I hope that you add some experiences and examples
on how to do AGI apps in PHP to the wiki :-)

/O




More information about the asterisk-users mailing list