Hi,
This isn’t really a question or support request as much as it is me sharing a tip with the community. Maybe you know this; I did not see it documented and a few people I spoke to seemed surprised to hear this worked.
The extensions.conf file can get to be a pretty gnarly file. By default the documentation makes it seem like everything has to go there; so it’s not long before this file can become a very large complicated mess. Between all your internal extensions, IVRs, outbound rules, inbound rules, and everything else that relies on the dialplan; you could find yourself spending more time looking for what to edit.
The good news is…you don’t have to live this way! The same trick used for other service configurations on linux works with Asterisk; a “conf.d” folder! Simply put, it’s a folder in your configuration directory that contains multiple conf files; and your main configuration is setup to just read files out of this folder. Most processes typically name this folder “servicename.conf.d”.
Here is the contents of my /etc/asterisk/extensions.conf:
[globals]
#include extensions.d/*.conf
That’s it. Two lines. Wildcarded to make life easier. Asterisk now looks in /etc/asterisk/extensions.d/ and loads every .conf file contained within:
root@asteriskpbx:/etc/asterisk/extensions.d# ls
agent-dial.conf americana.conf cledus.conf inbound-ivr.conf jawdemo-juke.conf tmnt.conf
al-hotline.conf bhg.conf grandma.conf internal.conf rucka-juke.conf voipms.conf
al-juke.conf callinspy.conf huey-juke.conf island-juke.conf shackphone.conf
This has made my life so much easier. Having everything in it’s own file means I’m not scrolling through a large .conf file looking for the lines I need. I just drop things in a file, drop it in extensions.d/, and call it’s context name like normal.
Hope someone finds this helpful.