Dahdi settings bug

Hello All,

This took me a while to figure out but it appears we are not saving certain settings properly in the /etc/asterisk/chan_dahdi.conf and no settings in the /etc/dahdi/system.conf

After upgrading a system running a digium card TDM800P I found that the client was experiencing local echo. After researching I noticed that dahdi_cfg -vvv would show no noise cancelling even though the general settings in the dadhdi config option show echo cancelling yes.


DAHDI Tools Version -

DAHDI Version:
Echo Canceller(s): HWEC

Channel map:

Channel 01: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: none) (Slaves: 04)

4 channels to configure.

Setting echocan for channel 1 to none
Setting echocan for channel 2 to none
Setting echocan for channel 3 to none
Setting echocan for channel 4 to none

I see that in /etc/asterisk/chan_dahdi.conf

However there are NO entries for /etc/dahdi/system.conf
reflecting echo cancelling.
If I manually added:

then that did part of the echo cancelling.

The next thing I noticed is in the global settings that
Enable Echo Training is set to no and then when you set it to yes, it actually writes out yes to the /etc/asterisk/chan_dahdi.conf file the value:
instead of writing echotraining=400 which is the default value according to the docs.
This in the end doesn’t work at all to do the echo training unless you put the physical number instead of Yes or No.

In the end the biggest problem is nothing is really being saved to /etc/dahdi/system.conf so the card never executes any noise cancelling so you get only this, no matter what your settings are:


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 ;



I added by hand:

I believe that’s the gist of the problem, that’s a lot of details so hoping I didn’t mistype anything.

Currently running everything updated to the minute:
Which is 2.11.x branch.

Let me know, I don’t work with a lot of analog cards since we mainly work on pure SIP but I think this is an accurate detail of the problem.

I’m a bit lost here.

First you never mention if you are using the dahdi configuration module from the GUI, but I assume you are because of the glaring message in system.conf, but then you start talking about manually adding settings into system.conf. So what is it. If you dont want to use the GUI then you must uninstall the module. If you want to use the gui then add the settings to the right place (I just did it on our development machine and it works fine), note, you will have to run amportal chown before this, especially if you’ve changed files as root.

Also there is no “general” settings in the dahdi configuration module so I’m really not sure what you are looking at or dealing with. Perhaps you should try updating your module first and then come back if you have issues (always do that before reporting bugs/issues)

Also you can add settings to system.conf through the gui and it writes everything it needs to write to system.conf and from looking at your system.conf it is being written to because you have channel assignments in there.

Hi tm1000,
In the dahdi config ( under connectivity) on the top right side is a small menu called settings, I meant to say “global settings”. Yes, all configuration happens in the GUI, but once I discovered the information not being written to the files the way I expected, I edited the files by hand to first confirm I was correct in how to get things working. Then I went back and put the settings through the gui again and pushed them to the box, thereby confirming my findings that the settings were not being properly written to the files.

Can you add extra settings to system.conf through the GUI or not. I am still confused and you didn’t answer my question. You keep saying “not being properly written” but you never once told me if you tried to add the extra settings to additional settings in the system settings dialog. Please confirm.

Not sure that module was ever built for a 4 year old DAHDI. You are on 2.5 and the current is 2.8.

I think we still need to add the echo canceler into system.conf, I need to check on that

I usually don’t have to use “custom” settings.
If I set echo cancelling to YES and add the YES to echo training, I’m using standard stuff. It’s just when you set those it is writing that configuration in /etc/asterisk/chan_dahdi.conf but it’s not adding those settings to /etc/dahdi/system.conf which is needed or the card doesn’t turn on echo cancelling at all. Then, the option in the system says echo cancelling yes, no or a time, if you simply put use the setting in /etc/asterisk/chan_dahdi.conf should be echotraining=400 according to the documentation which is the default, instead it says yes which doesn’t work, if I put in the field a value like 400 or 800 it does write that correctly, so the code there needs to write 400 if it’s = yes, not yes.

Does this claify a little better what I’m trying to say??


Let me be a little clearer I wrote that quick and didn’t re-read before posting.

  1. YES you have to have the echocanceller=MG2,x-x in /etc/dahdi/system.conf or it won’t work, I knew that previously but tested to confirm. so that’s 1 fix.
  2. for echotraining the options you note in the help is Yes/No/Value if you set it to yes it says the value is defaulted to 400, when you write the configuration after picking yes you are setting the value in the /etc/asterisk/chan_dahdi.conf file to echotraining=yes instead of setting it to echotraining=400, that doesn’t work with yes in the value.
    If you put any number, then that number is placed there as expected so the problem there is simply when it’s yes it should be set to the default value not the word yes.

Sorry, sometimes you type faster then your brain thinks and when you re-read what you wrote you scratch your head thinking what the hell was I saying.


Hi tm1000,

Any findings?