Variables from the queue's subroutine

Colleagues, I discovered a strange effect. Perhaps I don’t know or understand something wrong. Tell me please!

Simplified, the following happens:

I have three subroutines. Two of them define variables, and the third shows them.

exten => s,1,Set(__qqq1=QQQ1)
same  => n,Return()
exten => s,1,Set(__qqq2=QQQ2)
same  => n,Return()
exten => s,1,NoOp('${qqq1}' '${qqq2}')
same  => n,Return()

Next, I run these subroutines, but in very different ways.

exten => 111,1,GoSub(sub-one,s,1)
same  => n,Set(CHANNEL(hangup_handler_push)=sub-qqqshow,s,1)
same  => n,Queue(q_common,Fr,,,300,,,sub-two)

As a result, the third subroutine always show the value that I set in the first subroutine and never shows the values that I set in the second. Something is wrong with her…
At the same time, all the variables set by me in other places, and in itself, the subroutine sub-two sees good. But, variables defined or changed in it, it cannot export from itself.

Colleagues, tell me, please, what I do not understand and how to overcome this problem?

The second subroutine is run on the called party channel, and doesn’t result in any additional channel being created. There is therefore no inheritance involved.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.