Hello,
We tried setting up a custom context, it goes to the custom dialplan just fine, but when using the Return() application, it does not go to the destination specified in the GUI.
Our custom dialplan:
[front-door]
exten => s,1,Noop()
same => n,System(do something here)
same => n,Return()
So to troubleshoot I looked at the dialplan, and I see the below what the PBX generated:
[custom-contexts]
exten => cc-3,1,NoOp(Main_Door)
same => n,Gosub(front-door,s,1(app-time-condition,TC-11,1))
same => n,Hangup()
So now I see why it does not work, because it passes the destination as a argument
I know we can use something like:
[front-door]
exten => s,1,Noop()
same => n,System(do something here)
same => n,Goto(${ARG1},${ARG2},${ARG3})
But that is not clean and missing the point of using Gosub() and Return()
Am I missing something here?
Thank you