FreeSWITCH 处理Refer盲转时,UUI传递不对(没有将SIP 消息头Refer-To中的User-to-User传递给B-Leg)
REFER sip:mod_sofia@10.2.32.90:5080 SIP/2.0
Via: SIP/2.0/UDP 10.2.32.116:5080;rport;branch=z9hG4bKryvUZZerH16DN
From: <sip:449998@10.2.32.116:5080>;tag=XH27mSc4ZyjaF
To: "Extension 296898" <sip:296898@10.2.32.90>;tag=6g430SNK5Be3m
Call-ID: 46eda73c-76b2-1239-e1b5-487b6b8ad630
Contact: <sip:449998@10.2.32.116:5080;transport=udp>
Refer-To: <sip:296896@test.refer.com?User-to-User=00C82b264F7267416E693D3131313337303035303030303139393433333634264F7267446E69733D333030393637%3Bencoding%3Dhex>
Referred-By: <sip:10.2.32.116:5080>
User-to-User: 00C8426613D31%3Bencoding%3Dhex INVITE sip:296896@10.32.26.19:50078;rinstance=b4e528536c8c5a3d SIP/2.0
Via: SIP/2.0/UDP 10.2.32.90;rport;branch=z9hG4bKtK4yS4SH849vD
Route: <sip:296896@10.32.26.19:50078>;rinstance=b4e528536c8c5a3d
From: "Extension 296898" <sip:296898@10.2.32.90>;tag=ymDeQZt2ZcK1B
To: <sip:296896@10.32.26.19:50078;rinstance=b4e528536c8c5a3d>
Call-ID: 4992bbb6-76b2-1239-e1b5-487b6b8ad630
Contact: <sip:mod_sofia@10.2.32.90:5060>
Referred-By: <sip:10.2.32.116:5080>
User-to-User: 00C8426613D31%3Bencoding%3Dhex
Remote-Party-ID: "Extension 296898" <sip:296898@10.2.32.90>;party=calling;screen=yes;privacy=off
- 信令交互逻辑
- 信令处理逻辑
- REFER的SIP消息头"Refer-To"中的信息,只提取盲转的被叫号码,忽略其他参数(如User-to-User),然后发起新的INVITE
- 新的INVITE消息中的“User-to-User”头,是根据REFER命令中的“User-to-User”头获取,非“Refer-To”里的参数值
<extension name="refer request" continue="true">
<condition field="${sip_refer_to}" expression=".+User-to-User=(.+)%3B">
<action application="log" data="INFO yuxiu:change User-to-User by sip_refer_to : sip_refer-to [$1]"/>
<action application="export" data="nolocal:sip_h_User-to-User=$1;encoding=hex"/>
</condition>
</extension>
REFER sip:mod_sofia@10.2.32.90:5080 SIP/2.0
From: <sip:449998@10.2.32.116:5080>;tag=XH27mSc4ZyjaF
To: "Extension 296898" <sip:296898@10.2.32.90>;tag=6g430SNK5Be3m
Refer-To: <sip:296896@test.refer.com?User-to-User=00C82b264F7267416E693D3131313337303035303030303139393433333634264F7267446E69733D333030393637%3Bencoding%3Dhex>
User-to-User: 00C8426613D31%3Bencoding%3Dhex INVITE sip:296896@10.32.26.19:50078;rinstance=b4e528536c8c5a3d SIP/2.0
From: "Extension 296898" <sip:296898@10.2.32.90>;tag=ymDeQZt2ZcK1B
To: <sip:296896@10.32.26.19:50078;rinstance=b4e528536c8c5a3d>
User-to-User: 00C82b264F7267416E693D3131313337303035303030303139393433333634264F7267446E69733D333030393637%3Bencoding%3Dhex
Remote-Party-ID: "Extension 296898" <sip:296898@10.2.32.90>;party=calling;screen=yes;privacy=off
四、模拟的呼叫场景:

