DAHDI on CentOS 7

Hello, is there a good starting place for installing Asterisk and DAHDI on CentOS 7? I’m having issues, and read a lot about issues, but don’t see much in the way of solutions. Is CentOS 7 and DAHDI just a bad mix, or is there a standard way to do it?

What are the issues you re having, also did you install the kernel source ?

I have one instance of Asterisk + DAHDI + E1 trunks working on CentOS 7.
This is the install guide I made for others here follow, if that server must be reinstalled in the future:

Asterisk 13 + DAHDI + E1 on CentOS7 (JCPierri - 2018)

Tested on CentOS Linux release 7.5.1804 (Core) with Asterisk 13.23.1 - image was CentOS-7-x86_64-DVD-1804.iso

yum check-update
yum upgrade

yum install pciutils

Disable CTRL-ALT-DEL (at least the first 6 or 8 - thanks to systemd)

systemctl mask ctrl-alt-del.target

vi /etc/selinux/config (set 'SELINUX=disabled')

shutdown -r now

yum install ntp
vi /etc/ntp.conf (set your 'server x.x.x.x' accordingly)

systemctl enable ntpd
systemctl start ntpd

Remove and replace original cmake3 (build fails on it)

yum remove cmake -y

yum install wget

Find cmake sources, download and unpack it

tar -zxvf cmake-3.6.2.tar.gz
cd cmake-3.6.2
./bootstrap --prefix=/usr/local
make install
ln -s /usr/local/bin/cmake /usr/bin/

install prereqs for free g729 codec (if you want it, otherwise skip this step)

unzip bcg729-master.zip
cd bcg729-master/
cmake .
make install

install Asterisk 13 prereqs

tar -xzf asterisk-13.23.1.tar.gz
cd asterisk-13.23.1/
cd contrib/scripts/
./install_prereq install
./install_prereq install-unpackaged

Choose the right DAHDI for your boards and INSTALL JUST ONE OF THEM

for DAHDI 3.00 (TE13X and later boards)

tar -xzf dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-3.0.0+3.0.0/
make all
make install
make install-config
cp /etc/dahdi/modules.sample /etc/dahdi/modules

for DAHDI 2.11 (TE12X and earlier boards)

tar -xzf dahdi-linux-complete-2.11.1+2.11.1.tar.gz
cd dahdi-linux-complete-2.11.1+2.11.1
make all
make install
make config

installl libpri

tar -xzf libpri-current.tar.gz
cd libpri-1.6.0/
make all
make install

install openr2 (if you need MFC-R2, otherwise skip it)

tar -xzf openr2-1.3.3.tar.gz 
cd openr2-1.3.3
make install
echo "/usr/local/lib" > /etc/ld.so.conf.d/openr2.conf
ldconfig -v

Configure and install asterisk

cd asterisk-13.23.1/
./configure --with-pjproject-bundled
make menuconfig (set according to your needs)

make install
make config
make samples

install free g729 (if you want it)

tar xjf asterisk-g72x-1.4.3.tar.bz2
cd asterisk-g72x-1.4.3
./configure --with-bcg729
make install
echo > /etc/ld.so.conf.d/bcg729.conf "/usr/local/lib64"
ldconfig -v (or reboot)

Now configure …
dahdi_genconf -v --line-mode=E1

If boards are TE13x or late
echo >> /etc/modprobe.d/dahdi.conf "options wcte13xp default_linemode=e1"

If boards are TE12x there is a jumper T1/E1 that must be closed to select "E1"

Remember to edit /etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf (according to your country and needs)

1 Like

The first issue is that DAHDI won’t compile. Compiling dahdi-linux-complete/dahdi-linux-complete-current, after setting up kernel sources, gcc, etc, I get this:

dahdi-linux/include/dahdi/kernel.h:1422:1: error: conflicting types for ‘timer_setu ’

I also notice that DAHDI requires BKL, which will be a problem when I get past this.

This is very useful. Thanks. When you build DHADI 3 this way, it builds clean? Following your steps, I get this:

dahdi-linux/include/dahdi/kernel.h:1422:1: error: conflicting types for ‘timer_setu ’

I just want to say that this post continues to be helpful. I had a server that you can only install an operating system on with PXE. Unfortunately, PXE isn’t a supported installation method on the FreePBX/Schmooze install medium… so the kickstart script didn’t run. It’s been an adventure.