SIPP之认证注册---------ZED-3

上一篇 / 下一篇  2013-07-20 10:01:39 / 个人分类:SIP

     版权信息: 可以任意转载, 转载时请务必以超链接形式标明文章原文出处, 即下面的声明.51Testing软件测试网 d(@ ls\)^
原文链接:http://www.51testing.com/index.php?uid-360490-action-viewspace-itemid-84935451Testing软件测试网*_3YK ?q+@ K3v
51Testing软件测试网-N|OEP?rK d
在经历了10天的挣扎之后,注册消息终于成功了。
最新的版本3.3试验注册有问题,请看http://www.51testing.com/index.php?uid-360490-action-viewspace-itemid-849076,我相信在不久这个BUG会修复的。51Testing软件测试网qmdan/C'I f

!?5\e*A.Z L0
环境描述如下:
192.168.0.20是一个有注册认证的SIP服务器,服务器端口为5060;
192.168.0.101是我在windows安装的cygwin软件后测试机器;
51Testing软件测试网4_ Klp+e"M-{w-z\
sipp版本: SIPp v3.2-TLS-PCAP, version unknown, built Jul 17 2013, 21:50:11
51Testing软件测试网9m^X2f#Px2B:JC

a6atY7X0

K V!P{l^ ?(em&t0
注册代码如下:
51Testing软件测试网 AiF&?:[0Y/c
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

^T(vV{,f!tW%Sj0
<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'branchc' scenario.                   -->
<!--                                                                    -->
<!-- 首先发送SIP注册消息,Register。里面的From与To是注册的号码  -->
<scenario name="branch_client">
  <send retrans="500">
    <![CDATA[
 
      REGISTER sip:[remote_ip] 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];rport
      To: [field0] <sip:[field0]@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 1 REGISTER
      Contact: sip:[field0]@[local_ip]:[local_port]
      Content-Length: 0
      Expires: 300
    ]]>
  </send>

&[$I/O+\#t.].r:@b G0
  <recv response="100" ptional="true">
  </recv>
51Testing软件测试网9Y K[l&T&d!`
  <!--  SIPp会收到来自AST要求验证的401 消息体,Recv意思为Receive,接收到来自AST的401要求验证的消息,Next为如果收到401,那么转至Label为1的地方进行操作 -->
  <recv response="401" auth="true" next="1">
  </recv>
51Testing软件测试网1L!Y/Sp Ye7jh:},~
  <!--  send invite with authentication messages -->
  <!--  开始发送Register消息,里面将把验证的密码消息发送给对方,在消息体里面是抓不到密码消息的,而且已经被md5方式加密过。-->
51Testing软件测试网DOC} O%@
  <label id="1"/>
  <send retrans="500">
    <![CDATA[
 
      REGISTER sip:[field0]@[remote_ip]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port]
      From: [field0] <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number];rport
      To: [field0] <sip:[field0]@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 2 REGISTER
      Contact: sip:[field0]@[local_ip]:[local_port]
      [field1]
      Content-Length: [len]
      Expires: 3600
    ]]>
  </send>
51Testing软件测试网IHa8y\y6{
  <recv response="100" ptional="true">
  </recv>

CH uDM v|0
  <!--   收到来自AST的200 ACK消息后,系统转至等待1000ms,或者可以直接去掉该设置 -->
51Testing软件测试网F5V*q;c(oHt V
  <recv response="200"  next="2">
  </recv>

H2mT+p/_ q0
  <label id="2"/>
  <pause milliseconds="1000"/>

dA|I9x6Yf/XV0
51Testing软件测试网m'm~k#d ~'W g
  <!-- Keep the call open for a while in case the 200 is lost to be     -->
  <!-- able to retransmit it if we receive the BYE again.               -->
  <pause milliseconds="4000"/>
  <!-- definition of the response time repartition table (unit is ms)   -->
51Testing软件测试网z$hXi)gQZf
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
51Testing软件测试网x,G~3M;}Ur4x3~+s
  <!-- definition of the call length repartition table (unit is ms)     -->

(p2N/K-~;@1\6B'\3d4s0
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
51Testing软件测试网Gu2F&n p0b
user.csv代码如下:
51Testing软件测试网9H#ULjkTC2A"Dd
SEQUENTIAL
50000;[authentication username50000 password=50000]
51Testing软件测试网 @^ v ?7tzC.RF]
51Testing软件测试网 ? x/W8yzoJa r5lh

S/o!\2O8?'?6a0
运行状态如下:
51Testing软件测试网 R(uC:o"Rr P
$ sipp -r 1 -i 192.168.0.101 -l 1 -sf branchc.xml -inf user.csv 192.168.0.20
Warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSI                                                                                                                ZE = 64
       Resolving remote host '192.168.0.20'... Done.
------------------------------ Scenario Screen -------- [1-9]: Change Screen --
  Call-rate(length)   Port   Total-time  Total-calls  Remote-host
   1.0(0 ms)/1.000s   5060     114.59 s           20  192.168.0.20:5060(UDP)
51Testing软件测试网#J"D w"YAQ+c2P
  0 new calls during 14.353 s period     0 ms scheduler resolution
  1 calls (limit 1)                      Peak was 1 calls, after 1 s
  0 Running, 0 Paused, 0 Woken up
  0 dead call msg (discarded)            1 out-of-call msg (discarded)
  3 open sockets
51Testing软件测试网-X!D2HM*g{fn9[
                                 Messages  Retrans   Timeout   Unexpected-Msg
    REGISTER ---------->         20        0         0
         100 <----------         0         0         0         0
         401 <----------         20        0         0         0
    REGISTER ---------->         20        0         0
         100 <----------         0         0         0         0
         200 <----------         20        0         0         0
       Pause [   1000ms]         20                            0
       Pause [   4000ms]         20                            0
------------------------------ Test Terminated --------------------------------
51Testing软件测试网5w5xv _ ne

3]J2ZeT0
----------------------------- Statistics Screen ------- [1-9]: Change Screen --
  Start Time             | 2013-07-20   09:55:08:618    1374285308.618236
  Last Reset Time        | 2013-07-20   09:56:48:874    1374285408.874967
  Current Time           | 2013-07-20   09:57:03:229    1374285423.229290
-------------------------+---------------------------+--------------------------
  Counter Name           | Periodic value            | Cumulative value
-------------------------+---------------------------+--------------------------
  Elapsed Time           | 00:00:14:354              | 00:01:54:611
  Call Rate              |    0.000 cps              |    0.175 cps
-------------------------+---------------------------+--------------------------
  Incoming call created  |        0                  |        0
  OutGoing call created  |        0                  |       20
  Total Call created     |                           |       20
  Current Call           |        1                  |
-------------------------+---------------------------+--------------------------
  Successful call        |        0                  |       19
  Failed call            |        0                  |        0
-------------------------+---------------------------+--------------------------
  Call Length            | 00:00:04:584              | 00:00:04:989
------------------------------ Test Terminated --------------------------------

,Hou+t.M;tK0
2013-07-20      09:56:49:417    1374285409.417536: Discarding message which can't be mapped to a known SIPp call:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.101:5060;branch=z9hG4bK-2568-20--1
From: 50000 <sip:50000@192.168.0.101:5060>;tag=20;rport
To: 50000 <sip:50000@192.168.0.20:5060>;tag=1ea81e666
Call-ID: 20-2568@192.168.0.101
CSeq: 3 BYE
User-Agent: ASG Switch
Contact: <sip:50000@192.168.0.20:5060>
Content-Length: 0
51Testing软件测试网#e!`3F?'n#_

rYN(J#d$F0

(kVz({\%YH0
无论做什么事情,只要坚持就一定会有收获的,只不过是时间的问题。
测试SIP协议的同志们可以加入群: 323827101,共同探讨哦!
群共享里可能会有你需要的资料!

ahX ^/x X cL0k%}0

`rH(~ z;cS L0

TAG: 认证注册 sipp SIPP 注册

测试之路 引用 删除 luoriver   /   2013-07-25 09:11:51
invite 成功了 ,正在调整语音流!能播放语音流就又成功了一大步,昨天晚上不能上网,晚上把脚本贴出来。
测试之路 引用 删除 luoriver   /   2013-07-23 22:43:11
最近INTVITING老是不成功!
 

评分:0

我来说两句

luoriver

luoriver

北漂一族,80后,计算机专业,从事SIP相关软件测试3年,热爱生活,崇尚运动。 爱看WWE、公开课。爱钻“牛角尖”,这就是我:luorivr!!!!!

日历

« 2024-04-19  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 345633
  • 日志数: 96
  • 图片数: 1
  • 建立时间: 2012-12-27
  • 更新时间: 2014-05-03

RSS订阅

Open Toolbar