本文介绍了如何在星号中调用上下文并返回主上下文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我用星号表示的拨号方案:
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)
问题是当子上下文完成时,执行不会返回到主上下文并且exten => s,n,NoOp(End Main) 不执行.我该如何解决这个问题?
The problem is that when subcontext finishes, execution doesn't return to main-context andexten => s,n,NoOp(End Main) doesn't execute. How can I solve this?
推荐答案
正如 Karadous 在上面发表的那样:GoSub 例程必须具有匹配的 Return() 应用程序调用.
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()
这篇关于如何在星号中调用上下文并返回主上下文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!