E1 Card Software Installation Manual_Debion
Installation Environment
Debian 11.6.0
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 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:
https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz
The DAHDI, Asterisk and Libpri are usually downloaded and extracted 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
Dependency package installation.
apt-get update apt-get install build-essential apt-get install git apt-get install linux-headers-`uname -r` Install dahdi
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
Install libpri
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
Compile problems
Solution, comment out the -wall line in the libss7-1.6.0/Makefile file
Install asterisk
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
Dependency package installation
contrib/scripts/install_prereq install . /configure make make install make samples
2.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 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 if 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 when booting
#cp /etc/dahdi/modules.sample /etc/dahdi/modules
#chmod 0777 /etc/dahdi/modules
#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 from the file system.conf and load the parameters into the hardware. A portion of the output from the command run is shown below.
Start Asterisk
# 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.
3.Writing the dial plan
Please write the dial plan in the extensions.conf file. The following figure shows a simple inbound and outbound plan.
# vi /etc/asterisk/extensions.conf
When a call comes in from the E1 board, the cc-welcome voice is 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.