免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 919 | 回复: 0
打印 上一主题 下一主题

new callerid patch for wctdm.c and opvxa1200.c [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-16 15:25 |只看该作者 |倒序浏览

                hello, all of users:
we have updated the callerid patch for wctdm.c and opvxa1200.c for both
of zaptel and dahdi, I create a new thread to guild user how to use the
patch. this new thread will let user know how to use the openvox new
patched to detect callerid. please make sure few things to start the
callerid patch:
1) you MUST subscribe callerid from your provider.
2) you MUST know the format of callerid(dtmf or fsk). you can ask your provider for that info, if you not know that.
3) this patch ONLY supports callerid with DTMF format.
4) you MUST know how the callerid is sent(beforeing first ring, or after first ring). You can hear that.
5) you SHOULD know how to compile zaptel with wctdm.c and opvxa1200.c and asterisk.
here, we use opvxa1200, zaptel-1.4.10 with asterisk-1.4.21 to demo the example. please go to the few these steps:
1) download the opvxa1200.c
http://www.openvox.cn/viewvc/zaptel/trunk/1.4/
from that directory, if you use wctdm.c, you can downlaod wctdm.c
2) copy the opvxa1200.c to asterisk-1.4.10/kernel compiling zaptel in
this way for A1200P/A800P, if you use wctdm.c, jump to step C).
A) add opvxa1200 in topmodule(TOPDIR_MODULES:=) in Makefile
B) add opvxa1200.o: kernel/wctdm.h kernel/zaptel.h find the line as below:
ztprovision.o: kernel/zaptel.h
ztmonitor.o: kernel/zaptel.h
opvxa1200.o: kernel/zaptel.h kernel/wctdm.h
ztspeed: CFLAGS=
C) If it is wctdm.c, you replace original wctdm.c(under zaptel-1.4.XX/kernel) with the newpatched wctdm.c.
D) run command: make, make install. after rebooting it, you can edit the zapata.conf and load the module by:
1) you MUST change the two parameters in zapata.conf to this:
cidsignalling=dtmf // MUST BE dtmf
cidstart=polarity // MUST BE polarity
2) modprobe zaptel // load zaptel driver
3) modprobe opvxa1200 cidbeforering=1 opermode=CHINA ; if loading a400p, please change to wctdm cidbeforering=1
here, users must to know how the callerid has been sent:
3.1)if before first ring, no polarity sending, send cid,then first ring: please load:
[color="Red"]modprobe opvxa1200 cidbeforering=1 opermode=CHINA // opemode=CHINA load with CHINA format
3.2)if after first ring then send cid, you have to set:
[color="Red"]modprobe opvxa1200 cidbeforering=1 cidbuflen=10 fixedtimepolarity =100 opermode=CHINA
NOTE: you MSUT load the driver with your COUNTRY. please change the
parameters in zaptel.conf and indication.conf to your COUNTRY.
4) ztcfg -vvvvvvvvv
5) open your asterisk debug to check the functionality.
6) modify the chan_zap.c in asterisk, change res to 4000 or higher:
=============ss_thread method=====================
if (res frametype == AST_FRAME_DTMF)
{ dtmfbuf[i++] = f->subclass;
ast_log(LOG_DEBUG, "CID got digit '%c'\n", f->subclass);
[color="Red"]res = 4000; // at line 6156, change 2000 to 4000
}
ast_frfree(f);
if (chan->_state == AST_STATE_RING
|| chan->_state == AST_STATE_RINGING) break; /* Got ring */ }
=================================
7) recompile your asterisk: make and make install
8) start asterisk: asterisk -vvvvvvvvvvgc -d
I do not give the the info for dahdi yet, User can download the dahdi patch from here:
http://www.openvox.cn/viewvc/dahdi/trunk/
this patch works for most of cases,you MAY adjust the load parameters
to fit your environment. therefore, you have to take more tests. if you
have any problem, please leave here.
Regards!
james.zhu
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/28461/showart_1966014.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP