[Solved] Dahdi config needs to applied every morning

Ever since upgrading to the latest distro (went from 6.12.65 to 10.13.66) my users can’t make outgoing calls on a tdm2400p. If I simply go into the dahdi config module in the gui and edit and save (making no changes) then it works.
How do I start to troubleshoot this? A ‘service dahdi status’ in console and ‘dahdi show channels’ in asterisk look normal before re-applying the configuration.
Inbound calls work fine.

Ok, barring that can anyone tell me how to automate the process of saving the configuration and reloading the dahdi module that I could put in a cron job?

At the risk of getting flamed by the Schmooze folks, I would save the proper config files and remove the DAHDI FreePBX Module - DAHDI channels, once they are set up correctly, should never come “undone” unless something is changing their settings - I don’t use the DAHDI module because I am an old-timer and learned how to set it up manually, so I may not be “normal” but since the problem keeps coming back, and we still have many customers using hardware cards and not having this problem, I would suspect the module.

Once they are set up correctly, here are the files that need to be preserved, with their full paths:


So if these are good, copy them, remove the DAHDI FreePBX module, and make sure they didn’t get nuked and then reboot the box for good measure and make sure everything works.

1 Like

@GSnover may well be on to something, but it still doesn’t explain why (or even if) the dahdi stuff isn’t getting loaded correctly. From what I’m hearing, there is some reason why your extensions are not matching up with the DAHDI line config.

I use a lot of DAHDI services (not with that card, but with the latest FreePBX) and none of my systems have this particular issue.

The part that makes me go “hmmm” is the “Every Morning” part. What is happening overnight that is causing DAHDI (or Asterisk) to have to be restarted?

Since I’m kind of a moron, you have to assume that I don’t know what I’m talking about. In spite of that, it sounds to me like your DAHDI program is stopping and restarting overnight. If that happens and Asterisk DOESN’T restart, you can lose your DAHDI channels.

One of my systems does have a pause like this where I stop Asterisk, then stop DAHDI, then pause for 30 seconds while I clear out some long-term recordings, then restart DAHDI, and restart Asterisk. The order there is pretty important, in that if you stop and start one process without stopping and starting the other, strange things can happen.

Also, if you are using chkconfig to start and stop your processes, make sure that DAHDI starts in phase 2 and Asterisk starts in phase 3. It is absolutely critical that DAHDI be completely up and going when Asterisk starts, or you can lose your handset connections.

I am using the Freepbx distro so I did not mess with chkconfig at all, but dahdi is set to start at rc2 and asterisk is not being started by the services system.
I’m unaware of anything that may be running overnight that is either starting or stopping any of those systems. I’ll research that.

I’ll try to do what GSnover suggests over the weekend and let you know.

OK. Problem persisted with the freepbx dahdi module uninstalled.

But I noticed something watching the console while it wasn’t working. It was trying to make the outgoing call on port 8 of my 8 port card. That is a phone module, not pots. I had just the first 3 ports in group 0 and incoming descends from 1 and outgoing ascends from the bottom of the group.
Going and looking at /etc/dahdi/system.conf I noticed that all ports were in group 0. No idea of how that changed and I didn’t catch it. Maybe in the system upgrade? Anyway that still doesn’t explain how it works immediately after a module reload.

I’ll watch it again tomorrow to see if something else is changing that file.

Thanks for the help.

dahdi service requires that


are all kosher, if you used the helper and now don’t, then fix them, ref:-


Do that and your next reboot will be fine, if the helper is still running then all your work will be over-written.

Just to follow up. I have this working. I realized that something had run dahdi genconf and messed up the permissions on system.conf and the dahdi files in /etc/ asterisk. I have no idea what caused it to run as it was at a time when I was not logged in to the system.
I changed the permissions and reloaded the helper and everything is working fine.

Thanks for your help.