利用SIPp对SIP Proxy进行Register压测用到的文件

SIPp功能很强大,通过配置流程可以实现大部分的SIP场景。下面是利用SIPp实现的对OpenSIPS进行REGISTER进行压测的xml文件和csv文件。

register.xml

[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>  
  2. <!DOCTYPE scenario SYSTEM "sipp.dtd">  
  3.   
  4. <scenario name="branch_client">  
  5.   <send retrans="500">  
  6.       <![CDATA[ 
  7.  
  8.    REGISTER sip:[remote_ip]:[remote_port] SIP/2.0 
  9.    Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] 
  10.    From: <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number] 
  11.    To: <sip:[field0]@[remote_ip]:[remote_port]> 
  12.    Call-ID: [call_id] 
  13.    CSeq: 1 REGISTER 
  14.    Contact: sip:[field0]@[local_ip]:[local_port] 
  15.    Max-Forwards: 5 
  16.    Expires: 60 
  17.    User-Agent: SIPp 
  18.    Content-Length: 0 
  19.  
  20.    ]]>  
  21.   </send>  
  22.   
  23.   <recv response="401" auth="true">  
  24.   </recv>  
  25.   
  26.   <send retrans="500">  
  27.    <![CDATA[ 
  28.     REGISTER sip:[remote_ip]:[remote_port] SIP/2.0 
  29.     Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] 
  30.     From: <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number] 
  31.     To: <sip:[field0]@[remote_ip]:[remote_port]> 
  32.     Call-ID: [call_id] 
  33.     CSeq: 2 REGISTER 
  34.     Contact: sip:[field0]@[local_ip]:[local_port] 
  35.     [field1] 
  36.     Max-Forwards: 5 
  37.     Expires: 60 
  38.     User-Agent: SIPp 
  39.     Content-Length: 0 
  40.   ]]>  
  41.   </send>                            
  42. <recv response="200"></recv>  
  43.   
  44. <!-- definition of the response time repartition table (unit is ms) -->  
  45. <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>  
  46. <!-- definition of the call length repartition table (unit is ms) -->  
  47. <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>  
  48. </scenario>  

data.csv

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. <span style="font-family:Courier New;font-size:14px;">SEQUENTIAL  
  2. 6000;[authentication username=6000 password=6000]  
  3. 6001;[authentication username=6001 password=6001]  
  4. 6002;[authentication username=6002 password=6002]  
  5. 6003;[authentication username=6003 password=6003]</span>  

以上代码对Asterisk 和 OpenSIPS均适用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值