[asterisk-bugs] [Asterisk 0015809]: [patch] callprogress and faxdetect not read when building channel results in fax detection failure

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Sep 1 16:07:24 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15809 
====================================================================== 
Reported By:                phsultan
Assigned To:                kpfleming
====================================================================== 
Project:                    Asterisk
Issue ID:                   15809
Category:                   Channels/chan_dahdi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Target Version:             1.6.1.x Pending Blocker
Asterisk Version:           Older 1.6.1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-01 13:15 CDT
Last Modified:              2009-09-01 16:07 CDT
====================================================================== 
Summary:                    [patch] callprogress and faxdetect not read when
building channel results in fax detection failure
Description: 
The faxdetect and callprogress attributes are not read when creating
channels with build_channels with channels/chan_dahdi.c, and therefore, the
following chan_dahdi.conf prevents fax detection from happening :
[channels]
#include "dahdi-channels.conf"
callprogress=yes
faxdetect=both
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=no

Actually, it looks like the whole [channels] section should be read to
populate the conf variable before calling build_channels().

I'm not sure if it's the right way to solve this issue, and there is a
configuration workaround (see the additional information). The attached
patch does the following :
- make Asterisk read the [channels] section without building channels
first ;
- build a first version of the configuration in the base_conf variable ;
- build a new configuration from base_conf and actually call
build_channels() after reading the channel attribute.

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

---------------------------------------------------------------------- 
 (0109968) kpfleming (administrator) - 2009-09-01 16:07
 https://issues.asterisk.org/view.php?id=15809#c109968 
---------------------------------------------------------------------- 
Parsing of all Asterisk configuration files is always top-down; if you
#include another file at a particular point, that is no different than
actually pasting the contents of that file into the first file at that same
point. In fact, chan_dahdi is not even aware that #include (or #exec) are
being used, that is handled entirely by the config file reader, and
chan_dahdi only receives a list of categories, variables and values to
iterate over.

I don't think that there is any reason to change Asterisk here; the right
solution is what you've already pointed out... to #include the content that
relies on the settings in [channels] after those settings, not before them. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-01 16:07 kpfleming      Note Added: 0109968                          
======================================================================




More information about the asterisk-bugs mailing list