网上关于SIPp的资料太少了

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

最近在研究SIPp,在网上看了好多资料,差不多都是转载的文章,自己研究好多天了,一个注册认证都还没有研究出来呢,第一次注册的时候成功,也返回了401,但第二次一直去注册,通过在服务器中抓包发现,注册认证那一块消息不正确。没有显示Authentication。郁闷ing。
&W#l"Y,lWIP0
wxqD/y%u$V0
:SopF@/N5]+s$A;O0注册脚本如下:
H2K~i}`0d[7m051Testing软件测试网M k au8UrP8y?W
<?xml version="1.0" encoding="ISO-8859-1" ?>
?ld3qg0<!DOCTYPE scenario SYSTEM "sipp.dtd">
a'^&FN,z7W0KX&Aq0
*l z,XP D k$^&g"si.C0<!-- This program is free software; you can redistribute it and/or      -->
's}RGd@0<!-- modify it under the terms of the GNU General Public License as     -->51Testing软件测试网Xv/q.~3i`V
<!-- published by the Free Software Foundation; either version 2 of the -->51Testing软件测试网M6k$R8z`iwu
<!-- License, or (at your option) any later version.                    -->
+B3ob}Z:~H io0<!--                                                                    -->51Testing软件测试网J oG)d&p3T8DT
<!-- This program is distributed in the hope that it will be useful,    -->
p)? ^| X&zf&h T xV0<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
Ra+aJ5a-Z0<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
3@-?0W4xMx.\?0<!-- GNU General Public License for more details.                       -->51Testing软件测试网T [+AqH
<!--                                                                    -->
/^ P1j.GL.y2k0<!-- You should have received a copy of the GNU General Public License  -->
ZEhm/]3|{^n0<!-- along with this program; if not, write to the                      -->
M{#Cx B1[ti0<!-- Free Software Foundation, Inc.,                                    -->
Zp)Y[ z'E,["a ?!b0<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->51Testing软件测试网nl~ bJ8S8a;aQk!N%y
<!--                                                                    -->51Testing软件测试网)||'|J&Ss.@ v
<!--                 Sipp default 'branchc' scenario.                   -->
|8CV6L"R'V7R0<!--                                                                    -->
0\&CQ2n-f}#[0
f#^*v&J??+T0<scenario name="branch_client">51Testing软件测试网^9y\+vVvL
  <send retrans="500">51Testing软件测试网j8G^ ^/L
    <![CDATA[51Testing软件测试网]nq7D }8FB!l

|BK.e8wyFTEqV0      REGISTER sip:172.161.10.21 SIP/2.0
V'i T|X.u0      Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch];
C v7t/r([hXs0      Max-Forwards: 70
(`8xD7?!p0      From: 50000<sip:50000@[local_ip]>;tag=[call_number]
|;@Oq4~ Z?-v wX0      To: 50000<sip:50000@172.161.10.21>51Testing软件测试网Z&vK e+L]F z
      Call-ID: [call_id]51Testing软件测试网1ND5o4n VMXd
      CSeq: 10000 REGISTER51Testing软件测试网m{)H+G.l7_sKs:v,?
      Contact: sip:50000@[local_ip]:[local_port]51Testing软件测试网 Wc8fo$[%m C5T9u E
      Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, OPTIONS, REFER, MESSAGE, INFO
5q5`.rG2u9l+G0      Expires: 6451Testing软件测试网0C.B-@]:_X!y
      User-Agent: Zed-3-SVP
}dY^-]0      Content-Length: [len]51Testing软件测试网Z!xU6`"V%c ^2Ta
     51Testing软件测试网M#bCH ty J4s8I

Q Vh S2W'|u$c0    ]]>
@X{X/~@.Ez0  </send>
4yZOQi+G8f:^A0
3_ x r6J-P0  <recv response="401" auth="true" rtd="true" ptional="true" next="3">51Testing软件测试网JVA0z |&? z.X
  </recv>
0nL0g5pm-Q4P051Testing软件测试网FnX dz#T+V A
  <recv response="200" rtd="true" >51Testing软件测试网 ]$G$}xo'_.[
  </recv>                              
