[Home]

Summary:ASTERISK-16248: Include empty folder in exensions.conf - weird results
Reporter:Marius (mariussm)Labels:
Date Opened:2010-06-16 09:41:00Date Closed:2011-06-07 14:05:17
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hi!

It seems that including and empty directory into extensions.conf messes up pretty much everything.

When i RELOAD asterisk with an "empty include", everything works great as always, the issue is when i RESTART the asterisk service.

No calls gets through. 404 on everything (sip), can't find extension.

I use polycom 330 phones, and x-lite, both get the same errors.

****** ADDITIONAL INFORMATION ******


What I am doing:
mkdir /etc/asterisk/test

Place a line like this anywhere in extensions.conf:
#include "test/*.conf"

Let the directory be empty.
Comments:By: Leif Madsen (lmadsen) 2010-06-17 13:16:56

You can't have an empty directory like that. There needs to exist at least one file ending in .conf must exist in this case. The file doesn't need to contain anything, but it must exist.

This is a general rule for using #include -- the file you're including must exist, even if it contains no data.

By: Leif Madsen (lmadsen) 2010-06-17 13:17:08

i.e. this is expected behaviour.

By: Marius (mariussm) 2010-06-18 01:24:13

Well, then you might as well enligthen me why this should continue to be expected? Could it be very hard to just check if file(s) exists?

By: Paul Belanger (pabelanger) 2010-06-18 06:03:38

;#exec /opt/bin/build-extra-contexts.sh

By: Paul Belanger (pabelanger) 2010-06-18 08:26:38

Closing as this is expected behaviour.