On 8/24/06, Tony Mountifield <[EMAIL PROTECTED]> wrote:
In article <[EMAIL PROTECTED]>,
unplug <[EMAIL PROTECTED]> wrote:
> Tony Mountifield wrote:
> >
> > Try using Set(__testmode=1), but still refer to it as ${testmode}.
> >
> > The __ tells Asterisk to propagate the variable to created channels.
>
> Do you mean it is a global variable instead of channel variable?
No, it is a channel variable. The __ on the beginning means it will be
inherited by any channels created from the channel it was set on.
In following up with this very old thread... I was just playing with
variable inheritance, and if you are calling Set(__MYVAR=myval), and
then go off somewhere else (in my case it was via a GoSub()), and
Set(MYVAL=myotherval), then you effectively set the variable local
again and it will not be inherited.
My trick was to do a Set(__MYVAL=${MYVAL}) right before Dial()ing the
Local channel. This will forward the current value to the Local
channel.
--
Leif Madsen.
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users