sipp模拟freeswitch分机测试(SIP协议调试)
1、freeswitch安装
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
systemctl enable freeswitch
freeswitch
2、freeswitch配置
以上默认能拨通,但是没声音,30秒左右就自动断线了,明显跟freepbx一样是NAT的故障
我偷懒用yun install安装的freeswitch,配置文件在/etc/freeswitch目录,安装文件比较分散
/var/lib/yum/repos/x86_64/7/freeswitch
/var/lib/freeswitch
/var/cache/yum/x86_64/7/freeswitch
/var/log/freeswitch
/usr/lib64/freeswitch
/usr/share/freeswitch
/usr/bin/freeswitch
/run/freeswitch
/etc/sysconfig/freeswitch
/etc/freeswitch
需要打开的端口:
udp 16384:32768
udp 4569
udp 5060
tcp 5060
udp 5080
tcp 5080
tcp 8000
udp 8000
配置conf/autoload_configs/verto.conf.xml
<param name="ext-rtp-ip" data="外网ip">
配置conf/sip_profiles/internal.xml
<param name="aggressive-nat-detection" value="true"/>
<param name="multiple-registrations" value="true"/>
<param name="ext-rtp-ip" value="外网ip"/>
<param name="ext-sip-ip" value="外网ip"/>
<param name="NDLB-received-in-nat-reg-contact" value="true"/>
<param name="NDLB-force-rport" value="true"/>
<param name="NDLB-broken-auth-hash" value="true"/>
<param name="enable-timer" value="false"/>
<param name="auth-calls" value="true"/>
配置conf/sip_profiles/external.xml
<param name="aggressive-nat-detection" value="true"/>
<param name="ext-rtp-ip" value="外网ip"/>
<param name="ext-sip-ip" value="外网ip"/>
<param name="NDLB-force-rport" value="true"/>
配置conf/autoload_configs/switch.conf.xml
<param name="rtp-start-port" value="16384"/>
<param name="rtp-end-port" value="32768"/>
2) 关闭centos 7.2防火墙,先保持网络通畅,调完了在配置防火墙端口。
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
重启freeswitch
freeswitch -stop
freeswitch
3、freeswitch测试
sample sipp scenarios for testing freeswitch
https://github.com/os11k/sipp2freeswitch
1) 更改文件invite-accounts.csv中的SIP Proxy配置
SEQUENTIAL
# Username: 1000-1009
# Password: 1234
# SIP Proxy: 182.61.56.247, Destination Number: 9196
1000;182.61.56.247;[authentication username=1000 password=1234];9196;
1001;182.61.56.247;[authentication username=1001 password=1234];9196;
1002;182.61.56.247;[authentication username=1002 password=1234];9196;
1003;182.61.56.247;[authentication username=1003 password=1234];9196;
1004;182.61.56.247;[authentication username=1004 password=1234];9196;
1005;182.61.56.247;[authentication username=1005 password=1234];9196;
1006;182.61.56.247;[authentication username=1006 password=1234];9196;
1007;182.61.56.247;[authentication username=1007 password=1234];9196;
1008;182.61.56.247;[authentication username=1008 password=1234];9196;
1009;182.61.56.247;[authentication username=1009 password=1234];9196;
2) 更改文件register-accounts.csv中的SIP Proxy配置
SEQUENTIAL
# Username: 1000-1009
# Password: 1234
# SIP Proxy: 182.61.56.247
1000;182.61.56.247;[authentication username=1000 password=1234]
1001;182.61.56.247;[authentication username=1001 password=1234]
1002;182.61.56.247;[authentication username=1002 password=1234]
1003;182.61.56.247;[authentication username=1003 password=1234]
1004;182.61.56.247;[authentication username=1004 password=1234]
1005;182.61.56.247;[authentication username=1005 password=1234]
1006;182.61.56.247;[authentication username=1006 password=1234]
1007;182.61.56.247;[authentication username=1007 password=1234]
1008;182.61.56.247;[authentication username=1008 password=1234]
1009;182.61.56.247;[authentication username=1009 password=1234]
3)注意invite-auth.xml文件中的g711a.pcap目录
<exec play_pcap_audio="pcap/g711a.pcap"/>
4) 启动测试
sipp -i 172.16.0.6 -sf register.xml -inf register-accounts.csv 182.61.56.247:5060 -r 1 -rp 1000 -aa -trace_err
sipp -i 172.16.0.6 -sf invite-auth.xml -inf invite-accounts.csv 182.61.56.247:5060 -r 1 -rp 1000 -trace_err

