FreePBX 17 Install on Debian 12 (kernel 6.1.0-25-amd64) Fails with --dahdi switch

I am repurposing a pair of Dell PowerEdge R330 servers with Sangoma A102 telephony cards which hosted FreePBX 14 for 6 years in a primary/warm spare configuration.

I started with the old warm spare, and that is now in production and working fine.

Yesterday (10 days later) I attempted the same on the old primary server. FreePBX 17 appeared to install, but then I was getting the Apache2 default page, and the directory /var/www/html had only a single file and no other directories.

Eventually, I tried running the install script without the --dahdi switch, and then it worked, and I could access the FreePBX GUI.

Then I went back and ran the script with the --dahdi-only switch which also appeared to run.

However, DHADI Config is missing from the FreePBX Connectivity menu.

Running ‘wanrouter hwprobe’ on the production server returns good output:


Wanpipe Hardware Probe Info
1 . AFT-A102-SH : SLOT=4 : BUS=2 : IRQ=255 : CPU=A : PORT=1 : HWEC=64 : V=40
2 . AFT-A102-SH : SLOT=4 : BUS=2 : IRQ=255 : CPU=A : PORT=2 : HWEC=64 : V=40

Sangoma Card Count: A101-2=1

But not on the second server:

wanrouter: Wanpipe Module: /lib/modules/6.1.0-25-amd64/kernel/drivers/net/wan/sdladrv not found !!!
WANPIPE drivers must be compiled as modules
Check kernel configuration in /usr/src/linux/.config:
CONFIG_WAN_ROUTER=m
CONFIG_VENDOR_SANGOMA=m

The servers have the exact same model of Sangoma card installed. The only difference between the two servers is that the kernel on the production server is 6.1.0-23-amd64 but on the problem server it is 6.1.0-25-amd64.

The install log indicated “Ensure you are running a DAHDI supported Kernel. Current latest supported kernel version is 6.1.0-25.” so it should have worked.

Is there a way to install DAHDI support without the FreePBX 17 install script?

The FreePBX “Install on Debian 12” instructions include a section on DAHDI Support. I ran the provided command for the “latest supported wanpipe” which returned: 6.1.0-23.

I assume this means that Debian 12 with kernel 6.1.0-23 is the most recent supported OS. On that basis, I reverted my system to kernel 6.1.0.22 which is the version on my USB install media. Then I ran the FreePBX install script with the --dahdi-only argument. This also appeared to run, but DAHDI support was not installed and DAHDI Config is not present in the Connectivity menu.

root@freepbx2:/etc/wanpipe# wanrouter version

WANPIPE Release: 7.0.38

root@freepbx2:/etc/wanpipe# wanrouter start

ERROR: Wanpipe configuration file not found:
/etc/wanpipe/wanpipe1.conf

root@freepbx2:/# wanrouter summary

No Wanpipe configuration files found in /etc/wanpip

So, it does appear that the wanpipe component is absent, but I don’t know why.

Hi @buckadmin,We have pushed the latest wanpipe packages to the repo to support the latest kernel version(6.1.0-25), so could you give it another try?

You can configure the Sangoma card using “wancfg_dahdi” command on cli.

I ran wancfg_dahdi as root and it returned this output:

########################################################################

Sangoma Wanpipe

Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script

v2.51

Sangoma Technologies Inc.

Copyright(c) 2016.

########################################################################

Warning: Dahdi modules not found: Wanpipe not build for DAHDI
Error: Dahdi and/or Zaptel modules not found! Please install DAHDI and compile Wanpipe for DAHDI!

FreePBX 17.0.19.11 is installed and activated on the machine but as I stated, the --dahdi and dahdi-only arguments failed to install DAHDI from the script.

Yesterday, I did a bare metal reinstall of the system with Debian 12 kernel 6.1.0-23-amd64 which is the same build as on our production server. Everything is identical to the production server and I even took the A102 card from that server, but the script install still failed.

What else can I try?

@buckadmin
have you checked in a Debian hardware list DAHDI is present or not?
lshw

-bash: lshw: command not found

mybad lspci

The card is seen in hardware even though it is misidentified. It is not an analog card. Running lspci on the production server produces the same output.

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 07)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) (rev 07)
00:01.2 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x4) (rev 07)
00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
00:16.1 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #2 (rev 31)
00:17.0 SATA controller: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] (rev 31)
00:1d.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 (rev f1)
00:1d.2 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #11 (rev f1)
00:1f.0 ISA bridge: Intel Corporation C236 Chipset LPC/eSPI Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
01:00.0 PCI bridge: PLX Technology, Inc. PEX8112 x1 Lane PCI Express-to-PCI Bridge (rev aa)
02:04.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card
04:00.0 RAID bus controller: Broadcom / LSI MegaRAID SAS-3 3108 [Invader] (rev 02)
05:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5720 Gigabit Ethernet PCIe
05:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5720 Gigabit Ethernet PCIe
06:00.0 PCI bridge: Renesas Technology Corp. SH7758 PCIe Switch [PS]
07:00.0 PCI bridge: Renesas Technology Corp. SH7758 PCIe Switch [PS]
08:00.0 PCI bridge: Renesas Technology Corp. SH7758 PCIe-PCI Bridge [PPB]
09:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2 (rev 01)

what is says Dahdi Hardware?
dahdi_hardware

Same as on the production server: dahdi_hardware

pci:0000:02:04.0 wanpipe- 1923:0040 Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card

It is actually a Sangoma A102 dual-port PRI card.

If you thinking this is wrong. Try to re-install one more time DAHDI driver with new Debian kernel.
https://support.digium.com/s/article/Installing-DAHDI
https://downloads.asterisk.org/pub/telephony/dahdi-linux/

