近日,一直到进行SIPP的测试运用,今天终于成功实现:
1.在Asterisk上配置好要测试的Dialplan,注册分机进行实际测试。
2.在实际测试进行前,在服务器上运行以下命令:
tcpdump -i eth0 -s 1500 -w /tmp/test.pcap
3.结束测试后,按ctrl+c 终止抓包动作。
4.在win上安装Wireshark后,运行test.pcap,过滤Sip协议信息:
5.根据sip协议的顺序调整通话的测试脚本 Xba.xml
6.运行runsipp.sh
#!/bin/sh
sipp -t un -i 152.xxx.xxxx.xxx -inf test.csv -sf test.xml -trace_err -m 1 152.xxx.xxx.xx.xx:5060
m: 电话通的总数
l: 电话并发数
Call limit reached (-m 1), 0.582 s period 1 ms scheduler resolution
0 calls (limit 3600) Peak was 1 calls, after 0 s
0 Running, 0 Paused, 0 Woken up
0 dead call msg (discarded) 0 out-of-call msg (discarded)
1 open sockets
5998 Total RTP pckts sent 0.000 last period RTP rate (kB/s)
Messages Retrans Timeout Unexpected-Msg
INVITE ----------> 1 0 0
407 <---------- 1 0 0 0
ACK ----------> 1 0
INVITE ----------> 1 0 0
100 <---------- 1 0 0 0
183 <---------- 1 0 0 0
200 <---------- 1 0 0 0
ACK ----------> 1 0
[ NOP ]
Pause [ 2:00] 1 0
BYE ----------> 1 0 0
200 <---------- 1 0 0 0
------------------------------ Test Terminated --------------------------------
英文参考文档:
http://www.trixbox.org/forums/trixbox-forums/help/tcpdump-wireshark-listen-calls-find-problems
评论