This scenario works with sipp v1.1.
Maybe with newer versions as well.
However, there have been reports that sipp v3 cannot register. I dont know if that is true. If you use sippv3 you could try an older one.

Br, Dmitry

Nikolay Kondratyev wrote:

Dmitry,

Thanks for the reply.

As far as I understand from the manual, including [field2] is the same as including [authentication username=3853 password=3853]…. Is that true?

I also tried including [authentication username=3853 password=3853] directly, instead of including it from a csv file.

But alas, the second Register still contains incomplete Authorization header:

Authorization: ,nonce="0769acd81e2821f41cf5103c0668da82496dbc54",response="bff0efb69c5d26b0d18516e50288c705",algorithm=MD5

This syntax does not work for me...

Could it be something wrong with my sipp installation? I installed sipp using yum from a standard repository…

Is there an error in my scenario below?

Could somebody give me a working example of registration scenario or try my scenario?

Thanks and regards,

Nikolay.

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

*From:* Dmitry Goncharov [mailto:[email protected]]
*Sent:* Wednesday, January 14, 2009 1:09 PM
*To:* Nikolay Kondratyev
*Cc:* [email protected]
*Subject:* Re: [Sipp-users] registration with digest auth: how to send right authorization header?

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]> <sip:%5bfield0...@%5bfield1%5d>;tag=[call_number]

      To: <sip:[fiel...@[field1]> <sip:%5bfield0...@%5bfield1%5d>

      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]> <sip:%5bfield0...@%5bfield1%5d>;tag=[call_number]

      To: <sip:[fiel...@[field1]> <sip:%5bfield0...@%5bfield1%5d>

      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" <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] <mailto:[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 UAS responder">

<send>
<![CDATA[

REGISTER sip:[remote_ip] SIP/2.0
Contact: "[service]" <sip:[servi...@[local_ip]:[local_port];transport=udp>;expires=300
Expires: 30000
Max-Forwards: 70
Call-ID: [call_id]
CSeq: 517 REGISTER
To: <sip:[servi...@[local_ip]>
From: <sip:[servi...@[local_ip]>;tag=81e961b6
Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch];rport.
User-Agent: SIPP_UAS

]]>
</send>

<nop>
<action>
<exec command="echo '1. SIPP send Register' >> ./tmp/trace.call.txt" />
</action>
</nop>

<recv response="401" auth="true">
<action>
<exec command="echo '2. SIPP recieved 401.Unauthorized' >> ./tmp/trace.call.txt" />
</action>
</recv>

<send>
<![CDATA[

REGISTER sip:[remote_ip] SIP/2.0
Contact: "[service]" <sip:[servi...@[local_ip]:[local_port];transport=udp>;expires=300
Expires: 30000
Max-Forwards: 70
Call-ID: [call_id]
CSeq: 517 REGISTER
[authentication username=INSERT_DEVICE_ID_HERE password=passwdx]
To: <sip:[servi...@[local_ip]>
From: <sip:[servi...@[local_ip]>;tag=81e961b6
Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch];rport.
User-Agent: SIPP_UAS

]]>
</send>

<nop>
<action>
<exec command="echo '3. SIPP send Register' >> ./tmp/trace.call.txt" />
</action>
</nop>

<recv response="200">
<action>
<exec command="echo '4. SIPP Recieved 200.OK' >> ./tmp/trace.call.txt" />
</action>
</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