make
pcapplay_ossl
出现链接错误,需要这两个库 : "-lssl -lcrypto"
//安装cygwin-1.7时 没有自动创建此动态库链接 手动补上
ln -s "E:\cygwin1.7\bin\cygssl-1.0.0.dll" ssl.dll
ln -s "E:\cygwin1.7\bin\cygcrypto-1.0.0.dll" crypto.dll
//Makefile 里路径补充
LIBS_Cygwin= -lcurses -lpthread -lstdc++
-L/usr/bin
-L/cygdrive/e/LAB/opengnu/wireshark-1.9.1/Wireshark-win32-libs/WpdPack/Lib
//用到这两个DLL 主要是宏定义的引入
make[1]:
进入目录
"/cygdrive/
e
/LAB/
open
/Svr_VoIP/SIP/performance/sipp-3.3"
g++ \
-o sipp sslinit.o sslthreadsafe.o send_packets.o prepare_pcap.o rijndael.o md5.o milenage.o auth.o xp_parser.o message.o scenario.o screen.o call.o comp.o sipp.o stat.o actions.o variables.o infile.o deadcall.o task.o socketowner.o listener.o opentask.o reporttask.o watchdog.o -lcurses -lpthread -lstdc++ -L/usr/bin -L /usr/lib/WpdPack/Lib -L/cygdrive/
e
/LAB/opengnu/wireshark-1.9.1/Wireshark-win32-libs/WpdPack/Lib -lcrypto -lwpcap
sslinit.o:sslinit.c:(.text+0x10): undefined reference to `_SSL_library_init'
sslinit.o:sslinit.c:(.text+0x20): undefined reference to `_SSL_load_error_strings'
sslinit.o:sslinit.c:(.text+0x38): undefined reference to `_SSL_CTX_new'
sipp.o:sipp.cpp:(.text+0x1b7): undefined reference to `_SSL_get_error'
sipp.o:sipp.cpp:(.text+0x2bd): undefined reference to `_SSL_CTX_get_cert_store'
sipp.o:sipp.cpp:(.text+0x34b): undefined reference to `_TLSv1_method'
sipp.o:sipp.cpp:(.text+0x353): undefined reference to `_SSL_CTX_new'
sipp.o:sipp.cpp:(.text+0x372): undefined reference to `_TLSv1_method'
sipp.o:sipp.cpp:(.text+0x37a): undefined reference to `_SSL_CTX_new'
sipp.o:sipp.cpp:(.text+0x3b3): undefined reference to `_SSL_CTX_load_verify_locations'
--------------------------------------------------------------------------------
//cygwin下 mount查看下 /usr/bin的实际代指路径
root@MICROSO-5M0HHTG
/lib
# mount
E:/cygwin1.7/bin on /usr/bin type ntfs (binary,auto)
E:/cygwin1.7/lib on /usr/lib type ntfs (binary,auto)
E:/cygwin1.7 on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type ntfs (binary,posix=0,user,noumount,auto)
F: on /cygdrive/f type ntfs (binary,posix=0,user,noumount,auto)
G: on /cygdrive/g type ntfs (binary,posix=0,user,noumount,auto)
I: on /cygdrive/i type ntfs (binary,posix=0,user,noumount,auto)
L: on /cygdrive/l type ntfs (binary,posix=0,user,noumount,auto)
~、Cygwin环境下,利用vs+vgdb来调试SIPp工程:
编译选项参看makefile 选用 "debug" 系列, 其中"pcapplay-ossl" 对应 "
debug_pcap_cygwin" 。
~、路径更正
Build Settings : make.exe 所在路径确认
Intellisense Directories : Cygwin 中的 usr/include 等等头文件、库的路径 //似乎只能追加,无法对旧的路径进行编辑修改
软交换 :FreeSwitch-1.2.23
vc
2008
// 有些库直接借用 vc2012编译生成的
软话机 :eyeBeam1.5.18 // 不同终端,发送INVITE包 SDP 描述数据的封装不同
用SIPp做测试的时候需要准备以下8个文件:
UAC端:uac.sh, uac.xml, uac.csv
uac.sh:调用sipp命令,并传入相应参数脚本文件,模拟UAC(例如主叫),当然也可不准备此文件直接输入sipp命令执行程序,但是写成文件执行更加方便可靠;
uac.xml:根据需要编写的uac侧的sip信号流程;
uac.csv:用于uac.xml需要引入的相应数据;
UAS端:reg.sh, reg.xml ; uas_noreg.sh, uas_noreg.xml ; uas.csv
reg.sh:调用sipp命令,并传入相应参数的脚本文件,模拟UAS注册,当然也可不准备此文件直接输入sipp命令执行程序,但是写成文件执行更加方便可靠;
reg.xml:根据需要编写的注册流程,主要配合uas流程使用;
uas_noreg.sh:调用sipp命令,并传入相应参数的脚本文件,模拟UAS(例如被叫),当然也可不准备此文件直接输入sipp命令执行程序,但是写成文件执行更加方便可靠。
uas_noreg.xml:根据需要编写的uas侧的sip信号流程。
uas.csv:用于reg.xml和uas.xml中需要引入的相应数据。
注意:uas中,reg.xml和uas_noreg.xml中的内容不能合并在同一个xml中,或者会导致收不到invite;
网文参考: Linux-SIPp3.3测试FreeSwitch-(一)~(七)
如题。
因为,此案例中将UAS端分成两个包(reg.xml + uas_noreg.xml)发送,各自对应的 reg.sh 与 uas_noreg.sh 的端口号,注意要设成一样,
否则 UAS 端收不到 UAC 端的数据包。
另外,端口号最好手动设置 抓包时便于观察 容易分出 C/S 端 。
----------------------------------------
本案例 : UAS端口 12346 UAC端口 12345
* 488 Not Acceptable Here + INCOMPATIBLE_DESTINATION
(1)错误日志摘要(uac_7196_errors.log)
SIP/2.0 488 Not Acceptable Here
Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
(2)异常反应
屏幕提示 :
while expecting '180' (index 10), received 'SIP/2.0 488 Not Acceptable Here
实际软话机上观察 : eyeBeam1.5上 振铃时未设置自动应答, 掉话,未接通 很多个"Missed Call "
(3)处理方法:
测试时,注意要用终端设备或软话机可以接受的
SDP包
,且保持uac/uas两边SDP一致;
可事先用两个话机拔叫一次,拔通抓包后拷贝出SDP数据,覆盖uac.xml 及 uas_noreg.xml场景文件中各自"INVITE"方法里的SDP部分。
~、注意 uas.csv 帐号用例格式写法
之前:
SEQUENTIAL
1000;[authentication username=1000 password=1234]
1001;[authentication username=1001 password=1234]
1002;[authentication username=1001 password=1234]
报错:
while expecting '200' (index 3), received 'SIP/2.0 401 Unauthorized
纠正:(可加上自己做为目标号,或随便写一个目标号"1002")
SEQUENTIAL
1000;1002;[authentication username=1000 password=1234]
1001;1002;[authentication username=1001 password=1234]
1002;1002;[authentication username=1002 password=1234]
415错误处理 :
(*) uac.csv 里每一行用户号码 须事先已在服务端开户过
之前:4个号都未添加
SEQUENTIAL
152;19002;[authentication username=152 password=7d83c157ea9c4c21da1a0e7ab05c21b9]
153;138721;[authentication username=153 password=7d83c157ea9c4c21da1a0e7ab05c21b9]
之后:改用默认已有的20个号
SEQUENTIAL
1000;1011;[authentication username=1000 password=1234]
1001;1012;[authentication username=1001 password=1234]
(*)uac.csv 文件要求是unix格式,用dos2unix工具转换。
参见代码 Infile.cpp 模块中有提及此要求: "Each line should be terminated with a '\n'"
这一点 在cygwin平台上 容易忽略掉。
如果不转换格式 而最后一行数据又没有"\r\n"符的话,会造成只有最后一行用例可以用,能收到软交换成功的回复,而其他行的不能用的假象,
不能用的每一个用例都被回复:
"while expecting '100' (index 9), received 'SIP/2.0
415
Unsupported Media Type " ,以及
"Dead call 1-11268@192.168.1.31 (aborted at index 9), received 'SIP/2.0
481
Call Does Not Exist "
~、 头域与消息体之间的空行注意保留
<send retrans="500">
<![CDATA[
INVITE
sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
To: [field1] <sip:[field1]@[remote_ip]:[remote_port]>

本文详细介绍了在Cygwin环境中使用SIPp3.3进行性能测试时遇到的编译错误,如SSL库链接问题,并提供了解决方案。此外,还探讨了SIPp的测试准备、测试案例编写、脚本参数、动作(Actions)以及性能测试建议,包括如何处理488、401、415等错误。文章还展示了使用SIPp进行FreeSwitch、Asterisk等软交换平台的性能测试示例。
最低0.47元/天 解锁文章
1268

被折叠的 条评论
为什么被折叠?



