|Summary:||ASTERISK-14747: [patch] callprogress and faxdetect not read when building channel results in fax detection failure|
|Date Opened:||2009-09-01 13:15:31||Date Closed:||2011-06-07 14:08:13|
|Environment:||Attachments:||( 0) 126.96.36.199-15809-1.diff|
|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 :|
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.
****** ADDITIONAL INFORMATION ******
A simple workaround in my case would be to call #include dahdi-channels in the configuration file *after* having set all my attributes :
I'm running a Digium TE120P PRI card.
|Comments:||By: Kevin P. Fleming (kpfleming) 2009-09-01 16:07:24|
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.
By: phsultan (phsultan) 2009-09-01 16:59:06
Ok I understand. I found several configuration snippets that set the #include dahdi-channels.conf statement before all the attributes under the [channels] category, and spent half a day to understand why I couldn't have the fax detection working.
Perhaps a explicit note in dahdi-channels.conf mentioning this file should be included after the attributes under [channels] can be of any help? At least it would have been for people like me :)
Thanks for the clarification Kevin, please close the ticket.
By: Leif Madsen (lmadsen) 2009-09-24 13:49:14
Closed per the reporter.