网上关于SIPp的资料太少了

上一篇 / 下一篇  2013-07-13 18:27:39 / 个人分类:SIP

最近在研究SIPp,在网上看了好多资料,差不多都是转载的文章,自己研究好多天了,一个注册认证都还没有研究出来呢,第一次注册的时候成功,也返回了401,但第二次一直去注册,通过在服务器中抓包发现,注册认证那一块消息不正确。没有显示Authentication。郁闷ing。51Testing软件测试网bh l)bw R3tw(^z
51Testing软件测试网~mJ$M _0qAu#v
51Testing软件测试网;vy_"iRGU$X%R)J
注册脚本如下:51Testing软件测试网/N9b1y'pF1J"I

9eC(^;C&ra0<?xml version="1.0" encoding="ISO-8859-1" ?>
ZqjN'CL0<!DOCTYPE scenario SYSTEM "sipp.dtd">
wr7BjM6] U(]051Testing软件测试网 {g\$fGi5L$v X
<!-- This program is free software; you can redistribute it and/or      -->51Testing软件测试网xX XYK%J^
<!-- modify it under the terms of the GNU General Public License as     -->
rsvqG0ig.A0<!-- published by the Free Software Foundation; either version 2 of the -->51Testing软件测试网,q-`5z*KZ!]
<!-- License, or (at your option) any later version.                    -->51Testing软件测试网)b^&~0Xv
<!--                                                                    -->
#r"x#yPXjm:jQ0<!-- This program is distributed in the hope that it will be useful,    -->
V }p+N5r-FL0<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
!dq/h.MF EcQ4~ tiD0<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
(D[oi/`z&i0<!-- GNU General Public License for more details.                       -->51Testing软件测试网UZQW.|L
<!--                                                                    -->
0~/s H%\k PN5vBD6B0<!-- You should have received a copy of the GNU General Public License  -->51Testing软件测试网1sXzA w\9L Tj
<!-- along with this program; if not, write to the                      -->51Testing软件测试网1wU:Sb@k$E
<!-- Free Software Foundation, Inc.,                                    -->
'fB$y!X o9\-B0<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->51Testing软件测试网X4a AL@D C1w2[
<!--                                                                    -->
{.L DL.dV,P!t0<!--                 Sipp default 'branchc' scenario.                   -->
-r D zlZg]p0<!--                                                                    -->51Testing软件测试网Y_ \\n)IB]
51Testing软件测试网+vQa.vhl]
<scenario name="branch_client">51Testing软件测试网Gw\mFV
  <send retrans="500">
`Gx\:@2puZ2H0    <![CDATA[51Testing软件测试网Gg6|a5e`vk

:x D/ji$I9|1e3E0      REGISTER sip:172.161.10.21 SIP/2.0
)oP/j$h;ZCj0      Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch];51Testing软件测试网q5umr x
      Max-Forwards: 70
!F:~.bw/ge]0      From: 50000<sip:50000@[local_ip]>;tag=[call_number]
CKwZL}&W4d)F0      To: 50000<sip:50000@172.161.10.21>51Testing软件测试网.`*H,\)zy9]pC+Y"h.a
      Call-ID: [call_id]
G0W qc8P cf+h6i0      CSeq: 10000 REGISTER
6ao U|o0      Contact: sip:50000@[local_ip]:[local_port]
#as}9ZcCE g0      Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, OPTIONS, REFER, MESSAGE, INFO51Testing软件测试网^G3G#?J"|
      Expires: 6451Testing软件测试网@7H W-xVYiA?6j
      User-Agent: Zed-3-SVP51Testing软件测试网&b1_8^%o'aiR
      Content-Length: [len]51Testing软件测试网 ^ |D| BtX
     
;A[j8J2S6L051Testing软件测试网&^G7Il'v&xUJ/TJ6C
    ]]>51Testing软件测试网}M)H v*dH#bIv7m
  </send>51Testing软件测试网Ek$J Nv%x[jV
51Testing软件测试网&Mi s-z` LlL
  <recv response="401" auth="true" rtd="true" ptional="true" next="3">51Testing软件测试网5T*{7_2JGuI`v
  </recv>
$fSc]2U.D:k!h;wdp0
$p,|Qx(U2UC_0  <recv response="200" rtd="true" >
f!W6S(v;r-_#y? F0  </recv>                              51Testing软件测试网R8h2Gfx)\/_l u

'["bFl J%Q0
/u Rq(v|1w:tC @0<!-- simple case - just jump over a line   -->51Testing软件测试网9lh.a/]9t,yPGL
51Testing软件测试网+Dli/RR,g'V@k

lx%I@y8IW(F X0 
f?$hi!zJ'\ RZ+L0<label id="3"/>51Testing软件测试网'nT'Mv)TlXD
 <send retrans="500">
C L J J[9D!E+k!q0    <![CDATA[
a:`f UG2z051Testing软件测试网"`5Bs2D4i'v1{&K
      REGISTER sip:172.161.10.21 SIP/2.0
2UEL"j5|u0      Via: SIP/2.0/UDP  [local_ip]:[local_port];branch=[branch];
nX"GF/F3Y]Q0      Max-Forwards: 7051Testing软件测试网 H2{z@a R0w nn.v
      From: 50000<sip:50000@172.161.10.21>;tag=[call_number]
R+x;@ i~8BnRb0      To: 50000<sip:50000@172.161.10.21>
`"V{YR5w }g0      Call-ID: [call_id]51Testing软件测试网A{A4E Wq*L!E$X
      CSeq: 10001 REGISTER51Testing软件测试网&ZY:s ^+LJt T:~7`
      Contact: <sip:50000@[local_ip]:[local_port]>
UzYn3e6@}9S0     [authentication username=50000 password=50000]51Testing软件测试网+Ic1U'ur'p
      Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, OPTIONS, REFER, MESSAGE, INFO51Testing软件测试网El3k9am6Z;b E/@
      Expires: 64
