[asterisk-users] Non-global variable that follows channel?
max.grobecker at ml.grobecker.info
Sun Nov 27 05:39:46 CST 2016
is channel variable inheritance working for your setup?
Passing variables to other channels can normally simply be done by naming the variable with one or two prefixed undersorces
to make it available to the channel that is created from that one defining the variable.
But I have no idea if it's getting inherited to Gosub called from a Dial command...
If that is not working for you, you might use the SHARED() variables which are kind of global accessible by the channel ID.
So you might call your Gosub with only the (unique) reference name of the variables you wish to pass and then call it from your Gosub.
Am 23.11.2016 um 13:06 schrieb Jonathan H:
> Related to http://lists.digium.com/pipermail/asterisk-users/2016-November/290384.html,
> at the moment I'm passing one variable via DIAL.
> Now I'd like to pass a whole bunch, and my idea was to rather than
> having a great string of
> b(synctest3b^setVar^1(something)^2(more things)^3(etc))
> and then get them with ARG1..ARGn etc, I could bundle the whole lot
> into a HASH and then unbundle them at the called channel.
> Passing the HASH as a var isn't working (I wasn't expecting it to!)
> but is there any other way of doing this, or is it setVar for each
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the asterisk-users