[asterisk-bugs] [Asterisk 0016955]: In dialplan (extensions.conf), subdirectories are not respected

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Mar 3 20:30:54 CST 2010


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16955 
====================================================================== 
Reported By:                ruddy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16955
Category:                   Addons/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           Addons-1.6.2.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-03-03 14:15 CST
Last Modified:              2010-03-03 20:30 CST
====================================================================== 
Summary:                    In dialplan (extensions.conf), subdirectories are
not respected
Description: 
In extensions.conf, I include a file which is in  the subdirectory
/etc/asterisk/contatio.d/

#include "contatio.d/users.conf"

That works !
Then, in users.conf, I include another file in the same directory
#include "users.part1.conf"

Asterisk looks for users.part1.conf in /etc/asterisk/ instead of the
relative directory /etc/asterisk/contatio.d/

====================================================================== 

---------------------------------------------------------------------- 
 (0118936) lmadsen (administrator) - 2010-03-03 20:30
 https://issues.asterisk.org/view.php?id=16955#c118936 
---------------------------------------------------------------------- 
Actually I disagree with your assumption. When you perform an include,
Asterisk does not have the concept that you included a file within another
file. When you include a file, all Asterisk is doing is including that
information as if it was a flat file. So doing the following:

extensions.conf:

[context]
exten => 1,1,NoOp()
#include external.inc

external.inc
exten => 2,1,NoOp()


Is exactly the equivalent of doing:

extensions.conf:

[context]
exten => 1,1,NoOp()
exten => 2,1,NoOp()



Just because something is in separate locations and subdirectories on your
filesystem, will not relate to Asterisk, because all it will do is load the
information from the file, and place it in the extensions.conf file as if
it had loaded it directly from the extensions.conf file, so you'll always
have to assume a relative path from /etc/asterisk/ or you could specify the
full path. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-03 20:30 lmadsen        Note Added: 0118936                          
2010-03-03 20:30 lmadsen        Status                   new => closed       
2010-03-03 20:30 lmadsen        Resolution               open => no change
required
======================================================================




More information about the asterisk-bugs mailing list