[asterisk-users] channel variables in AGI

Steve Edwards asterisk.org at sedwards.com
Wed Aug 11 11:55:10 CDT 2010


On Wed, 11 Aug 2010, Tino wrote:

> How to take the values of channel variables like 'agi_uniqueid' and 
>  'agi_callerid' in agi script. For example
> 
> #!/bin/bash -x
> T="$agi_uniqueid"

AGI is a protocol.

Basically, Asterisk creates a process to run your AGI compliant program 
(the above is not). Asterisk feeds the "AGI environment" to your program 
via STDIN.

Your program then issues requests to Asterisk by writing to STDOUT and 
reads responses from STDIN.

While you can write your own "AGI library," you should use an existing 
library for your source language (I prefer c for a lot of reasons) -- 
nobody gets it right the first time.

Search on voip-info.org for more specifics.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list