1
votes

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?

2

2 Answers

5
votes

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
4
votes

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

[globals]
...

#include "temp.conf"
...