Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21740
  • 博文数量: 3
  • 博客积分: 160
  • 博客等级: 入伍新兵
  • 技术积分: 30
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-02 22:49
文章分类

全部博文(3)

文章存档

2014年(1)

2007年(2)

我的朋友

分类: 系统运维

2007-04-29 14:04:46

刚开始接触SIPP,是无意中整理自己的文档时候。很早的时候从一个FTP上拖下一堆SIP相关的资料,没想到竟然藏了这么强的一个软件。^^
    动手使用前,在网上搜索了一些使用SIPP的文章。长了不少经验,走了不少弯路。负责任的说,多数是不负责任的互相转来转去。
    个人经验1:SIPP的主站上的说明是最详细最完善的(当然!这是废话。)读的懂原文的人自然不屑看那些互转的文章,正是不愿意或看不懂原文的人才会找所谓的中文资料(比如我)。
    个人经验2:即使拿着金山词霸自己翻译原文,也比跑瞎道强!
SIPP主站文档地址:
 
    第一步:安装
  • On Linux, SIPp is provided in the form of source code. You will need to compile SIPp to actually use it.
  • Pre-requisites to compile SIPp are (see ):
  • C++ Compiler
  • curses or ncurses library
  • For authentication and TLS support: OpenSSL >= 0.9.8
  • For pcap play support: libpcap and libnet
  • For distributed pauses:
  • You have four options to compile SIPp:
  • Without TLS (Transport Layer Security) and authentication support: This is the recommended setup if you don't need to handle SIP authentication and/or TLS. In this case, there are no depencies to install before building SIPp. It is straight forward:
    # gunzip sipp-xxx.tar.gz
    # tar -xvf sipp-xxx.tar
    # cd sipp
    # make
  • With TLS and support, you must have installed (>=0.9.8) (which may come with your system). Building SIPp consist only in adding the "ossl" option to the make command:
    # gunzip sipp-xxx.tar.gz
    # tar -xvf sipp-xxx.tar
    # cd sipp
    # make ossl
  • With and without support:
    # gunzip sipp-xxx.tar.gz
    # tar -xvf sipp-xxx.tar
    # cd sipp
    # make pcapplay
  • With and support:
    # gunzip sipp-xxx.tar.gz
    # tar -xvf sipp-xxx.tar
    # cd sipp
    # make pcapplay_ossl

以上原文,太要看看了。安装的时候就要决定你可以测试什么样的SIP系统。

只make无参数的话只能是测试无密码验证的sip系统;要测试正规的sip系统就需要带ossl。

第二步:配置文件

SIPP需要两个配置文件一个是xml文件里面是SIP包体框架,一个是csv文件里面是被测系统中用户名密码。

xml格式:

csv格式:SEQUENTIAL
User0001;[authentication username=joe password=schmo]
User0002;[authentication username=john password=smith]
User0003;[authentication username=betty password=boop]

网上一个好人提供里一段生成CSV文件的bash脚本(适用于注册),内容如下:

#!/bin/bash

i=3000

echo "SEQUENTIAL" > test.csv

while [ $i != 3100]

do

  i=$(($i+1))

  echo "$i;[authentication username=$i password=$i]" >> test.csv

done

第三步:执行

sipp -sf test.xml -inf test.csv -i 10.10.10.10(本机IP) -p 5000(本机端口) -m 1(测试次数) test.sip.com:5060(被测SIP系统地址或域名加端口号)

另外:-trace_**是个好东西,可以生成测试日志,其中_msg可以把SIP的收发包写成日值记录下来,便于调试。

 

以上仅仅是SIPP做为sip系统的测试工具的应用,做为测试sip终端的工具相关以后补上。

阅读(4128) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:ser(sip express router)安装记录

给主人留下些什么吧!~~