ft|+`v0nE0      User-Agent: Zed-3-SVP51Testing软件测试网7W*Qht_ di
      Content-Length:[len]51Testing软件测试网b[Ab0rKtD%J
51Testing软件测试网a2`#QRTtK'e/N
    ]]>51Testing软件测试网HW q'E/lW%p%ch sA
  </send>51Testing软件测试网)hw-tv:k }!_/rW
 51Testing软件测试网 `1^j*vw8yi.lC-l
   <recv response="200"  rtd="true" next="2">
3VI/A0f*j$f*P0   </recv>51Testing软件测试网;S8E{3U)~:} Dv'~4x,x
51Testing软件测试网Nu3jK$IG"Wmtv
51Testing软件测试网lzNc(v
51Testing软件测试网+Tt/~5Q aV1pz
<label id="2"/>
8C I&Hi.jf051Testing软件测试网c]l Q(`.vz9B;RZl6_N
<pause milliseconds="1000"/>51Testing软件测试网l4Uj wb KA$v9Yn)c
51Testing软件测试网vw:EHNU;[v7I _WO

N&a6s+Z8P0  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
:UA\&WO @0
g3d?f+Q!k:j0  <!-- definition of the call length repartition table (unit is ms)     -->51Testing软件测试网&}8VFt [
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>51Testing软件测试网 XK;LMQ
51Testing软件测试网le-Y!RAi;vI'@`-s

7vE\)H.vg0
Z|+C,d M0?fh k0 51Testing软件测试网 F7z%SmfU-ZB
</scenario>
51Testing软件测试网h_Ba4a'HYa[2XZ

D-Oc9Ae_})L051Testing软件测试网l!z'Qih|3t
$ sipp -sf branchc.xml -i 172.161.10.140 -p 10489 -m 1 -trace_msg -aa 172.161.10 .21:506051Testing软件测试网6y3@$DD*c-zP9?)g9z)g
Warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE = 64
` y,g} E+p:np0       Resolving remote host '172.161.10.21'... Done.
j+^Z:YtP2o0------------------------------ Scenario Screen -------- [1-9]: Change Screen --51Testing软件测试网({K@!m#PR;FS0e
  Call-rate(length)   Port   Total-time  Total-calls  Remote-host51Testing软件测试网5N;r;V4P @%T^ G_~
  10.0(0 ms)/1.000s   10489     10.76 s            1  172.161.10.21:5060(UDP)
3e)D(~bW+OL `051Testing软件测试网*S ^K-Gh&I
  Call limit reached (-m 1), 0.594 s period  1 ms scheduler resolution
y#nt i&Z2u R^0  1 calls (limit 30)                     Peak was 1 calls, after 0 s51Testing软件测试网7w,q~` PD
  0 Running, 3 Paused, 1 Woken up
