#include 另一个拨号方案 - 星号
我有一个拨号方案,其中包含多个应用程序的 IVR 流程,所有应用程序都位于不同的分机上。我现在尝试通过将其中一些移动到单独的 .conf
文件来清理它。以下是目前外部 .conf
文件如何 #included
进入 extensions.conf
的情况。所有单独的 .conf
文件均位于 /etc/asterisk
中:
在 extensions.conf
中:
#include "temp.conf"
[globals]
...
temp.conf< 中的 IVR /code> 工作正常,但其他应用程序都不起作用。虽然传入的调度程序将其发送到适当的函数,但似乎没有一个全局变量设置正确。
为了使所有上下文正常工作,我是否必须遵循正确的顺序?
I have a dialplan that contains the IVR flow for a number of applications, all on different extensions. I am now trying to clean it up by moving some of them to separate .conf
files. Here is how the external .conf
files are being #included
into extensions.conf
at present. All the separate .conf
files are present within /etc/asterisk
:
In extensions.conf
:
#include "temp.conf"
[globals]
...
The IVR in temp.conf
works OK, but none of the other applications work. While the incoming dispatcher sends it to the appropriate functions, none of the global variables seem to be set up properly.
Is there a proper order that I must follow in order for all contexts to work correctly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Sriram 的答案绝对是正确的,但值得注意的是,您可以在任何其他上下文下添加 include 指令,而不仅仅是 <代码>[全局]
Sriram's answer is definitely right, it is just worth noting though that you can add include directives under any other context, not just
[globals]
在全局变量生效之后添加
#include
。就像这样:Adding the
#include
just after the globals works. Like so: