Using Trixbox with Openvox B200P/B400P Card
Install bristuff-0.3.0-PRE-1y-g for supporting OpenVox B200P/B400P in Trixbox
Written By James.zhu
20/07/2007
This instruction is to provide a guide for customers who are using Trixbox with Openvox B200P/B400P to run Asterisk PBX platform. There are few steps that you must follow:
1. Download openvox-bristuff-0.3.0-PRE-1y-g from: http://www.openvox.com and unzip to /usr/src
2. Run command: tar –zxvf openvox-bristuff-0.3.0-PRE-1y-g.tar.gz.
3. Check the kernel version (run: uname -a).
[root@asterisk1 zaptel]# uname -a
Linux asterisk1.local 2.6.9-34.0.2.EL #1 Fri Jul 7 19:24:57 CDT 2006 i686 i686 i386 GNU/Linux
4. It should be version 2.6.9-34.0.2.EL in trixbox2.2
5. Make sure the kernel source in /usr/src/linux-2.6. and in /lib/modules
cd /usr/src
ls
[root@asterisk1 src]# ls
asterisk-perl-0.08 openvox-bristuff-0.3.0-PRE-1y-g freepbx kernel-2.6.9-34.0.2.EL.src.rpm kernels linux-2.6 redhat sipsak-0.8.11
[root@asterisk1 src]# cd linux-2.6/
[root@asterisk1 linux-2.6]# ls
arch crypto drivers fs include init ipc kernel lib Makefile mm Module.symvers net scripts security sound usr
[root@asterisk1 linux-2.6]# cd /lib/modules/
[root@asterisk1 modules]# ls
2.6.9-34.0.2.EL 2.6.9-34.0.2.ELsmp kabi-4.0-0
[root@asterisk1 modules]# cd 2.6.9-34.0.2.EL
[root@asterisk1 2.6.9-34.0.2.EL]# ls
build kernel modules.alias modules.dep modules.inputmap modules.pcimap modules.usbmap
extra misc modules.ccwmap modules.ieee1394map modules.isapnpmap modules.symbols source
[root@asterisk1 2.6.9-34.0.2.EL]# cd build/
[root@asterisk1 build]# ls
arch crypto drivers fs include init ipc kernel lib Makefile mm Module.symvers net scripts security sound usr
[root@asterisk1 build]# pwd
/lib/modules/2.6.9-34.0.2.EL/build
[root@asterisk1 build]# cd include/
[root@asterisk1 include]# ls
acpi asm asm-generic asm-i386 config linux math-emu media net pcmcia rxrpc scsi sound video
6. If there is no kernel source, please download one with a right version. If you are using trixbox, and there is no kernels source, run command in directory /usr/src:
yum install kernel-devel-2.6.9 and create link named linux-2.6 in /usr/src
7. Run the command to compile bristuff :
cd /usr/src/openvox-bristuff-0.3.0-PRE-1y-g/
chmod 777 download.sh compile.sh install.sh
./install.sh
8. If you have problems with lock errors in compiling openvox-bristuff, you must edit the two files: zaptel-base.c and torisa.c
9. open zaptel-base.c in /usr/src/openvox-bristuff-0.3.0-PRE-1y-g/zaptel and comment line 387:
/*#ifdef DEFINE_RWLOCK
static DEFINE_RWLOCK(zone_lock);
static DEFINE_RWLOCK(chan_lock);
#else*/
static rwlock_t zone_lock = RW_LOCK_UNLOCKED;
static rwlock_t chan_lock = RW_LOCK_UNLOCKED;
/*#endif*/
10. open torisa.c in /usr/src/openvox-bristuff-0.3.0-PRE-1y-g/zaptel and comment line 136:
/*#ifdef DEFINE_RWLOCK
static DEFINE_RWLOCK(torisa);
#else*/
static rwlock_t torisa = RW_LOCK_UNLOCKED;
/*#endif*/
11. After compiling the bristuff, copy genzaptelconf from /usr/src/bristuff-0.3.0/zaptel/xpp/utils to /usr/local/sbin.
cp /usr/src/openvox-bristuff-0.3.0-PRE-1y-g/zaptel/xpp/utils/ genzaptelconf /usr/local/sbin
12. Add module qozap in /usr/sysconfig/zaptel and remove ztdummy:
vi /usr/sysconfig/zaptel
MODULES="$MODULES wctdm" # TDM400P - Modular FXS/FXO interface (1-4 ports)
#MODULES="$MODULES wcfxs" # either above or this
#MODULES="$MODULES wcusb" # S100U - Single port FXS USB Interface
#MODULES="$MODULES wcfxsusb" # either above or this
#MODULES="$MODULES torisa" # Old Tormenta1 ISA Card
#MODULES="$MODULES ztdummy" # UHCI USB Zaptel Timing Only Interface
MODULES="$MODULES qozap" # for OpenVox B200P/B400P
~
13. Uncomment modules in /etc/init.d/zaptel
MODULES="tor2 wct4xxp wct1xxp wcte11xp wcfxo wctdm qozap"
# MODULES="ztdummypll"
14. Edit zaptel file under /etc/init.d/
cd /etc/init.d
vi zaptel:
Before change:
for x in $MODULES; do
eval localARGS="$${x}_ARGS"
action "Loading ${x}:" modprobe ${x} ${ARGS} ${localARGS}
done
sleep 3
if [ ! -e /proc/zaptel/1 ]; then
echo "No functioning zap hardware found in /proc/zaptel, loading ztdummypll"
action "Loading ztdummypll:" modprobe ztdummypll
fi
action "Running ztcfg: " /usr/sbin/ztcfg
RETVAL=$?
After changed:
for x in $MODULES; do
eval localARGS="$${x}_ARGS"
# load qozap.ko for kernel-2.6, if kernel 2.4 load qozap only
if [ ${x} = qozap ]; then
action "Load qozap for openvox B200P/B400P"
insmod /usr/src/openvox-bristuff-0.3.0-PRE-1y-g/qozap/qozap.ko
fi
action "Loading ${x}:" modprobe ${x} ${ARGS} ${localARGS}
done
sleep 3
# remove ztdummy
# if [ ! -e /proc/zaptel/1 ]; then
# echo "No functioning zap hardware found in /proc/zaptel, loading ztdummypll"
# action "Loading ztdummypll:" modprobe ztdummypll
#fi
action "Running ztcfg: " /usr/sbin/ztcfg
RETVAL=$?
15 Reboot trixbox
Notices:
1) Before compiling openvox-bristuff, please stop asterisk service and zaptel
2) The trixbox version that we are using to test is trixbox 2.2 .
3) Do not make samples when you installing asterisk from openvox-bristuff, otherwise, the trixbox asterisk configs files will be overwritten.
4) You have to install extra packages to support other asterisk features such as asterisk-addons
5) Zaptel.conf and Zapata.conf under /usr/src/openvox-bristuff-0.3.0-PRE-1y-g/qozap are to support B200P/B400P.
6) If anything does not work properly, please adjust that accordingly.
[ 本帖最后由 zhulizhong 于 2007-8-4 17:35 编辑 ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
openvox的卡不错,性能相同且比digium的便宜。不过他们的tdm卡不提供软ec,digium的tdm卡有,凭序列号申请,免费一年。好在trixbox默认启用了zaptel驱动包里面带的软ec fxotune,貌似还可以。