[Home]

Summary:ASTERISK-16797: Non-existent include in extensions.conf halts processing of conf file
Reporter:JoshE (n8ideas)Labels:
Date Opened:2010-10-12 16:24:27Date Closed:2010-10-12 16:38:08
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Reproduced on Asterisk 1.6.2.13:

An invalid include in the extensions.conf file will halt processing of the file.  Includes below the non-existent one will not be included.  I'll include a reproducible example on a FreePBX installation.

For example:

extensions_custom.conf (itself an include of extensions.conf) contains:

#include /opt/isymphony/server/isymphony.conf
#include extensions_dynagents.conf

[from-internal-custom]

exten => 1234,1,Answer()
exten => 1234,n,Milliwatt()

On this box, the isymphony.conf file does not exist.  The extensions_dynagents.conf does exist.

In this case, config will simply ignore everything below the invalid include.

In the full log, the following error is thrown:

ERROR[8818] config.c: The file '/opt/isymphony/server/isymphony.conf' was listed as a #include but it does not exist.

None of the code below the invalid include is processed, including the contexts and the include below it.

Barring I use case I haven't considered, I would expect the error should be thrown as it is currently, but I would prefer that the configuration file continues to be processed assuming it is valid syntactically.

I haven't investigated a fix, but if people concur, I would be willing to produce a patch.
Comments:By: Jason Parker (jparker) 2010-10-12 16:38:08

This is intentional.  There could be serious damage done if there is a typo in your config and we continue as if nothing happened.