[asterisk-users] Channel Variables in a Call file?

David Backeberg dbackeberg at gmail.com
Tue Jul 21 12:44:42 CDT 2009


On Tue, Jul 21, 2009 at 8:26 AM, J. G.<palletboy at gmail.com> wrote:
> In my Call file:
> Setvar: LICENSE=test
>
> In my AGI
> $AGI->get_full_variable('LICENSE');
> (or)
> $AGI->get_variable('LICENSE');
>
> AGI Rx << GET FULL VARIABLE LICENSE
> AGI Tx >> 200 result=1 (LICENSE)
> AGI Rx << NOOP --> LICENSE = LICENSE
> (instead of 'test')
>
> So, is my Call file syntax incorrect?  Is my AGI retrieve incorrect?

You may prefer to instead do your AGI stuff in your regular dialplan,
and have your callfile kick off a call to a local channel which will
then call your dialplan and AGI stuff. Working with call files is
great for simpler things, and I feel like complex things should go in
the dialplan because regular dialplan is so easy to debug. If you when
you get things working correctly then consider putting it back into a
callfile if it would be better that way.



More information about the asterisk-users mailing list