asterisk dahdi r2资料搜集

本文介绍了如何在Asterisk中使用Dahdi通道配置R2协议,包括修改`system.conf`和`chan_dahdi.conf`文件,设置mfcr2参数,以及启用日志等,以支持不同国家的R2变种,如中国和巴西。此外,还提供了相关资源链接供深入研究。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

openr2-1.3.0.tar.gz

4 - libopenr2
# ./configure --libdir=/usr/lib ; make ; make install


在使用dahdi通道呼出的时候,可以在Dial中对呼出所使用的通道进行指定选择。以下面的例子来说明:

场景说明:数字板卡单E1,使用pri信令,1-31通道分配的group为1,拨号规划使用前缀9呼出。
配置文件:
chan_dahdi.conf
点击(此处)折叠或打开
context=from-insides
group=1
channel=>1-15,17-31


extensions.conf中:
点击(此处)折叠或打开
[from-insides]
exten => _9.,1,Dial(Dahdi/g1/${EXTEN:1},40)

exten => _9.,2,Hangup


一个是/etc/dahdi/system.conf。修改为如下(我一个E1卡。用一个口):
 
span=1,1,0,cas,hdb3
# termtype: te
cas=1-15:1101
cas=17-31:1101
dchan=16
#echocanceller=mg2,1-15,17-31
# Global data
loadzone  = cn
defaultzone     = cn

Note that Indonesia has two protocols, which they call R2. One is a real digital R2 variant. The
other is more like the old analogue R2 systems. Only the real digital R2 variant is currently
supported.

然后将 /etc/asterisk/dahdi-channels.conf 追加到 /etc/asterisk/chan_dahdi.conf里面



# echo “#include dahdi-channels.conf”   >>  /etc/asterisk/chan_dahdi.conf  
或者
用 vim  将 “#include dahdi-channels.conf”  添加到文件 /etc/asterisk/chan_dahdi.conf  的末尾

=========================




\*CLI> dahdi show channels
       Chan Extension  Context     Language   MOH Interpret     Blocked  State     
 *CLI>

================================

-asterisk –rx ‘mfcr2 show channels’

====================================

mfcr2 set loglevel debug

==============================

dahdi system.conf  


 loadzone=us
 defaultzone=us
 #Sangoma A101 port 1 [slot:8 bus:1 span:1] 
 span=1,1,0,cas,hdb3
 cas=1-10:1101  



  chan_dahdi.conf  

 echocancel=yes
 group=0
 context=e1-incoming
 signalling =mfcr2
 mfcr2_variant=mx
 mfcr2_get_ani_first=no
 mfcr2_max_ani=10
 mfcr2_max_dnis=7
 mfcr2_category=national_subscriber
 mfcr2_logdir=span1
 mfcr2_call_files=yes
 mfcr2_logging=all
 mfcr2_mfback_timeout=-1
 mfcr2_metering_pulse_timeout=-1
 mfcr2_allow_collect_calls=no
 mfcr2_double_answer=no
 mfcr2_forced_release=no
 mfcr2_charge_calls=yes
 channel => 1-10

=============================
A complete protocol variant code is as follows:
"<country code>,<maximum ANI digits>,<DNIS digits>;"


for example:
"cn,20,7"


means use China MFC/R2. Expect up to 20 ANI (caller number) digits. Expect
7 DNIS (dialed number) digits. Most variants can handle less than the
specified number of DNIS digits, but some only handle this through fairly
long timeouts. Getting the DNIS length right can be important for good
performance.

http://www.moythreads.com/unicall/mfcr2-asterisk-unicall-0.2-english.pdf

http://www.voip-info.org/wiki/view/Asterisk+MFC+R2


http://bbs.voip88.com/thread-6003-1-24.html

=================

# cat system.conf
loadzone = br
defaultzone =br


span=1,1,0,cas,hdb3
cas=1-15:1101
cas=17-31:1101
dchan=16




/etc/asterisk# cat chan_dahdi.conf
[trunkgroups]


[channels]
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes


signalling=mfcr2
mfcr2_variant=br
mfcr2_get_ani_first=no
mfcr2_max_ani=20
mfcr2_max_dnis=20
mfcr2_category=national_subscriber
mfcr2_logdir=span1
mfcr2_logging=all


context=in-e1
group=0
callgroup=0
pickupgroup=0
channel => 1-15
channel => 17-31

====================

more details, please refer these:
http://www.libopenr2.org/
source: http://blog.alexandrealencar.net/2008/05/asterisk-com-mfcr2-openr2.html
email list: http://lists.digium.com/pipermail/asterisk-r2/
http://code.google.com/p/openr2/downloads/list


================

Variant Code Country:
AR Argentina
BR Brazil
CN China // 支持中国还没有做完整的测试,这是官方的说法。
CZ Czech Republic
CO Colombia
EC Ecuador
ITU International Telecommunication Union
MX Mexico
PH Philippines
VE Venezuela



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值