elastix上安装调试7号信令的笔记(ss7,chan_ss7)

来源:互联网 发布:华为 高通 知乎 编辑:程序博客网 时间:2024/04/27 22:46

这是10年夏,在武汉,一次失败的尝试

我试图在elastix1.6中文版上安装chan_ss7的驱动

捣鼓了好久,木有成功

最后,james.zhu 建议 放弃elastix,改用centos,因为它纯净

 

难忘那几天几夜的奋战

难忘武汉的夏夜

难忘夏夜的蚊子....

 

尽管这是一次失败的尝试

但是学习的过程是成功的

留下了这版笔记

...

 

烟鬼正传

上菜

 

 

 

系统环境:
操作系统:centos-release-5-2.el5.centos
内核:2.6.18-92.1.22.el5
语音卡:openvox d410e 的卡还没寄到,现在先装上了是digium TE120调试用
asterisk:1.4.20
zaptel:1.4.10
ss7:chan_ss7-1.0.91 - china 24bit

(因为这个系统是用elastix的iso盘安装的,而它不支持ss7,故把asterisk和dahdi全卸了)
yum remove asterisk
yum remove dahdi

检查依赖包

rpm -q bison 
rpm -q bison-devel 
rpm -q ncurses
rpm -q ncurses-devel 
rpm -q zlib 
rpm -q zlib-devel 
rpm -q openssl 
rpm –q kernel-devel
rpm -q openssl-devel 
rpm -q gnutls-devel 
rpm -q gcc 
rpm -q gcc-c++

经查缺少下面两个,安装之

yum install bison-devel gnutls-devel

下载asterisk-1.4.20.tar.gz zaptel-1.4.10.tar.gz 和chan_ss7包

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.4.20.tar.gz
wget http://downloads.asterisk.org/pub/telephony/zaptel/releases/zaptel-1.4.10.tar.gz
从这里http://bbs.voip88.com/thread-50-1-14.html 下载chan_ss7-1.0.91 - china 24bit.zip 放到 /usr/src/下面


tar xvf asterisk-1.4.20.tar.gz
cd asterisk-1.4.20
./configure
make
make install
make samples
cd ..

tar xvf zaptel-1.4.10.tar.gz 
cd zaptel-1.4.10
./configure
make
===这里出现了错误=======================================
In file included from /usr/src/zaptel-1.4.10/kernel/xpp/xpd.h:26,
from /usr/src/zaptel-1.4.10/kernel/xpp/card_fxo.c:27:
/usr/src/zaptel-1.4.10/kernel/xpp/xdefs.h:120: error: conflicting types for bool?
include/linux/types.h:36: error: previous declaration of bool?was here
make[4]: *** [/usr/src/zaptel-1.4.10/kernel/xpp/card_fxo.o] Error 1
make[3]: *** [/usr/src/zaptel-1.4.10/kernel/xpp] Error 2
make[2]: *** [_module_/usr/src/zaptel-1.4.10/kernel] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.18-92.1.22.el5-i686'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/zaptel-1.4.10'
make: *** [all] Error 2


按照《asterisk 数字卡(PRI)常见问题以及解决办法 第一部分》参看了https://issues.asterisk.org/view.php?id=12889
打补丁
wget 'https://issues.asterisk.org/file_download.php?file_id=19260&type=bug' -O - | patch -p0
然后 
make 
通过,go on
==========================================
make install
cd ..

unzip chan_ss7-1.0.91/ -/ china/ 24bit.zip
cd chan_ss7-1.0.91/ -/ china/ 24bit
cp Makefile Makefile.save_zhangtuo_2010-7-3

vi Makefile 
============================================
修改如下
# INCLUDE may be overridden to find asterisk and zaptel includes in
# non-standard places.
INCLUDE+=-I /usr/src/zaptel-1.4.10/kernel 
#INCLUDE+=-I../source/telephony/dahdi/include
INCLUDE+=-I /usr/src/asterisk-1.4.20 
============================================
然后,保存,退出

make chan_ss7.so
报错如下
make: *** No rule to make target `../asterisk-1.4.18/include/asterisk/channel.h', needed by `chan_ss7.o'. Stop.

然后,我就
cp .depend .depend.save_zhangtuo_2010-7-3
rm -rvf .depend
make chan_ss7.so 
通过

cp ss7.conf /etc/asterisk/
cp chan_ss7.so /usr/lib/asterisk/modules/ (这步不用做,因为刚才make chan_ss7.so的时候已经cp过去了)

然后开始配置 

cp /etc/zaptel.conf /etc/zaptel.conf.save_zhangtuo_2010-7-3

