Dahdi settings gone after reboot

Hi,

After doing a system reboot I noticed that my TDM400 cards are showing unconfigured. I have to run dahdi_genconf and then restart asterisk to get them working again. I assume this is a permissions problem on a config file but which file?

Thanks

Centos 5.8 - up to date
Asterisk 1.8.12.1
Freepbx 2.10.0

dahdi_genconf creates two files.

/etc/dahdi/system.conf
/etc/asterisk/dahdi-channels.conf

system.conf is read by dahdi_cfg which should be called when the system loads the dahdi driver. In Centos that should be the script /etc/init.d/dahdi.

The Asterisk dahdi channel driver (chan_dahdi.so) reads a config file of /etc/asterisk/chan_dahdi.cfg. Under FreePBX, that file ‘includes’ the file chan_dahdi_additional.conf. One of those two files probably ‘includes’ the dahdi-channels.conf file, I do not remember which one.

There is another file that is used when loading the dahdi kernel module, it is /etc/dahdi/modules which lists which kernel modules to load based on the card(s) that are installed in the system. If you are unsure, you can let it load all modules. This file is NOT modified by dahdi_genconf.

If the driver is infact being loaded at system boot, yet the channels are not being configured, you can try adding the command ‘dahdi_cfg’ to the /etc/rc.local script file before the call to ‘amportal start’

Hi,

Thanks for responding so quickly I did not see that a response had come in… I do not have anything in /etc/init.d/dahdi. The file doesn’t even exist. What should be in this file?

Thanks

If you run make install, properly, on a RedHat family system, including CentOS, it will copy dahdi.init to /etc/init.d/dahdi and then run chkconfig to link it in to the run level directories.

Hi,

That worked it now properly has the /etc/init.d/dahdi file and it handles a reboot. I also have a /etc/init.d/zaptel should I remove that file? Also I could swear I ran the make config and make install when I installed dahdi, what would erase these files?

Thanks

Okay that sort of worked now asterisk does not see the channels even though the TD400 is coming up properly configured. Do I need to rerun the asterisk ‘make config’ and ‘make install’ after running the same for the dahdi driver??

Thanks

You should not have to rerun the make config again.

When the dahdi starts, using the init.d script, it runs dahdi_config. If your card is coming up, then that part is working.

The next piece of the puzzle is when Asterisk starts, it load chan_dahdi.so. That reads /etc/asterisk/chan_dahdi.conf. Please refer back to my first message and verify that dahdi-channels.conf exists and chan_dahdi.conf includes it.

I’m having ALMOST the same issue.

Dahdi_tool shows

8/8/4 - that’s correct i have and 8 port card with 4 lines in it

when I reboot i get 8/0/0

Then I run dahdi_cfg

amportal restart (since the dahdi failed to load on boot)

and it is fixed 8/8/4\

???