[asterisk-users] Re: channel variable
Tony Mountifield
tony at softins.clara.co.uk
Thu Aug 24 01:59:22 MST 2006
In article <6fbb529e0608240138m3204cbf2kae603b0d982cb45 at mail.gmail.com>,
unplug <maillisting at gmail.com> wrote:
> Hi,
>
> I have set some variable in a call.
> Set(testmode=1)
> For some reason, such as forward the call, the follow command called.
> Dial(Local/1234567)
> It will go through the dial plan again but the value of variable
> testmode is nothing instead of 1.
>
> How can I maintain the value of the variable in the above case?
Try using Set(__testmode=1), but still refer to it as ${testmode}.
The __ tells Asterisk to propagate the variable to created channels.
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-users
mailing list