E1 Card Software Installation Manual_Rockey
Installation Environment
System:Rockey Linux (Centos 8)
Dahdi-3.2.0
Asterisk-20
Libpri 1.6.0
1.Hardware Detection
lspci -vvvvvv
Check whether the system recognizes the corresponding board by the above command output content.
If the D130 board is detected, the following will be displayed in the output:
04:00.0 Network controller: OpenVox Communication Co. Ltd. D130P/D130E Single-port E1/T1 card (3rd GEN) (rev 15) Subsystem: Device 0005:0000 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 32 (8000ns min, 32000ns max), Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 17 Region 0: Memory at f7d00000 (32-bit, non-prefetchable) [size=32K] Kernel driver in use: opvxd115 Kernel modules: opvxd115
If one of the D230, D430, D830 or D1610 cards is detected, the output will show the words Network controller: Digium, Inc.
The D430 and D830 are listed as follows:
D430 board 04:01.0 Network controller: Digium, Inc. Wildcard TE420 quad-span T1/E1/J1 card 3.3V (PCI-Express) (5th gen) (rev 15) Subsystem: Device 0005:0000 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 64 (8000ns min, 32000ns max) Interrupt: pin A routed to IRQ 19 Region 0: Memory at c8400000 (32-bit, non-prefetchable) [size=32K] Kernel driver in use: wct4xxp Kernel modules: wct4xxp D830 board 04:00.0 Network controller: Digium, Inc. Wildcard TE820 octal-span T1/E1/J1 card 3.3V (PCI-Express) (rev 15) Subsystem: Device 0005:0000 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 32 (8000ns min, 32000ns max), Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 17 Region 0: Memory at f7d00000 (32-bit, non-prefetchable) [size=64K] Kernel driver in use: wct4xxp Kernel modules: wct4xxp
If the system does not detect the card, please turn off the power, clear the slot or insert the card into another slot to detect it again.
Download the DAHDI source package from the official OpenVox website
https://www.openvox.cn/pub/drivers/dahdi-linux-complete/openvox_dahdi-linux-complete-current.tar.gz
Get Libpri from the Digium website.
https://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz
Get Asterisk from the Digium website.
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
Download and unpack DAHDI, Asterisk and Libpri, usually by running the following command in the directory /usr/src/:
wget https://www.openvox.cn/pub/drivers/dahdi-linux-complete/openvox_dahdi-linux-complete-current.tar.gz wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz wget https://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz tar -xvzf openvox_dahdi-linux-complete-current.tar.gz tar -xvzf asterisk-20-current.tar.gz tar -xvzf libpri-current.tar.gz
2.Installing
Dependency package installation
Before installing DAHDI, please check if all the dependencies are installed successfully, if the dependencies are not installed, the subsequent software installation will not proceed smoothly.
dnf -y install epel-release dnf group -y install "Development Tools" dnf -y install git wget vim net-tools sqlite-devel psmisc bison ncurses ncurses-devel libtermcap-devel newt-devel libxml2-devel libtiff-devel gtk2-devel libtool libuuid-devel subversion initscripts kernel-devel kernel-devel-$(uname -r) crontabs cronie-anacron libedit libedit-devel zlib zlib-devel openssl openssl-devel gnutls-devel gcc gcc-c++
If no matching kernel-devel is found in the update source, then you will need to download the matching RPM package and install it manually, or upgrade to the latest stable kernel version by doing the following:
# dnf install kernel kernel-devel
After installation, reboot the system to apply the new kernel and continue with the rest of the operations on the new kernel.
During the above dependency package detection process, if the dependency package is already installed, the system will indicate that it is installed and will not continue to install this package, and the user can run the next command to install other packages;
If it is not installed, it will be installed automatically until the system prompts for a successful installation.
Dahdi Installation
Convert the path to the dahdi-linux-complete-XX source package directory (XX stands for DAHDI version) and run the following command to install DAHDI:
cd /usr/src/dahdi-linux-complete-XX make make install make config systemctl enable dahdi
Libpri installation
Convert the path to the directory where the libpri source package is located and run the following command to install Libpri:
cd libpri-XX make make install
The compiler encountered the following problem
Solution, comment out the -Wall line in the libpri-1.6.0/Makefile file
Asterisk installation
Convert the path to the asterisk source package directory (XX stands for asterisk version) and run the following command to install asterisk:
cd asterisk-20.xx contrib/scripts/install_prereq install . /configure --libdir=/usr/lib64 --with-jansson-bundled=yes make make install make samples systemctl enable asterisk
3.Configure
Load the driver
After compiling, please run the following command to load the driver according to the corresponding board model:
The corresponding driver for D130 card is opvxd115, D230,D430,D830,D1630 and the corresponding driver is wct4xxp
# modprobe dahdi
If it is a D130 card, please execute the following command
# modprobe opvxd115
If it is a D230/D430/D830/D1630 card, please execute the following command
# modprobe wct4xxp
Then continue to execute the following command to generate the corresponding channel configuration file
# dahdi_genconf -vvv
Under normal circumstances, after executing the command “dahdi_genconf”, the system will automatically generate the files /etc/dahdi/system.conf and etc/asterisk/dahdi-channels.conf. Check whether the generated configuration files meet your requirements, or you can modify the relevant parameters manually. It is important to make sure that dahdi-channels.conf is included in chan_dahdi.conf, if not, please run the command .
# echo “#include dahdi-channels.conf” >> /etc/asterisk/chan_dahdi.conf
Add the corresponding board driver to /etc/dahdi/modules to automatically load the board driver on boot
#vi /etc/dahdi/modules
The following is an example of a D130 board to configure
The following shows part of the basic channel configuration file /etc/dahdi/system.conf:
Comment out the echocanceller line
Determine if crc4 checksum needs to be enabled
If the E1 operator does not have crc4 checksum enabled, you need to remove crc4. Change it to
span=1,1,0,ccs,hdb3
In China, operators usually do not turn on crc4.
A part of the file /etc/asterisk/dahdi-channels.conf is shown in the figure:
After confirming the system.conf and dahdi-channels.conf files, execute the following command.
# dahdi_cfg -vvvvvv
This command will read and load the parameters from the file system.conf into the hardware. A portion of the output from the command run is shown below.
# asterisk -vvvvvvgc
If Asterisk is already running, run “asterisk -r” instead. In the CLI interface, run:
If all channels are displayed correctly, DAHDI has been successfully loaded into Asterisk, so please set up the dial plan next.
4.Write the dial plan
Please write the dial plan in the extensions.conf file. The following figure describes a simple inbound and outbound plan:
# vi /etc/asterisk/extensions.conf
When a call comes in from the E1 board, the cc-welcome voice will be played.
[from-pstn] exten => _X.,1,Answer() ;answer the inbound call exten => _X.,n,Playback(cc_welcome) exten => _X.,n,Hangup()
When the extension sets the context to from-internel, the call will go out from the E1 board dahdi/g0, ${EXTEN} is the called number.
[from-internal] exten => _X.,1,Dial(dahdi/g0/${EXTEN}) exten => _X.,n,Hangup()
After setting up the dialplan, please run “asterisk -r”, and execute the command “dialplan reload” in the CLI interface, and you will be able to dial.