C+d&~b"\@xR0
9L;nO9}iv051Testing软件测试网G~,lMI*D+ps
<!-- simple case - just jump over a line   -->51Testing软件测试网f!~/_uJc
51Testing软件测试网G:D ?G9R y8cV
51Testing软件测试网[T'vk)X]m`'K
 
? B.~n%G!KI0<label id="3"/>51Testing软件测试网&\:ROL`_
 <send retrans="500">
%W{_#OP0    <![CDATA[51Testing软件测试网2\h%dQ&V)n8W4t C
51Testing软件测试网 V LJ/? g e~.pw
      REGISTER sip:172.161.10.21 SIP/2.051Testing软件测试网nG&CjW }bc&y
      Via: SIP/2.0/UDP  [local_ip]:[local_port];branch=[branch];51Testing软件测试网}2Wm2c9K rm9dN
      Max-Forwards: 7051Testing软件测试网B'Kixi%kS,q
      From: 50000<sip:50000@172.161.10.21>;tag=[call_number]51Testing软件测试网F m pF/OW\R
      To: 50000<sip:50000@172.161.10.21>
JC;N Riy0      Call-ID: [call_id]51Testing软件测试网X%f+ynpk
      CSeq: 10001 REGISTER
}4f#_7fob_a0      Contact: <sip:50000@[local_ip]:[local_port]>51Testing软件测试网 Wf?'vT1u8l|
     [authentication username=50000 password=50000]51Testing软件测试网;@^-N/i*h$b
      Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, OPTIONS, REFER, MESSAGE, INFO51Testing软件测试网XXQ'_0qu)W9yB
      Expires: 64
/k8ktE$N5nY0      User-Agent: Zed-3-SVP
0}+qV:mCq0?0      Content-Length:[len]
l`mW(N051Testing软件测试网n%suLA+Z
    ]]>
