#include 另一个拨号方案 - 星号

发布于 2025-01-03 21:47:07 字数 497 浏览 2 评论 0原文

我有一个拨号方案,其中包含多个应用程序的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悲喜皆因你 2025-01-10 21:47:07

Sriram 的答案绝对是正确的,但值得注意的是,您可以在任何其他上下文下添加 include 指令,而不仅仅是 <代码>[全局]

[globals]
#include extensions-globals.conf

[users]
#include extensions-users.conf

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]

[globals]
#include extensions-globals.conf

[users]
#include extensions-users.conf
自此以后,行同陌路 2025-01-10 21:47:07

在全局变量生效之后添加 #include 。就像这样:

[globals]
...

#include "temp.conf"
...

Adding the #include just after the globals works. Like so:

[globals]
...

#include "temp.conf"
...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文