I have a AGI problem

Hi Guys…
I wanted to get the return a value of AGI to a dialplan and store that value into a variable…

like

;this will call myscript.agi
exten = > s,1, AGI(myscript.agi)

there is a standard output to Asterisk in the myscript.agi,for example CHANNEL STATUS,and there will have a return value 0~6.
How can I get the value and store it into a variable in the dialplan.

Regards,
Luo gaoxiang

You should use the “set variable” agi command, see voip-info.org/wiki/view/set+variable .

Cheers.

Marco Bruni