Multiple semicolons in my chan_dahdi_additional.conf?

I don’t know if anyone else has ever had this problem but, I thought I would post it here to maybe help others.

I’ve been using Asterisk based systems for about 6 years for my small business. I started with an [email protected] system and moved to Trixbox CE after the development switched over to them. At first I couldn’t get the thing to answer the phone and with the help of a friend, discovered an odd problem. When I would make any changes to the system it would progressively add semicolons to the file that had my extension configuration (I think the file was zaptel.conf or something… sorry, It was a long time ago). After removing the semicolons, the system would work fine. I finally made that file read only and forgot about it.

Recently I had to rebuild the system due to a crash so, to make a long story short, I was having the same issue. IVR WONT answer the phone!!! After banging my head for a while I remembered the issue I had years back but, I couldn’t remember or find the file… Thanks to a friend reminding me about GREP (grep “;;;;” .), I was able to search the system and low and behold, I found the NEW file name and the same issue… After removing all the semicolons, the system started to work…

The new file is now called “chan_dahdi_additional.conf “

My config looked like this before I altered it
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

;;;;;;[41]
signalling=fxo_ks
pickupgroup=
[email protected]
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <41>
busydetect=no
busycount=7
accountcode=
channel=>6-1

My hardware has been consistent over the years (except the hard drive). I have a TDM400 and 2 FX0 cards in an old Dell workstation. I’m not sure why this happens. I looked all over the net and couldn’t find anyone having this issue so, I thought I would post it. Maybe what I found will help others…

Indigoprod,

Maybe you can post up your other dahdi files so we can see what is going on here, because Phillippe correctly points out that something more is afoot here. Did you manually enter the information for dahdi in that file?

Also, what system are you running after the rebuild?

Tom

This is not a FreePBX problem (though I would be curious to find out why editing the extension adds more than the one semi-colon. That isn’t causing your problem, but it isn’t “normal”, either.) Your problems are related to how you configured Dahdi before Starting with FreePBX.

Having said that, Philippe properly pointed out what is likely your problem:

After a very brief look at the files you posted up, it looks like you have four channels, two FXO and two FXS. Channels 3 & 4 are set up as extensions 4003 and 4004, but then the bogus “channel=>6-1” is set up as extension 41.

My guess here is that you might have copied some of these files over from an old install, rather than regenerating the files when you reinstalled, which has resulted in some weirdness.

I would recommend that you start over fresh with your DAHDi files, as your system appears to be working, but that is in spite of what is in your config, not because of it.

Tom

The other dahdi files may never have been “edited by hand” but they are not files that FreePBX provides.

Note the auto-generated files from /usr/sbin/dahdi_genconf which is creating the FXS phone configurations. You will also noticed that the callerid fields that it is generating are not correct (from a FreePBX perspective).

Chances are, with the above you are working but have some odd behavior and in any event, the FreePBX configuration is not doing anything for you.

(Also notice how the auto generated configuration has the “;;;” syntax with the commented information of which line it is referring to.

Hi Tom,

Thanks for your reply. No files other than ‘chan_dahdi_additional.conf’ were ever edited by hand. Like I wrote, the only reason I edited this file was because it was the only way I could get the IVR to answer the phone. This is the same physical system I started with years ago. The only thing that has changed is the hard drive but, this problem has been persistent through the years starting with [email protected]… It never really bother me because once I get my extensions setup, they don’t need to change… I wasn’t really posting it as a bug but just as what seemed to be an odd happening (for me)… Philippe seemed offended…

Not sure what files you were wanting to see. This is currently an Elastix build…


chan_dahdi.conf.elastixsave [----] 0 L:[ 1+ 0 1/ 35] *(0 / 606b)= [ 91 0x5B

[trunkgroups]

[channels]
context=from-pstn
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
faxdetect=incoming
echotraining=800
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1

;Uncomment these lines if you have problems with the disconection of your analog lines
;busydetect=yes
;busycount=3

immediate=no

#include dahdi-channels.conf
#include chan_dahdi_additional.conf


chan_dahdi.conf.template [----] 0 L:[ 1+ 0 1/ 35] *(0 / 715b)= ; 59 0x3B
;# Flash Operator Panel will parse this file for dahdi trunk buttons
;# AMPLABEL will be used for the display labels on the buttons

;# %c Dahdi Channel number
;# %n Line number
;# %N Line number, but restart counter
;# Example:
;# ;AMPLABEL:Channel %c - Button %n

;# For Dahdi/* buttons use the following
;# (where x=number of buttons to dislpay)
;# ;AMPWILDCARDLABEL(x):MyLabel

[channels]
language=en

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

; XTDM20B Port #1,2 plugged into PSTN
;AMPLABEL:Channel %c - Button %n
context=from-pstn
signalling=fxs_ks
faxdetect=incoming
usecallerid=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
group=0
channel=1-2


dahdi-channels.conf [----] 0 L:[ 1+ 0 1/ 84] *(0 /1508b)= ; 59 0x3B
; Autogenerated by /usr/sbin/dahdi_genconf on Tue Aug 10 21:57:16 2010
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCFXO/0 “Wildcard X101P Board 1” (MASTER)
;;; line="1 WCFXO/0/0"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

; Span 2: WCFXO/1 “Wildcard X101P Board 2”
;;; line="2 WCFXO/1/0"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 2
callerid=
group=
context=default

; Span 3: WCTDM/4 “Wildcard TDM400P REV E/F Board 5”
;;; line="3 WCTDM/4/0 FXOKS"
signalling=fxo_ks
callerid=“Channel 3” <4003>
mailbox=4003
group=5
context=from-internal
channel => 3
callerid=
mailbox=
group=
context=default

;;; line="4 WCTDM/4/1 FXOKS"
signalling=fxo_ks
callerid=“Channel 4” <4004>
mailbox=4004


That format is proper, though you need to make sure that the chan_dahdi_additional.conf is #included properly if you are using it.

dahdi (and zap) files have a format that is not the same as other Asterisk configuration files (as they really are not for Asterisk, they are for DAHDI and Zaptel.

The use of “[nn]” is meaningless, it is only put in their, prefaced by the “;;;;;” (which are simply comments in those files) for a visual queue so you can see more clearly the configuration that will actually be used by the given channel, which is ultimately set with the “channel=>n” directive (which is ultimately what channel all the above settings apply to. And, “n” is always a channel number (thus the above looks like incorrect user input “6-1”.

So I guess the moral of the story, if you think something is wrong, and a bug, then either do some more homework to confirm if there really is an issue, or report the bug to the tracker so that others can benefit from your findings or otherwise it can be “ruled” upon, trying to out-smart the system and then letting it linger for years to eventually come back and haunt you :slight_smile:

As far as your system now working, it is for other reasons. I don’t know what removing those will do, very likely, it will make dahdi detect an error and not carry on. If you are not using the auto-configuration, then you should just not include that file at all. My best guess, you have the needed channels configured elsewhere.But I suggest you actually determine what you really want and either not use this at all, or get it working properly so you are not again haunted with issues.