BRI 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 B100 card is detected, the output will show “Network controller”, as shown in the figure.
04:00.0 Network controller: Cologne Chip Designs GmbH ISDN network controller [HFC-PCI] (rev 02) Subsystem: Cologne Chip Designs GmbH ISDN Board Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 16 (4000ns max) Interrupt: pin A routed to IRQ 17 Region 0: I/O ports at d000 [disabled] [size=8] Region 1: Memory at f7d00000 (32-bit, non-prefetchable) [size=256] Capabilities. [40] Power Management version 1 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Kernel driver in use: vzaphfc Kernel modules: zaphfc
If one of the B200, B400 or B800 cards is detected, the output result will show “ISDN controller”, take B400 as an example.
04:02.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-4S] (rev 01) Subsystem: Cologne Chip Designs GmbH HFC-4S [OpenVox B200P / B400P] Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Interrupt: pin A routed to IRQ 16 Region 0: I/O ports at d000 [size=8] Region 1: Memory at f7d00000 (32-bit, non-prefetchable) [size=4K] Capabilities. [40] Power Management version 2 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME+ Kernel driver in use: wcb4xxp Kernel modules: wcb4xxp Take B800 as an example as shown in the figure: 04:01.0 ISDN controller: Cologne Chip Designs GmbH ISDN network Controller [HFC-8S] (rev 01) Subsystem: Cologne Chip Designs GmbH HFC-8S [OpenVox B800P] Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Interrupt: pin A routed to IRQ 19 Region 0: I/O ports at d000 [size=8] Region 1: Memory at f7d00000 (32-bit, non-prefetchable) [size=4K] Capabilities. [40] Power Management version 2 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME+ Kernel driver in use: wcb4xxp Kernel modules: wcb4xxp
If the system does not detect the card, please turn off the power, clear the slot or insert the card into another slot of the same type and 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-18-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++
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:
# modprobe dahdi
If it is a B100 card, please run the following command
# modprobe zaphfc (B100 in TE mode) // if it is NT mode then modprobe zaphfc modes=1 force_11_up=0
If it is B200/B400/B800 board please execute the following command
# modprobe wcb4xxp (B200,B400,B800) // B800 If there is NT port, then refer to the following explanation to set te_nt_override value according to the corresponding NT port and then execute modprobe wcb4xxp te_nt_override=required value
Then continue to execute the following command to generate the corresponding channel configuration file
# dahdi_genconf -vvv
# dahdi_cfg -vvvvvv
For B100 and B800 with NT port, edit /etc/modprobe.d/dahdi.conf according to the following diagram to load the parameters automatically on boot.
#vi /etc/modprobe.d/dahdi.conf
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 file to automatically load the board driver when booting
vi /etc/dahdi/modules
The following is an example of a B100 board to configure
The following shows part of the basic channel configuration file /etc/dahdi/system.conf:
# Span 1: ZTHFC1 “HFC-S PCI A ISDN card 0 [TE] ” (MASTER)
span=1,1,0,ccs,ami
# termtype: te
bchan=1-2
hardhdlc=3
echocanceller=mg2,1-2
# Global data
loadzone = us
defaultzone = us
Part of the file /etc/asterisk/dahdi-channels.conf is shown below.
; Span 1: ZTHFC1 “HFC-S PCI A ISDN card 0 [TE] ” (MASTER)
group=0,11
context=from-isdn
overlapdial=yes # must add this line
switchtype = euroisdn
signalling = bri_cpe_ptmp
channel => 1-2
context = default
group = 63
Start Asterisk
# asterisk -vvvvvvgc
If Asterisk is already running, run “asterisk -r” instead. In the CLI interface, run
“dahdi show channels” and “pri show spans”.
4.Writing a dialing scheme
Please write a dial plan in the extensions.conf file. A simple inbound and outbound plan is described in the following figure:
#vi /etc/asterisk/extensions.conf
When a call comes in from the BRI board, the sip/100 extension will ring. If the extension created is xxxx, then change it to sip/xxxx
[from-isdn] exten => _X.,1,Dial(SIP/100,,r) exten => _X.,n,Hangup()
When the extension sets the context to from-internel, the call will go out from board dahdi/1 (1 for channel 1), ${EXTEN} is the called number.
[from-internal] exten => _X.,1,Dial(dahdi/1/${EXTEN},,r) exten => _X.,n,Hangup()
After setting up the dialplan, please run “asterisk -r”, and execute the command “dialplan reload” in the CLI interface, then you can dial up the number.