How to Add DAHDI/Wanpipe support to FreePBX V17

How to Add DAHDI/Wanpipe support to FreePBX V17

Overview

This guide explains how to add DAHDI/Wanpipe support to FreePBX 17 running on Debian 12. It covers both fresh installations and adding DAHDI support to an existing FreePBX 17 setup.

Installing DAHDI Support on FreePBX 17

By default, the installation script does not install the DAHDI/WANPIPE drivers, so you need to use the dahdi option to install the DAHDI/WANPIPE drivers.

Fresh Installation with DAHDI Support

To install FreePBX 17 with DAHDI support, run the following command:

bash /tmp/sng_freepbx_debian_install.sh --dahdi

Adding DAHDI Support to an Existing FreePBX 17 Installation

If you are adding DAHDI support to an already running FreePBX 17 installation, use:

bash /tmp/sng_freepbx_debian_install.sh --dahdi-only

 

Downgrading the Kernel Version

If you are planning to install FreePBX 17 with DAHDI support or are already running FreePBX 17 on Debian 12 and plan to use DAHDI, you must ensure that your system is using a DAHDI-supported kernel version. The latest supported version at this time is 6.1.0-32. If your system has a newer kernel (e.g., 6.1.0-33), you will need to downgrade to ensure compatibility with DAHDI and Wanpipe.

1. Check the Current Kernel Version Running on Your System

To verify your current kernel version, run:

hostnamectl | grep Kernel

If the output shows a version higher than the supported one, you need to downgrade to the supported version.

2. List Available Kernel Versions

Sometimes, the latest supported kernel may not be available in the package repository. Run the following command to check if the supported kernel version is available.

ARCH=$(dpkg --print-architecture) apt-cache search linux-image | grep -E "linux-image-6\.[0-9]+\.[0-9]+-[0-9]+-$ARCH"

If you do not see the latest supported version, run the following command to see lower supported versions:

apt-cache search dahdi | grep -E "^dahdi-linux-kmod-[0-9]" | awk '{print $1}' | awk -F'-' '{print $4"-"$5}' | sort -rV

3. Install the Supported Kernel Version

Install the supported kernel using the following command:

apt install linux-image-<version>

4. Set the Downgraded Kernel as Default

Once installed, you need to update the GRUB bootloader to ensure that the downgraded kernel is used by default.

List Installed Kernels

Run the following command to list all installed kernel versions:

grep "menuentry " /boot/grub/grub.cfg

The output will display available boot options. For example:

menuentry 'Debian GNU/Linux' ... menuentry 'Debian GNU/Linux, with Linux 6.1.0-33-amd64' ... menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64' ... menuentry 'Debian GNU/Linux, with Linux 6.1.0-28-amd64' ...

Understanding the GRUB Indexing

  • The main entry Debian GNU/Linux is at index 0.

  • The Advanced options submenu is at index 1.

  • Inside Advanced options, the first kernel is at 1>0, the second at 1>1, and so on.

  • To boot into 6.1.0-32-amd64, determine its position inside the Advanced options submenu. For example:

    • 6.1.0-33-amd641>0

    • 6.1.0-32-amd641>1

    • 6.1.0-28-amd641>2

Modify GRUB Configuration

Edit the GRUB configuration file:

vim /etc/default/grub

Option 1: Using GRUB Indexing.

Find the line:GRUB_DEFAULT=0 to and replace it with: GRUB_DEFAULT="1>1"

Option 2: Using the Exact Kernel Name.

If you prefer to specify the exact kernel name instead of an index, use the full menu entry name as shown in the grep "menuentry " output:

GRUB_DEFAULT="Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 6.1.0-32-amd64"

Update GRUB

Update GRUB with the following command:

update-grub

5. Reboot and Verify Kernel Version

Reboot your system:

After the system reboots, confirm that the correct kernel version is in use.

uname -r

 

DAHDI CARD Configuration

Refer to following document for the DAHDI card configurations.

https://sangomakb.atlassian.net/wiki/spaces/PG/pages/25952375/PBX+GUI+-+DAHDI+Configs