t([ C`/x^%a r4@H q0  </send>
-n#P{1a,H8B.Mu0 
4cSCh9w _r#Ms0   <recv response="200"  rtd="true" next="2">
I3y6aT[u+_0   </recv>51Testing软件测试网8H _RHuMS6xZ3L
51Testing软件测试网 Y%_M0GL

Y;Y'~|9Rxp-|M[0
1Ifv?G S6vIqO0<label id="2"/>
bk"o?(_1T%P7al9r{051Testing软件测试网4bG0i nuoo H
<pause milliseconds="1000"/>51Testing软件测试网~6Ai9pS.D4@;?p(Uf

g!Q2^H.K3b!bM8c051Testing软件测试网|0j A0?:K/E
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>51Testing软件测试网#n.KD!s["x.cT
51Testing软件测试网_CJ0? [ i G
  <!-- definition of the call length repartition table (unit is ms)     -->
!\;xE+@Dp5vI0f} W0  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
F^1a+J&|n0
2x{qJ6FkZ0
!H'O W Xr0
X }/s(Q [|0 51Testing软件测试网1C3vb/x;Wc
</scenario>
51Testing软件测试网 W3Fe+dh:g1r AhC
51Testing软件测试网]f(U%by#cx
51Testing软件测试网:R/ze8F&P2@W9e
$ sipp -sf branchc.xml -i 172.161.10.140 -p 10489 -m 1 -trace_msg -aa 172.161.10 .21:506051Testing软件测试网1K'e/W-Z&v
Warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE = 6451Testing软件测试网)eK~0Vr$xu.C%~Bi.l+r
       Resolving remote host '172.161.10.21'... Done.51Testing软件测试网|~7s1_T.L
------------------------------ Scenario Screen -------- [1-9]: Change Screen --51Testing软件测试网 ]!u~"U_w E
  Call-rate(length)   Port   Total-time  Total-calls  Remote-host51Testing软件测试网6VE6l3h^
  10.0(0 ms)/1.000s   10489     10.76 s            1  172.161.10.21:5060(UDP)51Testing软件测试网*gi-Q N({"xs#M

k UD i4` N3G0  Call limit reached (-m 1), 0.594 s period  1 ms scheduler resolution51Testing软件测试网` @#i ww K
  1 calls (limit 30)                     Peak was 1 calls, after 0 s
]2ZNh$w$D7U)C0  0 Running, 3 Paused, 1 Woken up51Testing软件测试网^5?6W I?0\)h
  0 dead call msg (discarded)            0 out-of-call msg (discarded)51Testing软件测试网'sE*[/],{2rb E
  3 open sockets51Testing软件测试网7G'Q*_3u!C
51Testing软件测试网%r9ZC&Z7g6O%|
                                 Messages  Retrans   Timeout   Unexpected-Msg51Testing软件测试网1PsGPk\9x
    REGISTER ---------->         1         0         0
JE_T,c v t%w0         401 <----------  E-RTD1 1         0         0         0
$N-k']J`!wt5eqW0         200 <----------  E-RTD1 0         0         0         0
I#E)?e.s-Wl0    REGISTER ---------->         1         4         051Testing软件测试网f#E`#T%c z
         200 <----------  E-RTD1 0         0         0         0
8p-^'wg^1j0       Pause [   1000ms]         0                             0
Qx'v2E,qj"ci0------------------------------ Test Terminated------------------51Testing软件测试网]9mz ]Z$p N
51Testing软件测试网.l M^Q Hp1?H]

fZ1I M/Pd,Z3{ Z0----------------- Statistics Screen ------- [1-9]:Change Screen51Testing软件测试网#\DJ3M0]?!kd4k,\v
  Start Time        | 2013-07-16   15:18:52:000 1373959132.000000                                        51Testing软件测试网7fg3y,m)rO6a#G%O&C
  Last Reset Time        | 2013-07-16   15:19:02:187    1373959142.187500                                         
])o;z$`U'l4E0  Current Time           | 2013-07-16   15:19:02:781    1373959142.781250                                                                                                                                 
ao:R/}&c0-------------------------+---------------------------+---------
j$i+E2a/} m v0  Counter Name           | Periodic value            | Cumulative value
Z&j j}.Q0-------------------------+---------------------------+----------
1d&pOH} P0  Elapsed Time           | 00:00:00:593              | 00:00:10:78151Testing软件测试网 t4vypE8E
  Call Rate              |    0.000 cps              |    0.093 cps
'{(K8u;Is2on0-------------------------+---------------------------+----------51Testing软件测试网#D*h4t nF\N(x&`'y!m
  Incoming call created  |        0                  |        051Testing软件测试网:O!Y"wp:xws4A.s*\M
  OutGoing call created  |        0                  |        151Testing软件测试网4N)^CK$^7E
       Total Call created     |                           |        1
%Vk&fb]Ou8O8Pw0          Current Call           |        1                  |
\yT`d!mqQD0-------------------------+---------------------------+--------------------------
$[:e WjNw k&n)V_0       Successful call        |        0                  |        051Testing软件测试网"vcz%X^-^
         Failed call            |        0                  |        051Testing软件测试网 p%j [VX2A6[
-------------------------+---------------------------+----------51Testing软件测试网4U` Q o NJR u2YZGv
  Response Time 1        | 00:00:00:000              | 00:00:00:046
:E!{:y&G5Ev iY@e0  Call Length            | 00:00:00:000              | 00:00:00:000
ZMEW*G8A0------------------------------ Test Terminated-----------------
+{Pg;j c9VO%{!E051Testing软件测试网1Tj:};|7]c^
51Testing软件测试网0i(IM7T(t-B$F x
51Testing软件测试网 z N q&^:rt
51Testing软件测试网%a"C v-v!r I @
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,

pP%u*opB5s(a$S)j0
而正常信息是:
Authorization: Digest username="50000",realm="ASG Switch",nonce="765f1f52",uri="sip:172.161.10.21",response="ddda48fc6c2da0b043260bb2ddd62953",algorithm=MD5
51Testing软件测试网m5Fa `|
并且注册的消息中添加很多地方添加了“\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-05-05  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

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

RSS订阅

Open Toolbar