Displaying 3 results from an estimated 3 matches for "svtest1".
Did you mean:
dvtest1
2016 Nov 27
2
Non-global variable that follows channel?
...riable name when I read it back!
Then I forgot to post the followup email to say I had figured it out.
Now, this SHARED was not something I was aware of, but looked like an
ideal solution to passing variables BACK from to the parent channel.
However, it does not seem to be very reliable.
Code:
[svtest1]
exten => s,1,Answer()
same => n,Verbose(1,Answered channel:${CHANNEL})
same => n,Dial(Local/s at svtest2,,g)
same => n,Verbose(1,***In channel:${CHANNEL} sharedVar:
${SHARED(sharedVar,Local/s at svtest2)} )
same => n,Hangup()
[svtest2]
exten => s,1,NoOp()
sam...
2016 Nov 23
2
Non-global variable that follows channel?
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
2016 Nov 27
2
Non-global variable that follows channel?
...i/display/AST/Asterisk+14+Function_SHARED
could do with more clarification.
BTW, there were a couple of typos in your code, so for anyone who
wants to copy/paste, here's Richard's code WITH the curly braces (
Set(SHARED(sharedVar,MY_CALLER) should be
Set(SHARED(sharedVar,${MY_CALLER}) )
[svtest1]
exten => s,1,Answer()
same => n,Verbose(1,Answered channel:${CHANNEL})
same => n,Set(__MY_CALLER=${CHANNEL(name)})
same => n,Dial(Local/s at svtest2,,g)
same => n,Verbose(1,***In channel:${CHANNEL} sharedVar:${SHARED(sharedVar)})
same => n,Hangup()
[svtest2]...