Hi all,
I'm new to sipp and trying to create a scenario for registration with digest
authorization.
Looks like I need some help with it.
I'm using sipx 3.10 as proxy/registrar.
Sipp version:
[k...@localhost sipp]$ sipp -v
SIPp v3.1-TLS-PCAP, version unknown, built Jul 6 2008, 09:56:05.
I created the following scenario:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="register_client">
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[fiel...@[field1]>;tag=[call_number]
To: <sip:[fiel...@[field1]>
Call-ID: [call_id]
CSeq: 1 REGISTER
Contact: sip:[fiel...@[local_ip]:[local_port]
Max-Forwards: 5
Expires: 1800
User-Agent: SIPp/Linux
Content-Length: 0
]]>
</send>
<recv response="401" auth="true">
</recv>
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[fiel...@[field1]>;tag=[call_number]
To: <sip:[fiel...@[field1]>
Call-ID: [call_id]
CSeq: 2 REGISTER
Contact: sip:[fiel...@[local_ip]:[local_port]
[field2]
Max-Forwards: 5
Expires: 1800
User-Agent: SIPp/Linux
Content-Length: 0
]]>
</send>
<recv response="200">
</recv>
</scenario>
The following csv file:
SEQUENTIAL
3853;sipx4.lab.nstel.ru;[authentication username=3853 password=3853];
3808;sipx4.lab.nstel.ru;[authentication username=3808 password=3808];
And when I start this scenario :
sipp -sf register_client.xml -inf register_client.csv -i 172.23.11.94
sipx4.lab.nstel.ru
I got the following message flow:
|Time | 172.23.11.94 | 172.23.12.104 |
|1,995 | Request: REGISTER s |SIP: Request: REGISTER
sip:172.23.12.104
| |(5060) ------------------> (5060) |
|2,000 | Status: 401 Unautho |SIP: Status: 401
Unauthorized (0 bindings)
| |(5060) <------------------ (5060) |
|2,000 | Request: REGISTER s |SIP: Request: REGISTER
sip:172.23.12.104
| |(5060) ------------------> (5060) |
|2,005 | Status: 401 Unautho |SIP: Status: 401
Unauthorized (0 bindings)
| |(5060) <------------------ (5060) |
|2,005 | Request: BYE sip:38 |SIP: Request: BYE
sip:[email protected]
| |(5060) ------------------> (5060) |
|2,034 | Status: 481 Transac |SIP: Status: 481
Transaction Does Not Exist
| |(5060) <------------------ (5060) |
The trace in text format is attached.
I think that the problem is in Authorization header of the second Register
message, which looks to be wrong:
Authorization:
,nonce="7c955a589d291cd3b430e4dcdbf1612c496d9ce9",response="deec89ad22272700
a0d17ac62b50101b",algorithm=MD5
I believe, correct authorization header should look like
Authorization: Digest
username="3853",realm="pbxnsip.lab.nstel.ru",nonce="3d675a0e579d994f0fa1f1a9
68be6869",uri="sip:pbxnsip.lab.nstel.ru",response="7b38eb913257dd809a8e64bda
03990c6",algorithm=MD5
So, can anybody please help me with sending correct authorization header?
Thanks in advance,
Nikolay.
No. Time Source Destination Protocol
Info
4 11:06:01.773225 172.23.11.94 172.23.12.104 SIP
Request: REGISTER sip:172.23.12.104
Frame 4 (378 bytes on wire, 378 bytes captured)
Ethernet II, Src: AlliedTe_22:9b:4a (00:00:cd:22:9b:4a), Dst: Ibm_12:c3:d9
(00:1a:64:12:c3:d9)
Internet Protocol, Src: 172.23.11.94 (172.23.11.94), Dst: 172.23.12.104
(172.23.12.104)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: REGISTER sip:172.23.12.104 SIP/2.0
Method: REGISTER
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 172.23.11.94:5060;branch=z9hG4bK-3603-1-0
Transport: UDP
Sent-by Address: 172.23.11.94
Sent-by port: 5060
Branch: z9hG4bK-3603-1-0
From: <sip:[email protected]>;tag=1
SIP from address: sip:[email protected]
SIP tag: 1
To: <sip:[email protected]>
SIP to address: sip:[email protected]
Call-ID: [email protected]
CSeq: 1 REGISTER
Sequence Number: 1
Method: REGISTER
Contact: sip:[email protected]:5060
Contact Binding: sip:[email protected]:5060
URI: sip:[email protected]:5060\r
SIP contact address: sip:[email protected]:5060\r
Max-Forwards: 5
Expires: 1800
User-Agent: SIPp/Linux
Content-Length: 0
No. Time Source Destination Protocol
Info
5 11:06:01.777825 172.23.12.104 172.23.11.94 SIP
Status: 401 Unauthorized (0 bindings)
Frame 5 (570 bytes on wire, 570 bytes captured)
Ethernet II, Src: Ibm_12:c3:d9 (00:1a:64:12:c3:d9), Dst: AlliedTe_22:9b:4a
(00:00:cd:22:9b:4a)
Internet Protocol, Src: 172.23.12.104 (172.23.12.104), Dst: 172.23.11.94
(172.23.11.94)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 401 Unauthorized
Status-Code: 401
[Resent Packet: False]
Message Header
From: <sip:[email protected]>;tag=1
SIP from address: sip:[email protected]
SIP tag: 1
To: <sip:[email protected]>
SIP to address: sip:[email protected]
Call-Id: [email protected]
Cseq: 1 REGISTER
Sequence Number: 1
Method: REGISTER
Via: SIP/2.0/UDP 172.23.11.94:5060;branch=z9hG4bK-3603-1-0
Transport: UDP
Sent-by Address: 172.23.11.94
Sent-by port: 5060
Branch: z9hG4bK-3603-1-0
Www-Authenticate: Digest realm="lab.nstel.ru",
nonce="7c955a589d291cd3b430e4dcdbf1612c496d9ce9"
Authentication Scheme: Digest
Realm: "lab.nstel.ru"
Nonce Value: "7c955a589d291cd3b430e4dcdbf1612c496d9ce9"
User-Agent: sipXecs/3.10.2 sipXecs/registry (Linux)
Date: Wed, 14 Jan 2009 08:06:01 GMT
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, REGISTER, SUBSCRIBE
Accept-Language: en
Supported: gruu
Content-Length: 0
No. Time Source Destination Protocol
Info
6 11:06:01.778606 172.23.11.94 172.23.12.104 SIP
Request: REGISTER sip:172.23.12.104[Malformed Packet]
Frame 6 (502 bytes on wire, 502 bytes captured)
Ethernet II, Src: AlliedTe_22:9b:4a (00:00:cd:22:9b:4a), Dst: Ibm_12:c3:d9
(00:1a:64:12:c3:d9)
Internet Protocol, Src: 172.23.11.94 (172.23.11.94), Dst: 172.23.12.104
(172.23.12.104)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: REGISTER sip:172.23.12.104 SIP/2.0
Method: REGISTER
Message Header
Via: SIP/2.0/UDP 172.23.11.94:5060;branch=z9hG4bK-3603-1-2
Transport: UDP
Sent-by Address: 172.23.11.94
Sent-by port: 5060
Branch: z9hG4bK-3603-1-2
From: <sip:[email protected]>;tag=1
SIP from address: sip:[email protected]
SIP tag: 1
To: <sip:[email protected]>
SIP to address: sip:[email protected]
Call-ID: [email protected]
CSeq: 2 REGISTER
Sequence Number: 2
Method: REGISTER
Contact: sip:[email protected]:5060
Contact Binding: sip:[email protected]:5060
URI: sip:[email protected]:5060\r
SIP contact address: sip:[email protected]:5060\r
Authorization:
,nonce="7c955a589d291cd3b430e4dcdbf1612c496d9ce9",response="deec89ad22272700a0d17ac62b50101b",algorithm=MD5
[Malformed Packet: SIP]
No. Time Source Destination Protocol
Info
7 11:06:01.782921 172.23.12.104 172.23.11.94 SIP
Status: 401 Unauthorized (0 bindings)
Frame 7 (570 bytes on wire, 570 bytes captured)
Ethernet II, Src: Ibm_12:c3:d9 (00:1a:64:12:c3:d9), Dst: AlliedTe_22:9b:4a
(00:00:cd:22:9b:4a)
Internet Protocol, Src: 172.23.12.104 (172.23.12.104), Dst: 172.23.11.94
(172.23.11.94)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 401 Unauthorized
Status-Code: 401
[Resent Packet: False]
Message Header
From: <sip:[email protected]>;tag=1
SIP from address: sip:[email protected]
SIP tag: 1
To: <sip:[email protected]>
SIP to address: sip:[email protected]
Call-Id: [email protected]
Cseq: 2 REGISTER
Sequence Number: 2
Method: REGISTER
Via: SIP/2.0/UDP 172.23.11.94:5060;branch=z9hG4bK-3603-1-2
Transport: UDP
Sent-by Address: 172.23.11.94
Sent-by port: 5060
Branch: z9hG4bK-3603-1-2
Www-Authenticate: Digest realm="lab.nstel.ru",
nonce="7c955a589d291cd3b430e4dcdbf1612c496d9ce9"
Authentication Scheme: Digest
Realm: "lab.nstel.ru"
Nonce Value: "7c955a589d291cd3b430e4dcdbf1612c496d9ce9"
User-Agent: sipXecs/3.10.2 sipXecs/registry (Linux)
Date: Wed, 14 Jan 2009 08:06:01 GMT
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, REGISTER, SUBSCRIBE
Accept-Language: en
Supported: gruu
Content-Length: 0
No. Time Source Destination Protocol
Info
8 11:06:01.783542 172.23.11.94 172.23.12.104 SIP
Request: BYE sip:[email protected]
Frame 8 (357 bytes on wire, 357 bytes captured)
Ethernet II, Src: AlliedTe_22:9b:4a (00:00:cd:22:9b:4a), Dst: Ibm_12:c3:d9
(00:1a:64:12:c3:d9)
Internet Protocol, Src: 172.23.11.94 (172.23.11.94), Dst: 172.23.12.104
(172.23.12.104)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Request-Line: BYE sip:[email protected] SIP/2.0
Method: BYE
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 172.23.11.94:5060;branch=z9hG4bK-3603-1--1
Transport: UDP
Sent-by Address: 172.23.11.94
Sent-by port: 5060
Branch: z9hG4bK-3603-1--1
From: <sip:[email protected]>;tag=1
SIP from address: sip:[email protected]
SIP tag: 1
To: <sip:[email protected]>
SIP to address: sip:[email protected]
Call-ID: [email protected]
CSeq: 3 BYE
Sequence Number: 3
Method: BYE
Max-Forwards: 70
Contact: <sip:[email protected]:5060;transport=UDP>
Contact Binding: <sip:[email protected]:5060;transport=UDP>
URI: <sip:[email protected]:5060;transport=UDP>
SIP contact address: sip:[email protected]:5060
Content-Length: 0
No. Time Source Destination Protocol
Info
15 11:06:01.811843 172.23.12.104 172.23.11.94 SIP
Status: 481 Transaction Does Not Exist
Frame 15 (499 bytes on wire, 499 bytes captured)
Ethernet II, Src: Ibm_12:c3:d9 (00:1a:64:12:c3:d9), Dst: AlliedTe_22:9b:4a
(00:00:cd:22:9b:4a)
Internet Protocol, Src: 172.23.12.104 (172.23.12.104), Dst: 172.23.11.94
(172.23.11.94)
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 481 Transaction Does Not Exist
Status-Code: 481
[Resent Packet: False]
Message Header
From: <sip:[email protected]>;tag=1
SIP from address: sip:[email protected]
SIP tag: 1
To: <sip:[email protected]>
SIP to address: sip:[email protected]
Call-Id: [email protected]
Cseq: 3 BYE
Sequence Number: 3
Method: BYE
Via: SIP/2.0/UDP 172.23.11.94:5060;branch=z9hG4bK-3603-1--1
Transport: UDP
Sent-by Address: 172.23.11.94
Sent-by port: 5060
Branch: z9hG4bK-3603-1--1
Date: Wed, 14 Jan 2009 08:06:01 GMT
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY
User-Agent: sipXecs/3.10.2 sipXecs/vxml (Linux)
Accept-Language: en
Supported: sip-cc, sip-cc-01, replaces, replaces
Content-Length: 0
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users