On Wed, 4 Mar 2009, michel freiha wrote:
> Does anyone knows how to add a new variable to the predefined variables
> sent by asterisk to AGI script?
You don't.
If you really wanted to add to the AGI environment variables, you could
hack on res_agi.c, but I don't think this is what you want to do.
I'm thinking you want channel variables.
It's a piece of cake to read and write channel variables in the dialplan
using ${} and SET(). It's only slightly more difficult to read and write
channel variables in your AGI using "GET VARIABLE" and "SET
VARIABLE."
Just decide on a meaningful name, SET() it in the dial plan and "GET
VARIABLE" in your AGI.
Thanks in advance,
------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000