Hi @buckadmin Can you run the installation script one more time with --dahdionly then try to configure the card. Also make sure your system’s kernel version is latest (6.1.0-25).

wget https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh -O /tmp/sng_freepbx_debian_install.sh
bash /tmp/sng_freepbx_debian_install.sh --dahdi-only

1 Like

When I ran the command from the FreePBX script page yesterday it indicated wanpipe was only supported on 6.1.0.23.

apt-cache search wanpipe | grep -E “^kmod-wanpipe-[0-9]” | awk ‘{print $1}’ | awk -F’-’ ‘{print $3"-"$4}’ | sort -n | tail -1

Therefore, I downgraded the system to 6.1.0-23-amd64. If I have to upgrade to 6.1.0.25 I will need some time to do that, but since the production server is on 6.1.0.23, shouldn’t that work?

So, I ran the script again with the dahdi-only argument and it appeared to run (same as before).

Should I try to run wancfg_dahdi now?

root@freepbx2:/tmp# bash /tmp/sng_freepbx_debian_install.sh --dahdi-only
2024-09-23 08:44:57 - Performing version check…
Perfect! You’re already running the latest version.
2024-09-23 08:44:57 - Starting installation.
2024-09-23 08:44:57 - Starting FreePBX 17 installation process for freepbx2 Linux freepbx2 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux
2024-09-23 08:44:57 - Please refer to the /var/log/pbx/freepbx17-install-2024.09.23-08.44.57.log to know the process…
2024-09-23 08:44:57 - Making sure installation is sane
2024-09-23 08:45:07 - Setting up default configuration
2024-09-23 08:45:08 - Setting up repositories
2024-09-23 08:45:24 - Setting up Sangoma repository
2024-09-23 08:45:25 - You are installing FreePBX 17 on kernel 6.1.0-23.
2024-09-23 08:45:25 - Please note that if you have plan to use DAHDI then:
2024-09-23 08:45:25 - Ensure that you either choose DAHDI option so script will configure DAHDI
2024-09-23 08:45:25 - OR
2024-09-23 08:45:25 - Ensure you are running a DAHDI supported Kernel. Current latest supported kernel version is 6.1.0-25.
2024-09-23 08:45:25 - Making sure we allow only proper kernel upgrade and version installation
2024-09-23 08:45:25 - Creating kernel check script to allow proper kernel upgrades
2024-09-23 08:45:25 - Updating repository
2024-09-23 08:45:33 - Installing required packages
2024-09-23 08:45:35 - Installing nodejs …
2024-09-23 08:45:35 - nodejs failed to install …
2024-09-23 08:45:35 - Exiting the installation process as dependent nodejs failed to install …
2024-09-23 08:45:35 - Exiting script
2024-09-23 08:45:39 - Installing DAHDI card support…
2024-09-23 08:45:39 - Installing dahdi-linux-kmod-6.1.0-23 …
2024-09-23 08:45:43 - dahdi-linux-kmod-6.1.0-23 installed successfully…
2024-09-23 08:45:43 - Installing kmod-wanpipe-6.1.0-23 …
2024-09-23 08:45:43 - Exiting script

I wanted to upload the install log file but the widget didn’t like the format. However, I think I may have spotted the problem. These lines are near the end of the file:

2024-09-23 08:45:43 - Installing kmod-wanpipe-6.1.0-23 …
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 144683 (apt)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
2024-09-23 08:45:43 - Exiting script

I reviewed the install log from the production server and found the same step in the script execution. In that case it was the full installation with the --dahdi argument. You can see from the snippet included below what should have happened. So, is this a bug?

2024-08-27 12:43:49 - Installing kmod-wanpipe-6.1.0-23 …
Reading package lists…
Building dependency tree…
Reading state information…
The following NEW packages will be installed:
kmod-wanpipe-6.1.0-23
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 812 kB of archives.
After this operation, 3,794 kB of additional disk space will be used.
Get:1 http://deb.freepbx.org/freepbx17-prod bookworm/main amd64 kmod-wanpipe-6.1.0-23 amd64 7.0.38-2.sng12 [812 kB]
Fetched 812 kB in 1s (1,265 kB/s)
Selecting previously unselected package kmod-wanpipe-6.1.0-23.
(Reading database …
(Reading database … 5%
(Reading database … 10%
(Reading database … 15%
(Reading database … 20%
(Reading database … 25%
(Reading database … 30%
(Reading database … 35%
(Reading database … 40%
(Reading database … 45%
(Reading database … 50%
(Reading database … 55%
(Reading database … 60%
(Reading database … 65%
(Reading database … 70%
(Reading database … 75%
(Reading database … 80%
(Reading database … 85%
(Reading database … 90%
(Reading database … 95%
(Reading database … 100%
(Reading database … 92611 files and directories currently installed.)
Preparing to unpack …/kmod-wanpipe-6.1.0-23_7.0.38-2.sng12_amd64.deb …
Unpacking kmod-wanpipe-6.1.0-23 (7.0.38-2.sng12) …
Setting up kmod-wanpipe-6.1.0-23 (7.0.38-2.sng12) …
2024-08-27 12:43:52 - kmod-wanpipe-6.1.0-23 installed successfully…

Hi @buckadmin It seems the kmod-wanpipe package failed to install on your system. Could you please try installing it manually using the command below?thanks

apt install kmod-wanpipe-6.1.0-23

Here is the output:

root@freepbx2:~# apt install kmod-wanpipe-6.1.0-23
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
kmod-wanpipe-6.1.0-23 is already the newest version (7.0.38-2.sng12).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@freepbx2:~#