查看openvox语音卡
[root@testTG ~]# lspci -vvvv| grep Digium
07:00.0 Network controller: Digium, Inc. Device 1210 (rev 15)
09:00.0 Network controller: Digium, Inc. Device 1410 (rev 15)
查看软件包
rpm -qa| grep bison
rpm -qa| grep bison-devel
yum install bison-devel
rpm -qa| grep kernel-devel
rpm -qa| grep gcc
rpm -qa| grep make
rpm -qa| grep libxml2
rpm -qa| grep perl
rpm -qa| grep zlib
rpm -qa| grep ncurses
rpm -qa| grep openssl
rpm -qa| grep gnutls-devel
rpm -qa| grep gtk2
rpm -qa| grep mysql-devel
rpm -qa| grep net-snmp
rpm -qa| grep unixODBC
rpm -qa| grep freetds
rpm -qa| grep libtool
yum install freetds freetds-devel
如果未安装
yum install net-snmp-devel unixODBC unixODBC-devel
安装libpri
tar zxvf libpri-1.4-current.tar.gz
cd libpri-1.4.12/
make
make install
安装dahdi
tar zxvf dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-2.6.1+2.6.1/
make all
make install
make config
安装asterisk
tar zxvf asterisk-1.8-current.tar.gz
cd asterisk-1.8.16.0/
make clean
./configure
make update
make
make install
make samples
安装chan_ss7
tar zxvf chan_ss7-current.tar.gz
cd trunk/
make
cp chan_ss7.so /usr/lib/asterisk/modules/
将723和729编码模块拷贝到asterisk模块目录
cp ../codec_g723.so /usr/lib/asterisk/modules/
cp ../codec_g729.so /usr/lib/asterisk/modules/
[root@testTG trunk]# ll /usr/lib/asterisk/modules/codec_g723.so
-rw-r--r--. 1 root root 448325 2月 5 00:56 /usr/lib/asterisk/modules/codec_g723.so
[root@testTG trunk]# ll /usr/lib/asterisk/modules/codec_g729.so
-rw-r--r--. 1 root root 616606 2月 5 00:56 /usr/lib/asterisk/modules/codec_g729.so
加载驱动模块
# modprobe dahdi
# modprobewct4xxp
生成dahdi配置文件
# dahdi_genconf
扫描通道
#dahdi_scan
[1]
active=yes
alarms=UNCONFIGURED
description=T2XXP (PCI) Card 0 Span 1
name=TE2/0/1
manufacturer=Digium
devicetype=Wildcard TE210P (5th Gen) (VPMOCT064)
location=PCI Bus 07 Slot 01
basechan=1
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=
framing=CAS
[2]
active=yes
alarms=UNCONFIGURED
description=T2XXP (PCI) Card 0 Span 2
name=TE2/0/2
manufacturer=Digium
devicetype=Wildcard TE210P (5th Gen) (VPMOCT064)
location=PCI Bus 07 Slot 01
basechan=32
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=
framing=CAS
[3]
active=yes
alarms=UNCONFIGURED
description=T4XXP (PCI) Card 1 Span 1
name=TE4/1/1
manufacturer=Digium
devicetype=Wildcard TE410P (5th Gen) (VPMOCT128)
location=PCI Bus 09 Slot 01
basechan=63
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=
framing=CAS
[4]
active=yes
alarms=UNCONFIGURED
description=T4XXP (PCI) Card 1 Span 2
name=TE4/1/2
manufacturer=Digium
devicetype=Wildcard TE410P (5th Gen) (VPMOCT128)
location=PCI Bus 09 Slot 01
basechan=94
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=
framing=CAS
[5]
active=yes
alarms=UNCONFIGURED
description=T4XXP (PCI) Card 1 Span 3
name=TE4/1/3
manufacturer=Digium
devicetype=Wildcard TE410P (5th Gen) (VPMOCT128)
location=PCI Bus 09 Slot 01
basechan=125
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=
framing=CAS
[6]
active=yes
alarms=UNCONFIGURED
description=T4XXP (PCI) Card 1 Span 4
name=TE4/1/4
manufacturer=Digium
devicetype=Wildcard TE410P (5th Gen) (VPMOCT128)
location=PCI Bus 09 Slot 01
basechan=156
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=
framing=CAS
[root@testTG asterisk]#
查看 板卡 特有终端
[root@testTG asterisk]# dmesg | grep VPM
VPM450: echo cancellation for 64 channels
wct4xxp 0000:07:00.0: VPM450: hardware DTMF disabled.
wct4xxp 0000:07:00.0: VPM450: Present and operational servicing 2 span(s)
VPM450: echo cancellation for 128 channels
wct4xxp 0000:09:00.0: VPM450: Present and operational servicing 4 span(s)
配置system.conf
---------------system.conf----------------
[root@testTG ~]# cat /etc/dahdi/system.conf
# Autogenerated by /usr/sbin/dahdi_genconf on Tue Feb 5 01:03:37 2013
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER)
span=1,1,0,ccs,hdb3,crc4
# termtype: te
bchan=1-31
#dchan=16
#echocanceller=mg2,1-15,17-31
# Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
span=2,2,0,ccs,hdb3,crc4
# termtype: te
bchan=32-62
#dchan=47
#echocanceller=mg2,32-46,48-62
# Span 3: TE4/1/1 "T4XXP (PCI) Card 1 Span 1"
span=3,3,0,ccs,hdb3,crc4
# termtype: te
bchan=63-93
#dchan=78
#echocanceller=mg2,63-77,79-93
# Span 4: TE4/1/2 "T4XXP (PCI) Card 1 Span 2"
span=4,4,0,ccs,hdb3,crc4
# termtype: te
bchan=94-124
#dchan=109
#echocanceller=mg2,94-108,110-124
# Span 5: TE4/1/3 "T4XXP (PCI) Card 1 Span 3"
span=5,5,0,ccs,hdb3,crc4
# termtype: te
bchan=125-155
#dchan=140
#echocanceller=mg2,125-139,141-155
# Span 6: TE4/1/4 "T4XXP (PCI) Card 1 Span 4"
span=6,6,0,ccs,hdb3,crc4
# termtype: te
bchan=156-186
#dchan=171
#echocanceller=mg2,156-170,172-186
# Global data
loadzone = cn
defaultzone = cn
------------------------------------------------------------------------------------
*关于crc4校验,有些上级局中继未开启,如果本端开启,有时回导致通话有电流声等杂音
查看板卡型号
[root@testTG asterisk]# dahdi_hardware
pci:0000:07:00.0 wct4xxp+ d161:1210 Wildcard TE210P (5th Gen)
pci:0000:09:00.0 wct4xxp+ d161:1410 Wildcard TE410P (5th Gen)
# dahdi_cfg –vvvvvv
这条指令将从文件system.conf中读取并加载参数到硬件中。
[root@testTG ~]# cat /etc/asterisk/ss7.conf
----------------------------------------------------------------------
[linkset-T2E]
enabled => yes
enable_st => no
use_connect => yes
hunting_policy => even_mru
context => from_T2E
language => cn
t35 => 15000,timeout
subservice => auto
variant => CHINA
[linkset-T4E]
enabled => yes
enable_st => no
use_connect => yes
hunting_policy => even_mru
context => from_T4E
language => cn
;sltm => no
t35 => 15000,timeout
subservice => auto
variant => CHINA
[link-l1]
linkset => T2E
channels => 1-15,17-31
schannel => 16
firstcic => 1
enabled => yes
[link-l2]
linkset => T4E
channels => 1-15,17-31
schannel => 16
firstcic => 1
enabled => yes
[link-l3]
linkset => T2E
channels => 1-15,17-31
schannel => 16
firstcic => 33
enabled => yes
[link-l4]
linkset => T4E
channels => 1-15,17-31
schannel => 16
firstcic => 33
enabled => yes
[host-testTG.host.cn]
if-1 => 192.168.1.1
enabled => yes
default_linkset => T2E
opc => 0xa01
dpc => T2E:0xa02,T4E:0xa03
links => l1:1,l2:3,l3:4,l4:2
-----------------------------------------------------------------------
[root@testTG ~]# cat /etc/asterisk/extensions.conf
----------------------------------------------------------------------
[general]
static=yes
writeprotect=no
clearglobalvars=no
;Define a recording Macro
[macro-recording]
exten =>s,1,Set(CALLFILENAME=${STRFTIME(${EPOCH},UTC-8,%Y-%m-%d-%H-%M-%S)}-${CALLERID(num)})
exten =>s,n,Set(PATH=/var/spool/asterisk/monitor/${STRFTIME(${EPOCH},UTC-8,%Y-%m-%d)}/${CALLERID(num)})
exten =>s,n,MixMonitor(${PATH}/${CALLFILENAME}.wav,W(4))
[from_T2E]
exten => 1001,1,Macro(recording)
exten => 1001,n,Set(CDR(userfield)=T2E)
exten => 1001,n,Dial(SIP/${EXTEN:0})
exten => 1001,n,Hangup
[from_T4E]
exten => 1001,1,Macro(recording)
exten => 1001,n,Set(CDR(userfield)=T4E)
exten => 1001,n,Dial(SIP/${EXTEN:0})
exten => 1001,n,Hangup
[from_SIP]
exten => 1002,1,Macro(recording)
exten => 1002,n,Set(CDR(userfield)=SIP)
exten => 1002,n,Dial(SS7/T2E/${EXTEN:0})
exten => 1002,n,Hangup
exten => 1003,1,Macro(recording)
exten => 1003,n,Set(CDR(userfield)=SIP)
exten => 1003,n,Dial(SS7/T4E/${EXTEN:0})
exten => 1003,n,Hangup
[root@testTG ~]# cat /etc/asterisk/sip.conf
-----------------------------------
[general]
context=default
allowoverlap=no
allowguest=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
language=cn
callevents=yes
jbenable=yes
[1001]
type=friend
secret=1001
qualify=yes
nat=no
host=dynamic
canreinvite=no
context=from_SIP
浙公网安备 33010602011771号