You could try including
[authentication username=<your_username> password=<your_password>]
in your second REGISTER.

Have a look at the enclosed file. This scenario does not register, but sets up a call through a proxy that requires digest authorization.

Br, Dmitry

Nikolay Kondratyev wrote:

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="deec89ad22272700a0d17ac62b50101b",algorithm=MD5

I believe, correct authorization header should look like

Authorization: Digest username="3853",realm="pbxnsip.lab.nstel.ru",nonce="3d675a0e579d994f0fa1f1a968be6869",uri="sip:pbxnsip.lab.nstel.ru",response="7b38eb913257dd809a8e64bda03990c6",algorithm=MD5

So, can anybody please help me with sending correct authorization header?

Thanks in advance,

Nikolay.

------------------------------------------------------------------------

------------------------------------------------------------------------------
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
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">


<scenario name="Basic Sipstone UAC">

<send retrans="500">
<![CDATA[

INVITE sip:[servi...@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bK60331771
From: "08900017" <sip:08900...@[local_ip]:[local_port]>;tag=[call_number]
To: [service] <sip:[servi...@[remote_ip]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: sip:08900...@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len]

v=0
o=user1 53655765[call_number] 2353687637 IN IP4 [local_ip]
s=TestCall
c=IN IP4 [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 101
a=fmtp:101 0-15
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

]]>
</send>

<recv response="100" optional="true">
</recv>

<recv response="401" auth="true">
</recv>

<send>
<![CDATA[

ACK sip:[servi...@[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=z9hG4bK60331771
From: "08900017" <sip:08900...@[remote_ip]>;tag=[call_number]
To: <sip:[servi...@[remote_ip]>
Call-ID: [call_id]
CSeq: 1 ACK
Content-Length: 0

]]>
</send>

<send retrans="500">
<![CDATA[

INVITE sip:[servi...@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: "08900017" <sip:08900...@[local_ip]:[local_port]>;tag=[call_number]
To: [service] <sip:[servi...@[remote_ip]>
Call-ID: [call_id]
CSeq: 2 INVITE
Contact: sip:08900...@[local_ip]:[local_port]
[authentication username=08900017 password=test]
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len]

v=0
o=user1 53655765[call_number] 2353687637 IN IP4 [local_ip]
s=TestCall
c=IN IP4 [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 101
a=fmtp:101 0-15
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

]]>
</send>

<recv response="100" optional="true">
</recv>

<recv response="180" optional="true">
</recv>


<recv response="200">
</recv>

<send>
<![CDATA[

ACK sip:[servi...@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: "08900017" <sip:08900...@[local_ip]:[local_port]>;tag=[call_number]
To: [service] <sip:[servi...@[remote_ip]>
Call-ID: [call_id]
CSeq: 2 ACK
Contact: sip:08900...@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0

]]>
</send>

<!-- ALL DTMF Signals -->
<pause milliseconds="1000"/>

<!-- DIGIT 1 -->
<pause milliseconds="1000"/>
<nop>
<action>
<exec play_pcap_audio="/root/work/utils/sipp/pcap/send_dtmf1a.pcap"/>
</action>
</nop>
<!-- "*" - back to previos (level) -->
<pause milliseconds="1000"/>
<nop>
<action>
<exec play_pcap_audio="/root/work/utils/sipp/pcap/send_dtmf10a.pcap"/>
</action>
</nop>

<pause milliseconds="1000"/>
<send retrans="500">
<![CDATA[

BYE sip:[servi...@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: "08900017" <sip:08900...@[local_ip]:[local_port]>;tag=[call_number]
To: [service] <sip:[servi...@[remote_ip]>
Call-ID: [call_id]
CSeq: 3 BYE
Contact: sip:08900...@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0

]]>
</send>

<recv response="200" crlf="true">
</recv>

</scenario>

------------------------------------------------------------------------------
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

Reply via email to