Using SIPp to do performance test for opensips

本文档介绍了如何使用SIPp工具对OpenSIPS进行性能测试。内容包括了解SIPp的基本信息,SIPp与OpenSIPS的结合使用,安装过程,配置默认uac.xml文件,命令行参数的使用,以及在遇到问题时如何解决,如'diversion'字段无默认值的错误等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Using SIPp to do performance test for opensips

About SIPp

SIPp
Github code
Doc pdf
Doc pdf for Chinese
Doc Web

Using SIPp to do performance test

蜜果私塾:使用SIPP来进行SIP压力测试(2)
使用sipp对FreeSwitch进行测试(Linux环境,会议模式)
SIPp-惡搞SIP的工具

SIPp & Opensips

SIP Stress Testing -Part 1 (Opensipsctl & OpenSIPS-CP)
SIP Stress Testing -Part 3 (SIPp)
Performance Evaluation Framework for
a SIP-based Telecommunication Call
Handling System
VoIP Cookbook: Transaction Oriented Test using SIPp
VoIP Cookbook: Building your own Telecommunication Infrastructure
Asterisk Stress testing (with Media) Using SIPp
利用SIPp对SIP Proxy进行Register压测用到的文件

Install

  • Download source code
  • Make clear the way to install
    • Update autoconf (no use when running yum update autoconf)
    • I install it without any special features
    • Maybe I will use some features in the future, so I decide to reinstall with full
    • There are a lot of dependencies that need to install in advance:
      • C++ yum install gcc-c++ libstdc++-devel
      • ncurses (already installed)
      • OpenSSl (already installed)
      • Pcap yum -y install libpcap-devel
      • lksctp-tools
      • GSL
    • But after I intall all above packages, there are still error when I run ./build.sh –full
    • Successful when running ./build.sh –with-pcap –with-sctp –with-openssl

Using default uac.xml

Cmd

sipp -sn uac -m <total call numbers> -i <opensips ip> -s <callee number> <opensips ip> -r <call number per second>

Allocate caller number in opensips.cfg file.

Using sipcapture.so

  • vi opensips.cfg
loadmodule "sipcapture.so"
modparam("sipcapture", "db_url","mysql://<user>:<pw>@<mysql ip>:<port>/<database name>")
modparam("sipcapture", "table_name", "sip_capture")
modparam("sipcapture", "capture_on", 1)
/* activate HEP capturing */
modparam("sipcapture", "hep_capture_on", 1)

In the specified method that you want to capture packet:

sip_capture();
  • Download sipcapture-create.sql from net
  • Enter database
    • mysql -u root -p
    • show databases;
    • use databases;
    • source ./sipcapture-create.sql;

Solving problems

ERROR:
Field ‘diversion’ doesn’t have a default value
sipcapture:sip_capture_store: failed to insert into database

Solve:
Add default value to diversion field or disable strict mode in mysql.

  • Add default value
    • find the variable in the table, double click the default area and choose ‘Custom’
  • Disable strict mode
    • 配置my.ini(my.cnf),去掉:STRICT_TRANS_TABLES 重新启动mysql服务
    • my.ini配置代码
    • Restart mysql: service mysql/mysqld restart
# Set the SQL mode to strict
# sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

参考文献

[解决方法]MySQL #1364 – Field “details” doesn’t have a default value
kamailio keep logging ‘diversion’ doesn’t have a default value

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值