sipp注册话机测试

来源:互联网 发布:联通显示4g但没有网络 编辑:程序博客网 时间:2024/06/06 02:51

注册的CSV脚本

格式为

SEQUENTIAL
3001;sip.XXX.com;[authentication username=3001 password=3001]

第一行SEQUENTIAL表示顺序读取

第二行中每一项使用";"分割,分割的每一项被用于xml文件中的field字段,field字段从0开始编码

第二项中field1表示的注册域名,不能使用ip地址代替

 

注册的XML脚本

 Collapse source
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="branch_client">
<label id="1"/>
  <send retrans="6000">
    <![CDATA[
      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:5062;branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      To: <sip:[field0]@[field1]>
      Call-ID: [call_id]
      CSeq: 1 REGISTER
      Contact: sip:[field0]@[local_ip]:5062
      Max-Forwards: 5
      Expires: 3600
      User-Agent: SIPp
      Content-Length: 0
    ]]>
  </send>
  <recv response="401" auth="true">
  </recv>
  <send retrans="6000">
    <![CDATA[
      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:5062;branch=[branch]
      From: <sip:[field0]@[field1]>;tag=[call_number]
      To: <sip:[field0]@[field1]>
      Call-ID: [call_id]
      CSeq: 2 REGISTER
      Contact: sip:[field0]@[local_ip]:5062
      [field2]
      Max-Forwards: 5
      Expires: 3600
      User-Agent: SIPp
      Content-Length: 0
    ]]>
  </send>
    
  <recv response="200"></recv>
  
        <pause milliseconds="600000" next="1"/>
  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  
</scenario>

 


 

SIPP模拟注册话机

./sipp -p 5062 -trace_err  -inf ../sipp_csv/users.csv -sf ../sipp_xml/reg.xml -l 600 -m 600  192.168.181.28:5060

命令参数说明

-p: 表示本地端口

-trace_err: 执行过程中将错误日志输出

-inf: 使用csv文件,csv文件做为执行文件的读入的参数

-sf: 使用自定义的xml文件,执行sipp过程

-l: 并发数

-m: 最后关闭数

最后的地址+端口: sipp注册到的服务器地址+端口

0 0