[Home]

Summary:ASTERISK-25916: Configuration file processing aborts if a configuration include target does not exist
Reporter:Sherwood McGowan (smcgowan)Labels:
Date Opened:2016-04-12 09:55:09Date Closed:2016-04-14 09:38:22
Priority:MajorRegression?
Status:Closed/CompleteComponents:. I did not set the category correctly.
Versions:13.1.1 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-25461 Nested dialplan #includes don't work as expected.
Environment:CentOS 6.7Attachments:( 0) dialplan_snippets.txt
Description:I am using Asterisk 13 Certified.
When performing inclusion of configuration files via the #include keyword, I am unable to include files from an included file.

Example:
extensions.conf includes inclusions.ext
inclusions.ext includes dialplan.ext and customer_specific_dialplan.ext

Neither dialplan.ext or customer_specific_dialplan.ext are included in the dialplan.

If I include those files via extensions.conf directly, they are included without issue.

Comments:By: Asterisk Team (asteriskteam) 2016-04-12 09:55:10.435-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Sherwood McGowan (smcgowan) 2016-04-13 08:17:33.931-0500

I see that this is related to ASTERISK-25461, with the patch https://gerrit.asterisk.org/#/c/1428/. However, from what I'm reading this may not fix my specified problem? Please advise

By: Richard Mudgett (rmudgett) 2016-04-13 09:27:36.566-0500

Your issue sounds familiar.  ASTERISK-25461 was the closest I could find.  Have you tried a newer version of Asterisk to see if it has the problem?

By: Rusty Newton (rnewton) 2016-04-13 09:30:17.655-0500

Hard to know without knowing what version of Asterisk you are using or what your dialplan looks like.

Please tell us exactly what version of certified Asterisk you are using (you marked 13.1.1, which is not a certified version) and attach your dialplan to the issue in .txt format.

It would be a good idea to go ahead and try the latest vanilla 13.X release to see if the issue occurs for you there.

By: Sherwood McGowan (smcgowan) 2016-04-13 09:34:39.896-0500

I downloaded and installed Asterisk 13.1 Certified 3 about a month ago from the "current" link. I'll install cert4 now and see if I continue to have the issue. more in a few minutes

By: Sherwood McGowan (smcgowan) 2016-04-13 09:43:13.896-0500

The appropriate contents of extensions.conf, include.ext, and astpoctwo.ext.

Contents of astpoctwo.ext are never imported by Asterisk unless specified in extensions.conf. Inclusion from the second level inclusion file include.ext does not work

By: Sherwood McGowan (smcgowan) 2016-04-13 09:44:46.526-0500

compiling Asterisk 13.1-cert4 now

By: Sherwood McGowan (smcgowan) 2016-04-13 09:55:45.736-0500

Asterisk 13.1 cert4 does not resolve the issue. I was able to determine the cause. srei.ext is included as well from include.ext, but that file does not exist. So Asterisk apparently stops processing the include.ext file.

So, while the scope of the issue changed, I believe this might need fixed.

By: Richard Mudgett (rmudgett) 2016-04-13 11:06:20.571-0500

Processing aborts if a file does not exist when using the {{#include}} directive.  That is *not* a bug.  You also get an error message complaining about it.  If you have files that may or may not exist when you want to include them, then you *must* use the {{#tryinclude}} directive.

By: Sherwood McGowan (smcgowan) 2016-04-14 07:47:49.777-0500

Richard, thank you sir. I'll have the team modify how we write out dialplans appropriately.

By: Rusty Newton (rnewton) 2016-04-14 08:28:08.687-0500

I've also updated the documentation, since tryinclude had apparently not been documented on the wiki.

https://wiki.asterisk.org/wiki/display/AST/Using+The+include%2C+tryinclude+and+exec+Constructs

Closing this out as Not a Bug.

[~smcgowan] thanks for the report. It resulted in better documentation! :)

By: Sherwood McGowan (smcgowan) 2016-04-14 08:30:00.393-0500

@Rusty, thank you for updating the documentation! I was just searching the documentation for tryinclude to see why I hadn't run across it in the past.

By: Asterisk Team (asteriskteam) 2016-04-14 08:30:00.630-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.