Hi,

after some investigations I found that the hash function in call.cpp is
returning different hashes for a response and its retransmission.
I added the following debug output to call.cpp:
/******* Very simple hash for retransmission detection  *******/

unsigned long hash(char * msg) {
  unsigned long hash = 0;
  int c;
  WARNING_P1("HASHTEST: msg = '%s'", msg);
  while (c = *msg++)
    hash = c + (hash << 6) + (hash << 16) - hash;
  WARNING_P1("HASHTEST: hash = '%u'", hash);
  return hash;
}

and here is the error log:

sipp: The following events occured:
2006-12-08 21:12:01: HASHTEST: msg = 'SIP/2.0 401 Unauthorized^M
Via: SIP/2.0/UDP 10.37.1.58:5061;branch=z9hG4bK.1.1^M
From: testuser001 <sip:[EMAIL PROTECTED]>;tag=1^M
To: testuser001
<sip:[EMAIL PROTECTED]>;tag=b27e1a1d33761e85846fc98f5f3a7e58.16f3^M
Call-ID: [EMAIL PROTECTED]
CSeq: 1 REGISTER^M
WWW-Authenticate: Digest realm="osser",
nonce="4579d6199a72939855c70ff4b61bb39138abc6d1", qop="auth"^M
Server: Sip EXpress router (0.10.99-dev62 (i386/linux))^M
Content-Length: 0^M
Warning: 392 10.37.1.57:5060 "Noisy feedback tells:  pid=12629
req_src_ip=10.37.1.58 req_src_port=5061 in_uri=sip:osser.sip-router.org
out_uri=sip:osser.sip-router.org via_cnt==1"^M
^M
'.
2006-12-08 21:12:01: HASHTEST: hash = '256777507'.
2006-12-08 21:12:01: HASHTEST: msg = 'SIP/2.0 401 Unauthorized^M
Via: SIP/2.0/UDP 10.37.1.58:5061;branch=z9hG4bK.1.1^M
From: testuser001 <sip:[EMAIL PROTECTED]>;tag=1^M
To: testuser001
<sip:[EMAIL PROTECTED]>;tag=b27e1a1d33761e85846fc98f5f3a7e58.16f3^M
Call-ID: [EMAIL PROTECTED]
CSeq: 1 REGISTER^M
WWW-Authenticate: Digest realm="osser",
nonce="4579d6199a72939855c70ff4b61bb39138abc6d1", qop="auth"^M
Server: Sip EXpress router (0.10.99-dev62 (i386/linux))^M
Content-Length: 0^M
Warning: 392 10.37.1.57:5060 "Noisy feedback tells:  pid=12624
req_src_ip=10.37.1.58 req_src_port=5061 in_uri=sip:osser.sip-router.org
out_uri=sip:osser.sip-router.org via_cnt==1"^M
^M
'.
2006-12-08 21:12:01: HASHTEST: hash = '1398621672'.
2006-12-08 21:12:01: Aborting call on unexpected message for Call-ID
'[EMAIL PROTECTED]': while expecting '200' response, received 'SIP/2.0
401 Unauthorized^M
Via: SIP/2.0/UDP 10.37.1.58:5061;branch=z9hG4bK.1.1^M
From: testuser001 <sip:[EMAIL PROTECTED]>;tag=1^M
To: testuser001
<sip:[EMAIL PROTECTED]>;tag=b27e1a1d33761e85846fc98f5f3a7e58.16f3^M
Call-ID: [EMAIL PROTECTED]
CSeq: 1 REGISTER^M
WWW-Authenticate: Digest realm="osser",
nonce="4579d6199a72939855c70ff4b61bb39138abc6d1", qop="auth"^M
Server: Sip EXpress router (0.10.99-dev62 (i386/linux))^M
Content-Length: 0^M
Warning: 392 10.37.1.57:5060 "Noisy feedback tells:  pid=12624
req_src_ip=10.37.1.58 req_src_port=5061 in_uri=sip:osser.sip-router.org
out_uri=sip:osser.sip-router.org via_cnt==1"^M
^M
' .

I'll go on to find the reason for this behavior, but maybe some of you
already has an explanation for this ...

Enrico


Enrico Hartung wrote:
> Hi,
>
> I recently noticed some problems in SIPp handling retransmissions.
> SIPp (rev 121) seems to ignore the CSeq for identifying retransmission 
> responses, at least for the 407 response.
> It should be easy to reproduce by just setting the retransmission 
> timeout to a low value.
>
> I'm using the following scenario:
>
> (1) <sent>
>     INVITE
>     CSeq: 1 INVITE
> (2) <sent>
>     INVITE (retransmission)
>     CSeq: 1 INVITE
> (3) <received>
>     407
>     CSeq: 1 INVITE
> (4) <sent>
>     ACK
>     CSeq: 1 ACK
> (5) <sent>
>     INVITE (with WWW-Authentication header)
>     CSeq: 2 INVITE
> (6) <received>
>     407 (answer for retransmission)
>     CSeq: 1 INVITE
>
> --> while expecting '100' response, received 'SIP/2.0 407'
>
> Could anybody reproduce this?
>
> regards,
> Enrico
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Sipp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
>   



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to