#include another dialplan - asterisk

為{幸葍}努か 提交于 2019-12-11 06:40:49

问题


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?


回答1:


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



回答2:


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

[globals]
...

#include "temp.conf"
...


来源:https://stackoverflow.com/questions/9224596/include-another-dialplan-asterisk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!