How to completely remove DAHDI and reinstall DAHDI
In this Article we are going to learn how to completely remove or uninstall the DAHDI driver and reinstall latest or same version of DAHDI in asterisk based servers. Due to server crash or planning to install the latest version of DAHDI you may want to remove the DAHDI driver then this article is for you.
What is DAHDI?
Why we need to remove/uninstall DAHDI?
If you are planning to use the latest DAHDI driver or your current DAHDI deriver crashed or creating issue then you might need to remove or reinstall the DAHDI driver.this Blog topic I will be covering the steps to remove or uninstall the DADHI driver, followed to that either reinstall same DAHDI version or installing the latest version of DAHDI.
Steps to uninstall-Reinstall DAHDI
Step 1: Stop Dahdi Service
asterisk -rx "module unload chan_dahdi.so"systemctl stop dadhi
Step 2: Uninstall DAHDI
Next you need to find the DAHDI modules drivers which are installed in the server, if multiple drivers modules are installed you need to remove all before removing the actual DAHDI driver.
Command to check the list of dahdi modules installed
lsmod | grep dahdi
you will get the below output
Now uninstall all the modules which shown in above pic
modprobe -r wctc4xxp wctdm24xxp wcte12xp xpp dahdi_transcode wcb4xxpmodprobe -r wctdm wcfxo wctdm24xxp wcte11xp wct1xxp wcte12xpmodprobe -r dahdi_voicebus wct4xxp wctdm24xxp
Finally remove the actual dahdi driver by running below command
modprobe -r dahdi
Step 3: Reinstalling or Upgrade to Latest DAHDI
Download the latest DAHDI driver from the below link.
cd /usr/src/
wget https://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
If want to download a specific version of dahdi, check out the below link for asterisk archive repository
https://downloads.asterisk.org/pub/telephony/dahdi-linux-complete
Installing the Dahdi,
Run the below command to unzip and install the dahdi
cd /usr/src/tar -xvzf dahdi-linux-complete-current.tar.gzlscd dahdi-linux-complete-2.10.1+2.10
note: replace the dahdi version 2.10.1
make clean
make allmake installmake config
Step 4: Configuring the DAHDI
If you have any digium telephony card installed or need to generate and install dahdi dummy driver ,run the below commands
dahdi_genconf -vdahdi_cfg -vsystemctl restart dahdiasterisk -rx "module load chan_dahdi.so"
Step 5: Troubleshoot- status check
Run the below commands to check the status of dahdi service
dahdi_cfg -vasterisk -rx "dahdi show status"
If still dahdi version show old version after running dahdi_cfg -v
then follow the below steps
Then run the below commands to remove the old version
rpm -qa | grep "dahdi"
rpm -qa | grep "dahdi"dahdi-linux-devel-2.4.1-70.el5dahdi-tools-2.4.1-68.el5dahdi-linux-2.4.1-70.el5dahdi-linux-kmdl-2.6.18-238.9.1.el5.goPAE-2.4.1-70.RHL5
run the below command for each package outputs to remove the particular dahdi rpms
rpm -e --nodeps "dahdi-linux-devel-2.4.1-70.el5"rpm -e --nodeps "dahdi-tools-2.4.1-68.el5"rpm -e --nodeps "dahdi-linux-2.4.1-70.el5"rpm -e --nodeps "dahdi-linux-kmdl-2.6.18-238.9.1.el5.goPAE-2.4.1-70.RHL5"
How to Reinstall or upgrade the dahdi driver to latest version