[Home]

Summary:ASTERISK-24487: configuration: sections should be loadable as template even when not marked
Reporter:Scott Griepentrog (sgriepentrog)Labels:
Date Opened:2014-11-03 14:55:49.000-0600Date Closed:2014-11-04 19:05:14.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/Configuration
Versions:13.0.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:According to the [wiki documentation on using templates|https://wiki.asterisk.org/wiki/display/AST/Using+Templates], any section is valid for inclusion as a template without being marked.

{quote}
This works even when the section name referenced in parentheses is not defined as a template as in the case of the "not-a-template" section.
{quote}

This pjsip.conf:

{noformat}
[endpoint]
type=endpoint
context=default
allow=!all,ulaw
direct_media=no

[alice1](endpoint)
{noformat}

Results in error:

{noformat}
WARNING[30560] config.c: Inheritance requested, but category 'endpoint' does not exist, line 12 of /var/tmp/asterisk-testsuite/4601eff4190a32b130a52e1a84b03a00/run_1/ast2/etc/asterisk/pjsip.conf
ERROR[30560] res_sorcery_config.c: Contents of config file 'pjsip.conf' are invalid and cannot be parsed
{noformat}

This issue can be resolved by adding \(!) to \[endpoint] line, but this is a change from previous version and does not match documented behavior.
Comments:By: Matt Jordan (mjordan) 2014-11-03 15:14:15.223-0600

I'll grant that it doesn't match the documentation.

Are you sure that 1.8/11 (today) allows templating without the usage of {{( ! )}}? The Inheritance error getting kicked back is not from sorcery, but rather from the default {{config}} processing engine.

By: Scott Griepentrog (sgriepentrog) 2014-11-03 15:56:23.657-0600

This issue affects 12, 13, and trunk only.  Isolated to changed introduced in http://svnview.digium.com/svn/asterisk?view=revision&revision=425383 (...385)




By: Scott Griepentrog (sgriepentrog) 2014-11-03 15:59:26.211-0600

To be clear, 1.8/11 allow inclusion of sections not marked as a template in current revisions, and 12/13/trunk allow the same also but only prior to r425383.

By: George Joseph (gjoseph) 2014-11-04 10:41:27.138-0600

I got this.  Testing fix now.


By: George Joseph (gjoseph) 2014-11-04 10:41:52.955-0600

Testing fix.