Distro 1.87.29.55 DAHDI not working

I’ve just completed a clean install from FreePBX Distro 1.87.29.55 that I downloaded yesterday. All is going well except that my DAHDi channels on my TDM400P don’t work. They show up in the config module but when trying to route a call to a DAHDi trunk, I get the following in the Asterisk console:

-- Executing [s@macro-dialout-trunk:20] Dial("SIP/6330-00000001", "DAHDI/2/xxxxxxxxxxx,300,TtrX") in new stack

[2011-11-06 22:01:03] WARNING[8658]: app_dial.c:2198 dial_exec_full: Unable to create channel of type ‘DAHDI’ (cause 0 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)

Hmmm. I found a thread “New install - DAHDI Help” http://www.freepbx.org/forum/freepbx/installation/new-install-dahdi-help
with what seemed to be similar symptoms. I tried the yum update command, but this didn’t fix my problem.

In that thread, SkykingOH suggests some diagnostc steps, which I repeated. Here’s the output:
[root@pbx asterisk]# service asterisk stop
Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [ OK ]
[root@pbx asterisk]# service dahdi restart
Unloading DAHDI hardware modules: done
Loading DAHDI hardware modules:
wct4xxp: [ OK ]
wcte12xp: [ OK ]
wct1xxp: [ OK ]
wcte11xp: [ OK ]
wctdm24xxp: [ OK ]
wcfxo: [ OK ]
wctdm: [ OK ]
wcb4xxp: [ OK ]
wctc4xxp: [ OK ]
xpp_usb: [ OK ]

Running dahdi_cfg: [ OK ]
[root@pbx asterisk]#

OK, so next step:

[root@pbx asterisk]#
[root@pbx asterisk]# service dahdi stop
Unloading DAHDI hardware modules: done
[root@pbx asterisk]# dahdi_cfg -vvvvv
DAHDI Tools Version - 2.5.0.1
Notice: Configuration file is /etc/dahdi/system.conf
line 0: Unable to open master device ‘/dev/dahdi/ctl’

1 error(s) detected

[root@pbx asterisk]#

Well, that might be a clue, but I’m not sure where to go with it.
Next troubleshooting step:

[root@pbx asterisk]# service dahdi start
Loading DAHDI hardware modules:
wct4xxp: [ OK ]
wcte12xp: [ OK ]
wct1xxp: [ OK ]
wcte11xp: [ OK ]
wctdm24xxp: [ OK ]
wcfxo: [ OK ]
wctdm: [ OK ]
wcb4xxp: [ OK ]
wctc4xxp: [ OK ]
xpp_usb: [ OK ]

Running dahdi_cfg: [ OK ]
[root@pbx asterisk]# service dahdi status

Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)

1 FXO FXSKS
2 FXO FXSKS
3 unknown Reserved
4 FXS FXOKS
[root@pbx asterisk]#

This is all showing correctly and as I expected.

Please help me bring this to a successful resolution if you can, I’d really appreciate any help. I feel like it is >close< but I don’t know enough about asterisk internals to know where to go next.

You are not having the same issues, what I pointed out was caused by libss7 not in the base build. That has been fixed.

Rerun dahdi_genconf with DAHDI running.

What is the output of ‘dahdi show channels’ in Asterisk?

Sounds like your channels are not defined in Asterisk, that is what genconf does.

It is always a good idea to verify the output from dahdi genconf. Since you have FreePBX you need to add the -F flag when running it (does anybody read the documentation on this stuff except me?) so the FreePBX stuff is generated when using FXS extensions (fxo is trunks and transparent to FreePBX).

The written configs are in /etc/asterisk as chan_dahdi and dahdi_channels etc. You can follow the includes and have a good understanding what is going on. The last included config takes precedence.

I uninstalled the (unsupported) Digium DAHDI module from FreePBX, and my trunks are now working.

