被叫(callee)怎么使用applicatemap功能
来源:互联网 发布:汽车维修管理系统源码 编辑:程序博客网 时间:2024/05/01 04:59
刚开始学习使用applicationmap功能时,根据features.conf中的说明,针对playmonkey的例子做了如下的配置:
features.conf
testfeature => *9,self/callee,Playback,tt-monkeys
sip.conf
canreinvite=no
[2001]
type=friend
secret=0000
context=testfeature
host=dynamic
dtmfmode=rfc2833
compensate=yes
[2002]
type=friend
secret=0000
context=testfeature
host=dynamic
dtmfmode=rfc2833
compensate=yes
extensions.conf
[testfeature]
exten => _X.,1,Ringing
exten => _X.,n,Set(DYNAMIC_FEATURES=testfeature)
exten => _X.,n,Dial(SIP/${EXTEN},60, tT)
测试中发现在2001作为主叫呼叫2002的过程中,被叫2002按*9不能正常的播放录音给2001.
在google搜索此类问题,在https://issues.asterisk.org/view.php?id=14657发现了对此问题的描述:
Check the DYNAMIC_FEATURES of both the chan and peer when interpreting DTMF.
Dynamic features defined in the applicationmap section of features.conf allow
one to specify whether the caller, callee, or both have the ability to use the
feature. The documentation in the features.conf.sample file could be interpreted
to mean that one only needs to set the DYNAMIC_FEATURES channel variable on the
calling channel in order to allow for the callee to be able to use the features
which he should have permission to use. However, the DYNAMIC_FEATURES variable
would only be read from the channel of the participant that pressed the DTMF
sequence to activate the feature. The result of this was that the callee was
unable to use dynamic features unless the dialplan writer had taken measures
to be sure that the DYNAMIC_FEATURES variable was set on the callee's channel.
This commit changes the behavior of ast_feature_interpret to concatenate the
values of DYNAMIC_FEATURES from both parties involved in the bridge. The features
themselves determine who has permission to use them, so there is no reason to believe
that one side of the bridge could gain the ability to perform an action that they
should not have the ability to perform.
Kevin Fleming pointed out on the asterisk-users list that the typical way that this
was worked around in the past was by setting _DYNAMIC_FEATURES on the calling channel
so that the value would be inherited by the called channel. While this works, the
documentation alone is not enough to figure out why this is necessary for the callee
to be able to use dynamic features. In this particular case, changing the code to match
the documentation is safe, easy, and will generally make things easier for people for
future installations.
This bug was originally reported on the asterisk-users list by David Ruggles.
(closes issue 0014657)
通过阅读上述内容,发现是因为没有在channel 2002 上进行Set(DYNAMIC_FEATURES=testfeature)操作,此问题可以打编号0014657的补丁解决,而我不想重新编译asterisk,进一步通过google搜索解决办法,在http://lists.digium.com/pipermail/asterisk-bugs/2007-December/008609.html找到了解决办法。
通过对extensions.conf的修改终于解决了问题。
新的extensions.conf
[testfeature]
exten => _X.,1,Ringing
exten => _X.,n,Set(DYNAMIC_FEATURES=testfeature)
exten => _X.,n,Dial(SIP/${EXTEN},60, tTM(dynamic-features))
[macro-dynamic-features]
exten => s,1,Set(DYNAMIC_FEATURES=testfeature) //在被叫通道设置DYNAMIC_FEATURES
- 被叫(callee)怎么使用applicatemap功能
- 多方通话中,禁止被叫方使用DYNAMIC_FEATURES中定义的功能(features)
- arguments.callee使用
- 容联云通讯回拨功能主被叫显号实现
- 怎么使用javascript实现类的功能
- 怎么使用mob实现分享功能
- 该怎么使用MindMapper中的缩放功能
- Runtime之概念,功能和怎么使用
- ABBYY Hot Folder日志功能怎么使用
- 怎么在微信上使用预约功能
- Vegas项目归档功能怎么使用?
- 使用arguments.callee来避免递归出错
- js arguments.length, arguments.callee的使用
- 返阶参记渡读亮兆品约仁哪味被叫
- 三星Note3使用技巧 “随心剪贴”功能怎么用
- 怎么在程序中使用代码调用iphone打电话功能
- 怎么使用微信JSSDK的自定义分享功能
- 怎么在MindManager中使用自动计算功能
- 稀疏矩阵的压缩存储及转置,快速转置法,C++代码实现
- 持久化类的属性及访问方法
- 设计模式 Design Parttern ——装饰模式Decorator
- “博观而约取,厚积而薄发”——苏东坡
- SQL Server2008存储结构之基本系统视图
- 被叫(callee)怎么使用applicatemap功能
- undo表空间
- VB:绘图示例—屏保软件设计1
- ASP.NET4.0中客户端ID的生成
- 将一个字符串中的各个位按递增排序的最大整数打印出来
- 设计模式 Design Parttern ——外观模式Facade
- Linux常用命令和工具摘要 (持续更新中)
- pRTI中的chat例子的Java版分析
- 难道说这个就是生活吗?