Z+wZ0R#j ^;q;rz~0  0 dead call msg (discarded)            0 out-of-call msg (discarded)51Testing软件测试网.XscN }:I'LY6j L6V]
  3 open sockets51Testing软件测试网3@eI4^ [;cS
51Testing软件测试网x9W6l NYuz3O
                                 Messages  Retrans   Timeout   Unexpected-Msg
"\`-p;V ZV5Fam?0    REGISTER ---------->         1         0         0
2`H/P6k.yE!r:`/`0F0         401 <----------  E-RTD1 1         0         0         0
9z,Q7O!{H @2x0         200 <----------  E-RTD1 0         0         0         0
6^0m xkp_1E0    REGISTER ---------->         1         4         0
:C\4g,]C"K*|h'h0         200 <----------  E-RTD1 0         0         0         051Testing软件测试网E6h^4bjJ)|b
       Pause [   1000ms]         0                             051Testing软件测试网 T ?&`:T7W r&?2x4n
------------------------------ Test Terminated------------------51Testing软件测试网6Sr@"w R*K;U _,F

0gA5?ZTdy051Testing软件测试网X5[:j?n E v#`;{q
----------------- Statistics Screen ------- [1-9]:Change Screen51Testing软件测试网3l*?!z fnd%D
  Start Time        | 2013-07-16   15:18:52:000 1373959132.000000                                        51Testing软件测试网+Wqd,q|v.w,| B7v|A
  Last Reset Time        | 2013-07-16   15:19:02:187    1373959142.187500                                         51Testing软件测试网^y8|7T4hn/g)k6~
  Current Time           | 2013-07-16   15:19:02:781    1373959142.781250                                                                                                                                 
Jq0L0LRcb0-------------------------+---------------------------+---------
Fc0BH5dio0g0  Counter Name           | Periodic value            | Cumulative value51Testing软件测试网 k2J5~Id/i4Y&b+V
-------------------------+---------------------------+----------
%`7C1?(|'XB,^0  Elapsed Time           | 00:00:00:593              | 00:00:10:78151Testing软件测试网,I VB.uqFsiH8D
  Call Rate              |    0.000 cps              |    0.093 cps51Testing软件测试网e_g.F"R
-------------------------+---------------------------+----------
B}? Q { F0  Incoming call created  |        0                  |        051Testing软件测试网:d`\Q;j}`}#{J&^V
  OutGoing call created  |        0                  |        1
lT:J-CZ9j9i5h0       Total Call created     |                           |        151Testing软件测试网LZ3a?0|%x J;V3Mcv
          Current Call           |        1                  |51Testing软件测试网"BT]w8e0D
-------------------------+---------------------------+--------------------------51Testing软件测试网%E?}2S|jac oa]
       Successful call        |        0                  |        0
5D c"hTU&N0         Failed call            |        0                  |        0
|$a$l^(G]'O9] aY0-------------------------+---------------------------+----------
Z$`|:s8`3I:p6A0  Response Time 1        | 00:00:00:000              | 00:00:00:04651Testing软件测试网1\&\"Q+plOp
  Call Length            | 00:00:00:000              | 00:00:00:00051Testing软件测试网0w9w4H*D9Nm3BQ
------------------------------ Test Terminated-----------------51Testing软件测试网%cd qWgI&Z

kU{Z*]2p\051Testing软件测试网a C"eUE Z4`leO;K

]4{3tY%Tf0

nCT+F/\Ed/x2|0
cygwin注册时显示:
[truncated] Contact: <sip:50000@172.161.10.140:10489>\r\n  Authorization: Digest username="1001",realm="ASG Switch",uri="sip:172.161.10.21:5060",nonce="542051ee",response="c8bf4cd353adb48f85fb9ee56d58c565",algorithm=MD5\r\n  Allow: INVITE,
51Testing软件测试网 c$e(P4b(hr"C qd0W
而正常信息是:
Authorization: Digest username="50000",realm="ASG Switch",nonce="765f1f52",uri="sip:172.161.10.21",response="ddda48fc6c2da0b043260bb2ddd62953",algorithm=MD5

1q$zv*VP"Rj0
并且注册的消息中添加很多地方添加了“\r\n”;是否和SIPp版本有关系呢,我现在用的是最新版本 SIPp v3.3-TLS-PCAP。
 
对了,有兴趣的童鞋可以加测试SIP QQ群323827101或我QQ402007353 ,大家一起研究研究。

TAG:

测试之路 引用 删除 luoriver   /   2013-07-20 10:01:18
经过10天的挣扎,终于成功了第一步,注册。
测试之路 引用 删除 luoriver   /   2013-07-18 22:39:16
8天了,还没有搞出来。但配置文件真心没有错误啊
测试之路 引用 删除 luoriver   /   2013-07-15 18:15:15
研究过SIPP的请答复我,卡在这了!!
 

评分:0

我来说两句

luoriver

luoriver

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

日历

« 2024-04-23  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

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

RSS订阅

Open Toolbar