I have Dialplan with dial to another Local channel. I need to return some value to caller dialplan. I try to setVar on caller channel, and chage it on the called channel but change not affect on called channel.
like that:
exten => s,1,Set(_FOO=1)
exten => s,n,dial(Local/kk@from-internal,1)
exten => s,n,noop(${FOO})
exten => kk,1,noop(${FOO})
exten => kk,n,Set(FOO=2)
the noop after dial print 1, the Set(FOO=2) not affect on parent channel!
have a way?
Hi
try _FOO in the child channel or even __FOO
This function can be used to set the value of channel variables or dialplan functions. It will accept up to 24 name/value pairs. When setting variables, if the variable name is prefixed with _, the variable will be inherited into channels created from the current channel. If the variable name is prefixed with __, the variable will be inherited into channels created from the current channel and all children channels.
Ian
I try
exten => s,1,Set(_FOO=1)
exten => s,n,dial(Local/kk@from-internal,1)
exten => s,n,noop(${FOO})
exten => kk,1,noop(${FOO})
exten => kk,n,Set(_FOO=2)
but the Parent still FOO=1
Notice the new channel return after it Hangup.
So how i can return value to the Parent?
Hi
try exten => s,n,dial(Local/kk@from-internal/n,1)
and also try __FOO instead of _FOO
Ian
it’s seem that no way to do that. only by Global or DB