A200 - DAHDI unconfigured - can fix but reboots kill it?

Working on an install of FreePBX 13 in CentOS 7.3, and I’m using an A200 card. When I run “dahdi show status” it comes up with “UNCONFI” under alarms. I see a similar unconfigured alarm when I run “dahdi_scan”

I can fix it by running these commands, temporarily. It stops working again when I reboot.

dahdi_genconf
chown -R asterisk. /etc/dahdi
fwconsole restart

Once I do that, if I asterisk -r and do “dahdi show status”, I see no alarms:

localhost*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC    Fra Codi Options  LBO
wrtdm Board 1                            OK      0      0      0      CAS Unk           0 db (CSU)/0-133 feet (DSX-1)

And if I do “dahdi show channels” I see all of my ports:

localhost*CLI> dahdi show channels
   Chan Extension       Context         Language   MOH Interpret        Blocked    In Service Description
 pseudo                 default                    default                         Yes
  1                 from-zaptel                default                         Yes
  2                 from-zaptel                default                         Yes
  3                 from-zaptel                default                         Yes
  4                 from-zaptel                default                         Yes
  5                 from-zaptel                default                         Yes
  6                 from-zaptel                default                         Yes
  7                 from-zaptel                default                         Yes
  8                 from-zaptel                default                         Yes

As soon as I reboot though, it goes right back to having an unconfigured alarm, and my only channel in “dahdi show channels” is psuedo.

Looking at assigned-spans.conf and system.conf in /etc/dahdi, they aren’t being changed after a reboot that I can tell - the modification date and ownership/perms aren’t changed, and looking inside the files they look the same. Same for chan_dahdi.conf in /etc/asterisk

If I just run the chown and fwconsole restart commands mentioned above, that doesn’t fix it. So what is dahdi_genconf doing to fix this, and what might be un-fixing it at boot? Is wanpipe doing something fishy?

What happens if you try to set up the dahdi configuration through the web gui - connectivity / dahdi config & then setting the various configuration options via the option selections on the RHS and doing a dahdi restart / asterisk restart?

+1 to what chaser said…

If you don’t want to use the DAHDI helper module chaser is talking about, you should use setup-sangoma

I have never heard of configuring an A200 with dahdi_genconf

It might be possible but I have never heard of it…

Good luck and have a nice day!

Nick

setup-sangoma appears to be part of the install when you compile the drivers using “./Setup install” - so I had already effectively run that as part of the wanpipe install.

I was following the instructions here. After the ./Setup install script finishes (which as I said, appears to include setup-sangoma) the instructions recommend running wancfg_dahdi, which takes care of two of the same files that dahdi_genconf does (/etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf)

I think the real issue is that most of the files generated by this process are owned by root when they need to be owned by asterisk.

Also, I think the piece I was missing is that dahdi_genconf may be running dahdi_cfg after it creates files.

Anyway, I ran wancfg_dahdi again, changed the ownership on the relevant files in /etc/dahdi, /etc/wanpipe, and /etc/asterisk back to asterisk:asterisk, ran dahdi_cfg, then fwconsole restart. It’s working now, and it it survives reboots.

Your solution is the same Samgoma provided recipe many have used for years, just disable/delete the dahdi helper module in FreePBX (you have successfully helped yourself already) and you should be fine oermissions and all

I don’t think so, I think the permissions are relevant but not covered.

If asterisk is running as the asterisk user (and not root) then I believe at least the conf files in /etc/dahdi and /etc/asterisk/chan_dahdi.conf need to be owned by asterisk.

When you run wancfg_dahdi as root though, those conf files end up owned by root.

Also I suspect correcting the ownership isn’t enough, you also need to run dahdi_cfg before you restart asterisk.

Asterisk is a completely different software than dahdi/wanpipe they are a “channel driver” that asterisk can use when well configured. And no, if you do it the “old fashioned way” then the wanpipe setup will set all your dahdi files and configs with the correct permissions, it’s only when FreePBX gets involved that any permissions or other files need to be touched. Just disable the “helper” and all will be cool.

So ,setup-sangoma does all the work if you choose to go the dahdi way. Asterisk and hence FreePBX will not have to be involved at all.

1 Like