Re: your comment about ‘reading the manual’. The appeal of having a graphical front end configuration interface is to not have to get down and dirty with config files. My aim is to never hand-edit a config file or tweak any OS settings unless I absolutely have to. I’ve found that once one embarks down that path, a maintenance nightmare will ensue. The big win with these distros is the promise of keeping everything as close to the original distro as humanly possible, which makes things highly repeatable. This sort of problem, therefore, is very frustrating because the first advice one always gets is to hack a load of config files.

Anyway, rant over :wink: Thanks very much for your help.

And that is why the module is unsupported. It does not work and Digium has put no resources in the module since they wrote it 2 years ago. We highly recommend not installing unsupported modules unless you know what you are doing.

As Tony pointed out the DAHDI module is not supported and was written by Digium. It is touchy and still far easier and more reliable to configure DAHDI manually.

My comment on the manual was the man page for gen_dahdiconf. It explains the FreePBX flag.

A graphical tool would be nice for DAHDI.

Realisitcally you have to have a comfort level with the Linux and the shell to succesfully administor any Asterisk based system, even with FreePBX.

That’s not the stance that Digium takes with its Switchvox product. Can you even access the command line in Switchvox?

Do you see Switchvox posted anywhere on this site. This is FreePBX. FreePBX does not manage your dahdi cards since Digium cards get setup different from Rhino and Sangoma cards.

It would also open a security issue to give the apache user access to setup the dahdi settings since it would require root access for the apache user.

Re: the switchvox comment, I was responding to the assertion made above that it was necessary to be generally comfortable with Linux and the command line in order to run any flavour of Asterisk. I was merely pointing out that there is at least one derivative that doesn’t even allow access to the command line.

Thanks for the information about DAHDI and the reasons why FreePBX doesn’t configure it. That’s useful insight. But tell me, where would I have found that information if you hadn’t just happened to mention it? The reason I ask is because I want to be self-sufficient and learn to troubleshoot these things by myself, but the documentation trail is far from obvious. Where should I be looking?

Arggh. The problem’s come back and I have no idea why. OK, here’s the console output:

    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/6330-00000008", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/6330-00000008", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] GotoIf("SIP/6330-00000008", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:20] Dial("SIP/6330-00000008", "DAHDI/1/01443858212,300,TtrX") in new stack
[2011-11-08 16:41:43] WARNING[6848]: app_dial.c:2198 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:21] NoOp("SIP/6330-00000008", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0") in new stack
    -- Executing [s@macro-dialout-trunk:22] Goto("SIP/6330-00000008", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/6330-00000008", "RC=0") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/6330-00000008", "0,1") in new stack

Running dahdi_genconf results in this:

[root@pbx ~]# dahdi_genconf -F -v
Default parameters from /etc/dahdi/genconf_parameters
Generating /etc/dahdi/system.conf
Generating /etc/asterisk/dahdi-channels.conf
[root@pbx ~]#

Also,

pbx*CLI> dahdi show channels
   Chan Extension  Context         Language   MOH Interpret        Blocked    State
 pseudo            default                    default                         In Service

You learn by attending things like OTTS and Astricon and being part of the community and years of experience. Things like this can jsut be taught in a forum or documentation.

OK I think I’m getting somewhere.

I found a file called chan_dahdi.conf.renamed which I think I had renamed after an earlier issue with the ‘symlink’ warning in the status page, I followed the instructions and it said to delete or rename this file. I renamed it back and things are starting to work now. .

This stuff is hard; not least because its hard to find the information. There’s plenty of information out there, but making sense of all the little snippets is the hard thing. I think what I would really appreciate is some concise prescriptive guidance on how DAHDi is intended to be set up. Assuming everything is working correctly, what it the normal setup sequence for a TDM400 card from a clean install of the FreePBX distro?

That answer leaves me cold. I tried to write a constructive reply but whatever I write it seems like I’m being negative. So I would rather just say thanks for your help and leave it at that :slight_smile: