Unified Communications PBX System

Clear all

Custom context module Return to destination  


Estimable Member
Joined: 9 months ago
Posts: 102
19/05/2020 4:34 am  


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:

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:

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:

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

Topic Tags
Estimable Member
Joined: 2 years ago
Posts: 169
24/05/2020 12:39 am  
The destination is send as variable to your custom context.
The parameters are in the format: context,extension,priority
${ARG1}, ${ARG2}, ${ARG3}
You can do whatever you want with it.
Like jump to another custom context and so on.
What would you need instead?