- 拨号方案详情:default.xml
<!-- 处理refer消息头 -->
<extension name="refer request" continue="true">
<condition field="${sip_refer_to}" expression=".+User-to-User=(.+)%3B">
<action application="log" data="WARNING yuxiu:change User-to-User by sip_refer_to : sip_refer-to [$1]"/>
<action application="export" data="nolocal:sip_h_User-to-User=$1;encoding=hex"/>
</condition>
</extension> <!-- 模拟呼叫IVR -->
<extension name="outbound-ivr">
<condition field="destination_number" expression="^(449998)$">
<action application="bridge" data="sofia/external/$1@10.2.32.116:5080"/>
<action application="hangup" data="Esl Server ERROR"/>
</condition>
</extension> <!-- 模拟呼叫PBX分机 -->
<extension name="outbound-pbx">
<condition field="destination_number" expression="^(296\d{3})$">
<action application="bridge" data="user/${1}"/>
<action application="hangup" data="Esl Server ERROR"/>
</condition>
</extension>
<extension name="outbound-test2">
<condition field="destination_number" expression="^449998$">
<action application="log" data="INFO uui=${sip_h_User-to-User}"/>
<action application="answer"/>
<action application="playback" data="/usr/local/freeswitch/sounds/welcom_to_call_yuxiu_ivr.wav"/>
<action application="deflect" data="sip:296896@test.refer.com?User-to-User=00C82b264F7267416E693D3131313337303035303030303139393433333634264F7267446E69733D333030393637%3Bencoding%3Dhex"/>
<action application="log" data="WARNING refer finished"/>
<action application="hangup" data="refer finished"/>
</condition>
</extension>
4.3、FS测试日志
EXECUTE sofia/internal/296898@10.2.32.90 bridge(sofia/external_90/449998@10.2.32.116:5080) [DEBUG] sofia.c:8544 Process REFER to [296896@test.refer.com]
[INFO] mod_dialplan_xml.c:637 Processing 296898 <296898>->296896 in context default
EXECUTE sofia/internal/296898@10.2.32.90 bridge(user/296896)
FreeSWITCH 处理Refer盲转时,UUI传递不对(没有将SIP 消息头Refer-To中的User-to-User传递给B-Leg)的更多相关文章
- 关于java中是引用传递还是值传递的问题!!!经常在笔试中遇到,今天终于弄明白了!
关于JAVA中参数传递问题有两种,一种是按值传递(如果是基本类型),另一种是按引用传递(如果是對象).首先以两个例子开始:1)public class Test2 { public static vo ...
- Mybatis中使用 #{} 和 ${} 向sql传参时的区别
今天在工作时,使用MyBatis中向sql传递两个参数时,一直显示SQL语法错误,仔细检查,才发现传入的参数被加上了引号,导致传入的参数(要传入的参数是表名)附近出现语法错误. 错误写法: } a } ...
- 转:TCP为什么要3次握手和4次挥手时等待2MSL、 TCP如何保证消息顺序以及可靠性到达
关于tcp三次握手.四次挥手可以看这里:TCP与UDP的差别以及TCP三次握手.四次挥手 1.TCP为甚要3次握手? 在谢希仁著<计算机网络>第四版中讲“三次握手”的目的是“为了防止已失效 ...
- struts2 action配置时 method 省略不写 默认执行方法是父类ActionSuppot中的execute()方法
struts2 action配置时 method 省略不写 默认执行方法是父类ActionSuppot中的execute()方法
- 使用storyboard显示UITableView时,如果不修改系统默认生成的tableView:cellForRowAtIndexPath:方法中的代码,则必须为UITableViewCell注册(填写)重用标识符:identifier.必须要代码方法中的标识符一致.
CHENYILONG Blog 使用storyboard显示UITableView时,如果不修改系统默认生成的tableView:cellForRowAtIndexPath:方法中的代码,则必须为UI ...
- httpUrlConnection连接网络的用法(用到了handle传递消息,在主线程中更新UI)
由于httpclient在Android5.0以后已经过时,所以官方推荐使用httpUrlConnection来连接网络,现将该连接的基本方法展示,如下 注意:记得加入<uses-permiss ...
- urlencode($url):把url转义,当字符串数据以url的形式传递给web服务器时,字符串中是不允许出现空格和特殊字符串的
1.对url进行编码转义
- jquery mobile跳转到指定id时怎样传递参数
在jquery mobile 中,每一个页面都是一个page,当我们需要从一个页面跳转到另一个页面时,可以在href中指定id,可是该怎么把一个page中的参数传递到另外一个page中,几经琢磨,发现 ...
- C++ 数组作为函数参数时,传递数组大小的方法
废话不多说,先上错误示范: void fun(int arr[arr_num]) { // ... } int main() { // ... int *arr = new int[10]; fun( ...
随机推荐
- hook框架-frida使用-环境配置
一.python安装模块 pip3 install frida pip3 install frida-tools 二.下载frida-server #下载链接 https://github.com/f ...
- 【踩坑笔记】layui之单选和复选框不显示
直接上代码,下面前端页面代码,使用layui框架: <div class="layui-form-item"> <div class="lay ...
- 计算机网络-应用层(3)Email应用
因特网电子邮箱系统主要由用户代理(user agent) .邮件服务器(mail server) 和简单邮件传输协议(SMTP)组成 邮件服务器(Mail Server) 邮箱:存储发给该用户的E ...
- Federated Optimization: Distributed Machine Learning for On-Device Intelligence
郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! arXiv:1610.02527v1 [cs.LG] 8 Oct 2016 坐标下降法:https://blog.csdn.net/qq_ ...
- 配置tomacat外部应用
原来我们的项目一般放置在tomcat文件夹的webapp下,现在我放到外面,也希望tomact可以找到他
- 从零开始的SpringBoot项目 ( 二 ) 使用IDEA创建一个SpringBoot项目
工欲善其事 , 必先利其器 . IntelliJ IDEA 2019.3.3 x64的安装与破解 下面详细说明下如何使用idea创建我们的第一个springboot项目: 首先打开idea主界面选择 ...
- 测试必须学spring RESTful Service(上)
文末我会说说为什么测试必须学spring. REST REST,是指REpresentational State Transfer,有个精辟的解释什么是RESTful, 看url就知道要什么 看met ...
- 注册github时总卡在第一步无法验证的解决办法
从github官网可以看出问题所在,所以造成这一问题的极大可能就是浏览器的问题. 最简单的方法就是换手机浏览器进行注册
- win环境下安装配置openCV-4.3.0
win环境下安装openCV-4.3.0 首先下载 推荐国内镜像 官网太太太慢了 附上 下载地址 下载之后打开exe解压到目录都是常规操作 环境变量的配置 依次打开到系统变量的path 新建一个路径为 ...
- 文件属性及find命令总结
第1章 文件属性 1.1 文件的属性 1.1.1 查看文件的详细属性 PS:ls查看的文件或目录默认的是按照名字的第一个字母进行正序排序 ls 参数选项: -t ...