Is there a way to fix DAHDI

Hi,

About a year ago I did some updates to FreePbx-11 with Asterisk-13. and in the process, DAHDI broke. It doest not work and in FreePBX portal says that DAHDI is not running…

lsmod | grep dahdi

return and blank prompt.

I left it alone back then, but now I am curious again if I can fix. I have an FXO/FXS card in the server and have a POTS line, I can plug in it for a FAX. If anyone can point me to a solution, that would be a great help. Thanks,

What make and model of card?

It is an older Digium 1A4A00F card with 4 S110 FXS modules.

You might want to run ‘lspci’ and see if the card is actually being detected by the machine. This could be a hardware issue.

Hmmm, well as you know with 4 x FXS there will be no connecting to a POTS line without an FXO port.

Have you also tried running ‘dahdi_genconf -v’ ?

1 Like

I do have 4 FXO modules as well. I have now 2 and 2. I will try the Lspci see if machine sees them, but it did see them before. Besides, things like meetme do not work either which makes me believe that DAHDI software is dead.

Run the following commands

lspci
dahdi_genconf -vvv
dahdi_cfg -vvv

and post here.

lspci output is

00:00.0 Host bridge: Intel Corporation 5400 Chipset Memory Controller Hub (rev 20)
00:01.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 1 (rev 20)
00:05.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 5 (rev 20)
00:09.0 PCI bridge: Intel Corporation 5400 Chipset PCI Express Port 9 (rev 20)
00:10.0 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)
00:10.1 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)
00:10.2 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)
00:10.3 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)
00:10.4 Host bridge: Intel Corporation 5400 Chipset FSB Registers (rev 20)
00:11.0 Host bridge: Intel Corporation 5400 Chipset CE/SF Registers (rev 20)
00:15.0 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)
00:15.1 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)
00:16.0 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)
00:16.1 Host bridge: Intel Corporation 5400 Chipset FBD Registers (rev 20)
00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio Controller (rev 09)
00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)
00:1d.0 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #1 (rev 09)
00:1d.1 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 (rev 09)
00:1d.2 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 (rev 09)
00:1d.3 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 (rev 09)
00:1d.7 USB controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI USB2 Controller (rev 09)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)
00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09)
00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev 09)
00:1f.2 IDE interface: Intel Corporation 631xESB/632xESB/3100 Chipset SATA IDE Controller (rev 09)
00:1f.3 SMBus: Intel Corporation 631xESB/632xESB/3100 Chipset SMBus Controller (rev 09)
02:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1)
03:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)
03:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)
04:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)
04:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)
07:05.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
07:06.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5754 Gigabit Ethernet PCI Express (rev 02)

dahdi_genconf -vvv

Default parameters from /etc/dahdi/genconf_parameters
Empty configuration – no spans
Generating /etc/dahdi/assigned-spans.conf
/usr/sbin/dahdi_span_assignments: Missing ‘/sys/bus/dahdi_devices/devices’ (DAHDI driver unloaded?)
Command failed (status=256): ‘dahdi_span_assignments dumpconfig > /etc/dahdi/assigned-spans.conf’ at /usr/local/share/perl5/Dahdi/Config/Gen/Assignedspans.pm line 40.

dahdi_cfg -vvv

Default parameters from /etc/dahdi/genconf_parameters
Empty configuration – no spans
Generating /etc/dahdi/assigned-spans.conf
/usr/sbin/dahdi_span_assignments: Missing ‘/sys/bus/dahdi_devices/devices’ (DAHDI driver unloaded?)
Command failed (status=256): ‘dahdi_span_assignments dumpconfig > /etc/dahdi/assigned-spans.conf’ at /usr/local/share/perl5/Dahdi/Config/Gen/Assignedspans.pm line 40.
[root@localhost ffmpeg]# Default parameters from /etc/dahdi/genconf_parameters
-bash: Default: command not found
[root@localhost ffmpeg]# Empty configuration – no spans
-bash: Empty: command not found
[root@localhost ffmpeg]# Generating /etc/dahdi/assigned-spans.conf
-bash: Generating: command not found
[root@localhost ffmpeg]# /usr/sbin/dahdi_span_assignments: Missing ‘/sys/bus/dahdi_devices/devices’ (DAHDI driver unloaded?)
-bash: syntax error near unexpected token (' [root@localhost ffmpeg]# Command failed (status=256): 'dahdi_span_assignments dumpconfig > /etc/dahdi/assigned-spans.conf' at /usr/local/share/perl5/Dahdi/Config/Gen/Assignedspans.pm line 40. -bash: syntax error near unexpected token (’
[root@localhost ffmpeg]# dahdi_cfg -vvv
DAHDI Tools Version - 2.10.0.1
Notice: Configuration file is /etc/dahdi/system.conf
line 0: Unable to open master device ‘/dev/dahdi/ctl’

1 error(s) detected

I think there is something not right with the log from dahd_cfg -vvv output. Care to run again the command and post the log again?

DAHDI Tools Version - 2.10.0.1
Notice: Configuration file is /etc/dahdi/system.conf
line 0: Unable to open master device ‘/dev/dahdi/ctl’

1 error(s) detected

The error message points at two possible causes:

  1. Your system isn’t installing the device driver for your DAHDI card.
  2. The ownership of /etc/dahdi/ctl is borked and you need to fix it.

From the lspci command you ran earlier, it looks to me like your card isn’t being recognized and isn’t getting the drivers loaded.

Thanks for this help.

I did not have ctl directory in the /dev/dahdi

I have added it and chown asterisk on that

I see now more meaningful output of your commands

[root@localhost ~]# dahdi_genconf -vvv
Default parameters from /etc/dahdi/genconf_parameters
Generating /etc/dahdi/assigned-spans.conf
Generating /etc/dahdi/system.conf
Generating /etc/asterisk/dahdi-channels.conf

[root@localhost ~]# dahdi_cfg -vvv
DAHDI Tools Version - 2.10.0.1

DAHDI Version: 2.10.0.1
Echo Canceller(s):
Configuration

Channel map:

Channel 01: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 04)
Channel 05: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 07)
Channel 08: FXS Kewlstart (Default) (Echo Canceler: oslec) (Slaves: 08)

8 channels to configure.

Setting echocan for channel 1 to oslec
Setting echocan for channel 2 to oslec
Setting echocan for channel 3 to oslec
Setting echocan for channel 4 to oslec
Setting echocan for channel 5 to oslec
Setting echocan for channel 6 to oslec
Setting echocan for channel 7 to oslec
Setting echocan for channel 8 to oslec

Now Asterisk would not start

fwconsole -vvv start

gives me this

[Whoops\Exception\ErrorException]
filetype(): Lstat failed for /var/log/asterisk/fail2ban.1

You didn’t mention if this is a Distro install or not. If it is, I suggest you bring the whole system current http://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66
or start at an earlier version and bring it up.

Or just do a yum update fail2ban and fwcosole chown and see if that brings it around.

It is the most current FreePBX Asterisk. and I have run yum remove fail2ban and yum install fail2ban with no effect. Still can not load

Look at that file. It may be large. Delete it if it is

rm -f /var/log/asterisk/fail2ban.1

1 Like

Now I have this

[Whoops\Exception\ErrorException]
filetype(): Lstat failed for /var/lib/asterisk/bin/freepbx_engine_hook_dahd
iconfig

Was the file large? Or did you just randomly delete it?

What’s the status of that new file?