测试注册,拨号,rtp数据都通了
4、FreeSwitch默认只支持音频,为支持视频,修改vars.xml如下:
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA,GSM,H264,H263-1998,H263"/>
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA,GSM,H264,H263-1998,H263"/>
5、杜金房的个人网站
https://github.com/os11k/sipp2freeswitch
sipp模拟freeswitch分机测试(SIP协议调试)的更多相关文章
- sipp模拟freepbx分机测试(SIP协议调试)
1.sipp的安装 1) 在centos 7.2下安装 yum install make gcc gcc-c++ ncurses ncurses.x86_64 ncurses-devel ncurse ...
- sipp模拟电信运营商VoIP终端测试(SIP协议调试)
三大运营商都有SIP服务器,用来支持语音对讲,多媒体调度等功能,他们的平台可能不是标准的SIP协议会话. 为了应对没完没了的对接各个厂商的平台,这里再整理了一套协议脚本,毕竟全都是没有意义的无用功,标 ...
- 【测试工具】http协议调试利器fiddler使用教程
转自:http协议调试利器fiddler使用教程http://bbs.phpchina.com/thread-207418-1-1.html Fiddler真乃神器!它和市面上常见的很多web调试器. ...
- SIP协议简单介绍
sip协议是由IETF提出的IP电话信令协议,主要目的是为了解决ip网络中的信令控制,以及同软交换通信. sip协议类似http协议: 报文结构: start-line message-header ...
- freeswitch对接其它SIP设备
这几天用到freeswitch对接其它设备方面的知识,这里整理下,也方便我以后查阅. 操作系统:debian8.5_x64 freeswitch 版本 : 1.6.8 一.freeswitch作为被叫 ...
- SIP协议&开源SIP服务器搭建和客户端安装
1. SIP SIP 是一个应用层的控制协议,可以用来建立,修改,和终止多媒体会话,例如Internet电话 SIP在建立和维持终止多媒体会话协议上,支持五个方面: 1) 用户定位: 检查终端用户 ...
- 基于GBT28181:SIP协议组件开发-----------第三篇SIP注册流程分析实现
原创文章,引用请保证原文完整性,尊重作者劳动,原文地址http://www.cnblogs.com/qq1269122125/p/3941172.html,qq:1269122125. 上两章节简要的 ...
- 基于GBT28181:SIP协议组件开发-----------第四篇SIP注册流程eXosip2实现(一)
原创文章,引用请保证原文完整性,尊重作者劳动,原文地址http://www.cnblogs.com/qq1269122125/p/3945294.html. 上章节讲解了利用自主开发的组件SIP组件l ...
- 基于GBT28181:SIP协议组件开发-----------第一篇环境搭建
原创文章,引用请保证原文完整性,尊重作者劳动,原文地址http://www.cnblogs.com/qq1269122125/p/3930018.html,qq:1269122125. SIP协议在安 ...
随机推荐
- EntityFramework使用Code First模式创建数据库控制生成单数形式的表名
使用Code-First模式生成数据库时,默认生成的数据库表的名称为类型的复数形式,例如实体类名称是"User",默认生成的数据库表名为“Users”,多数情况下我们并不想生成的数 ...
- 关于Unity中的transform组件(三)
game_root节点下右一个Cube子节点,和一个Sphere节点,脚本挂载在game_root下 四元数:(1)Quaternion rot (2)this.cube.rotation 欧拉角:V ...
- Spring Boot简化了基于Spring的应用开发
Spring Boot简化了基于Spring的应用开发,通过少量的代码就能创建一个独立的.产品级别的Spring应用. Spring Boot为Spring平台及第三方库提供开箱即用的设置,这样你就可 ...
- 【BZOJ】1072: [SCOI2007]排列perm(状压dp+特殊的技巧)
http://www.lydsy.com/JudgeOnline/problem.php?id=1072 首先无限膜拜题解orz表示只会暴力orz 数据那么小我竟然想不到状压! orz 这种题可以取模 ...
- 动态向SqlParameter 里添加相应参数
先定义一个List,然后再往List里面添加SqlParameter对象,然后将List转为SqlParameter数组即可 List<SqlParameter> ilistStr = n ...
- datatable详解(angular-datatable)+后台分页(springmvc)
datable常规配置,百度一大堆 function prepareDatatable(selector, options) { var defaultOptions = { autoWidth: t ...
- php如何互换一个数组的首尾元素 中间不变 首尾互换
群里有人提出一个问题 如何互换一个数组的首尾元素 中间不变 首尾互换 代码如下: <?php $array=array(1,2,3,4,5,6,7,8,9,10); $first=array_s ...
- ionic触摸事件
官方文档:http://ionicframework.com/docs/api/directive/onHold/ on-hold 长按事件on-tap 点击事件 on-double-tap 双击事 ...
- js Tab切换实例
js 实现 tab 切换 实现如下效果: 1.图片每1秒钟切换1次. 2.当鼠标停留在整个页面上时,图片不进行轮播. 3.当点击切换页的选项上时,出现该选项的对应图片,而且切换页选项的背景颜色发生相应 ...
- java发展历程、常用dos命令与jDK工具使用
Java菜鸟学习之旅 1.勤敲代码 2.必须将课堂上讲的内容学到位 2.1 学到会用 2.2 在学会之前不要自作主张 2.3 当天课程当天完成 3.能说会道 3.1 善于表达 3.2 学会的都能讲 4 ...