Here is my dial plan in asterisk:
[main-context]
exten => s,1,Gosub(subcontext,s,1)
exten => s,n,NoOp(End Main)
[subcontext]
exten => s,1,NoOp(Start subcontext)
exten => s,1,NoOp(End subcontext)
The problem is that when subcontext finishes, execution doesn't return to main-context and exten => s,n,NoOp(End Main) doesn't execute. How can I solve this?
As Karadous posted above: a GoSub routine must have a matching Return() application call.
[main-context]
exten => s,1,Gosub(subcontext,s,1)
same => n,NoOp(End Main)
[subcontext]
exten => s,1,NoOp(Start subcontext)
same => n,NoOp(End subcontext)
same => n,Return()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With