[Home]

Summary:ASTERISK-14388: Template system overriding
Reporter:Perssy Llamosas (pll)Labels:
Date Opened:2009-06-26 19:05:50Date Closed:2010-03-02 13:55:37.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:# users.conf
[00](!) ; Some defaults
hasiax=yes
hasvoicemail=yes
hasmanager=no
context=overriding

[01](!) ; Only one default here
context=overriding

[10] ; no template
hasiax=yes
hasvoicemail=yes
hasmanager=yes
context=overriding

[11](00) ; notice that it can't override the template.
hasiax=no
hasvoicemail=no
hasmanager=yes

[12](01) ; Works as expected.
hasiax=no
hasvoicemail=no
hasmanager=yes

# EOF

# User 11 shouldn't be in iax2 list.
*CLI> iax2 show users
Username         Secret                Authen           Def.Context      A/C    Codec Pref
10               -no secret-           000000000000003  users            No     Host
11               -no secret-           000000000000003  users            No     Host

# User 11 shouldn't be on voicemail list.
*CLI> voicemail show users
Context    Mbox  User                      Zone       NewMsg
default    10                                              0
default    11                                              0
default    maxmsg                                           0
3 voicemail users configured.

# User 11 should be on manager list
*CLI> manager show users

username
--------
10
12
-------------------
2 manager users configured.

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

Tried with usesip=yes, strangely Asterisk SVN-trunk-r203802M and Asterisk SVN-branch-1.6.2-r203843M chan_sip appear to ignore it.
Comments:By: Tilghman Lesher (tilghman) 2009-08-31 17:36:39

While you are correct that this is the behavior, you seem to be under the mistaken assumption that because we provide templates, we also provide a method of overriding those templates.  This is not the case.  Each template is treated as if it were substituted initially within the specified context, and hence, overriding may or may not occur.  Especially with the "has*" type options, we provide no such assurance.

If you believe this decision is in error, you may post a message to the asterisk-dev list, proposing your change.  This forum is inappropriate to debate new features.