vi /etc/zaptel.conf 
如下
========================================================
[root@bogon etc]# vi zaptel.conf
# Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1"
span=1,1,1,ccs,hdb3
# termtype: te
bchan=1-15,17-31
#dchan=16
# Span 2: TE4/0/2 "T4XXP (PCI) Card 0 Span 2"
span=2,2,1,ccs,hdb3
# termtype: te
bchan=32-46,48-62
#dchan=47
# Span 3: TE4/0/3 "T4XXP (PCI) Card 0 Span 3"
span=3,3,1,ccs,hdb3
# termtype: te
bchan=63-77,79-93
#dchan=78
# Span 4: TE4/0/4 "T4XXP (PCI) Card 0 Span 4"
span=4,4,1,ccs,hdb3
# termtype: te
bchan=94-108,110-124
#dchan=109
# Global data
loadzone = us
defaultzone = us
========================================================
上面为啥还是us?为啥不是cn??

vi /etc/ss7.conf 
如下
[linkset-ls1]
enabled => yes
enable_st => yes
use_connect => no
hunting_policy => even_mru
context => ss7_call
language => en
subservice => auto
variant => CHINA
[link-l1]
linkset => ls1
channels => 1-15,17-31
schannel => 16
firstcic => 0
enabled => yes

echocancel => no
echocan_train => 350
echocan_taps => 128

[link-l2]
linkset => ls1
channels => 1-31
schannel =>
firstcic => 32
enabled => yes

[link-l3]
linkset => ls1
channels => 1-31
schannel =>
firstcic => 64
enabled => yes

[link-l4]
linkset => ls1
channels => 1-31
schannel =>
firstcic => 96
enabled => yes

[host-bangian]
enabled => yes
opc => 2b969c
dpc => ls1:0x298922
links => l1:1,l2:2,l3:3,l4:4




========================
[root@bangian asterisk]# ztcfg -vvvvv
Notice: Configuration file is /etc/zaptel.conf
line 17: Unable to read Zaptel version information.

Zaptel Version: Unknown
Echo Canceller: Unknown
Configuration
======================

SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: Clear channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
Channel 05: Clear channel (Default) (Slaves: 05)
Channel 06: Clear channel (Default) (Slaves: 06)
Channel 07: Clear channel (Default) (Slaves: 07)
Channel 08: Clear channel (Default) (Slaves: 08)
Channel 09: Clear channel (Default) (Slaves: 09)
Channel 10: Clear channel (Default) (Slaves: 10)
Channel 11: Clear channel (Default) (Slaves: 11)
Channel 12: Clear channel (Default) (Slaves: 12)
Channel 13: Clear channel (Default) (Slaves: 13)
Channel 14: Clear channel (Default) (Slaves: 14)
Channel 15: Clear channel (Default) (Slaves: 15)
Channel 16: Clear channel (Default) (Slaves: 16)
Channel 17: Clear channel (Default) (Slaves: 17)
Channel 18: Clear channel (Default) (Slaves: 18)
Channel 19: Clear channel (Default) (Slaves: 19)
Channel 20: Clear channel (Default) (Slaves: 20)
Channel 21: Clear channel (Default) (Slaves: 21)
Channel 22: Clear channel (Default) (Slaves: 22)
Channel 23: Clear channel (Default) (Slaves: 23)
Channel 24: Clear channel (Default) (Slaves: 24)
Channel 25: Clear channel (Default) (Slaves: 25)
Channel 26: Clear channel (Default) (Slaves: 26)
Channel 27: Clear channel (Default) (Slaves: 27)
Channel 28: Clear channel (Default) (Slaves: 28)
Channel 29: Clear channel (Default) (Slaves: 29)
Channel 30: Clear channel (Default) (Slaves: 30)
Channel 31: Clear channel (Default) (Slaves: 31)

31 channels to configure.

ZT_SPANCONFIG failed on span 1: Inappropriate ioctl for device (25)



http://wiki.openvox.cn/index.php/Troubleshooting_of_PRI_cards#Q2.2C_ZT_SPANCONFIG_failed_on_span_1:_Invalid_argument_.2822.29
rpm -q mISDN
yum remove mISDN


cd /etc/asterisk
cp zapata.conf zapata.conf.save_zhangtuo_2010-7-3
cat /dev/null > zapata.conf




======================
[Jul 3 09:41:43] ERROR[3794] transport.c: Unable to open /dev/zap/channel: No such file or directory.
原因在于没有载入zaptel模块
lsmod 里有 dahdi 和wcte12xp
另外发现 有/dev/dahdi

所以 
ln -s /dev/dahdi /dev/zap
======================

 

 

就这些,后来往下搞不下去了

寂寞行路难呀

james.zhu 建议放弃elastix,直接用centos

 

 

原创粉丝点击