Subject: Re: [SIP] Discussion

From: [email-masked]
Date: Thu, 2 Nov 2000 13:16:35 +0530

Just looking at the Via header host list to see if this is a loop is not
enough.
You need to look into the branchid to make sure that the current request
URI is the same as the original one (which
is reflected in the branchid computation). If a same message reaches the
same proxy, but with a different request-URI,
it should be processed normally by the proxy and not considered as a loop.
(this is called a sprial loop)

For an example of when a spiral might occur, Im attaching a small except
from the "via loop detection and proxies" thread
that was discussed a while ago:

[email-masked] wrote:
"Its quite problematic for forwarding services. Lets say I forward calls
from [email-masked] to my secretary, [email-masked]. You
actually want the proxy to loop the request to itself in this case. As
you say, the request URI is different, so its not really a loop; its a
"spiral"."

james> Is the hash is easy to
james> implement? Could anyone give me advice on this?

MD5 alogrithm is simple to implement and I think MD5 is available in Public
domain too (?).
one way to make a hash is to simply strcat From+To+CallId+CSeq+ReqUri and
pass it to MD5Encode
which will return you a digest value that you can use as the one of the
branchi components.

Regds
Arjun

--
Arjun Roychowdhury @ Hughes Software Systems

james jack <[email-masked]> on 11/02/2000 11:10:38 AM

To:   [email-masked]
cc:

Subject:  [SIP] Discussion

Dear All:
    I have one question to discuss. In order to
detect loop, RFC2543bis02 page 81 says"A request has
been looped if the server finds its own address in the
Via header field and the hash computation over the
fields enumerated in Section 6.46.6 yields the same
value as the hash part of the ??branch?? parameter in
the Via entry containing the proxy server??s
address.",
Page 59"In order to be able to both detect
loops and associate responses with the corresponding
request, the parameter SHOULD consist of two parts
separable by the implementation. One part, used for
loop detection (Section 12.3.1), MAY be computed
as a cryptographic hash of the To, From, Call-ID
header fields, the Request-URI of the request received
(before translation) and the sequence number from the
CSeq header field. The algorithm used to compute the
hash is implementation-dependent, but MD5 [38],
expressed in hexadecimal, is a reasonable choice.".
According to my knowledge, it is necessary to detect
the Via to find whether loop or not, why use these
parameters to detect loop, Is the hash is easy to
implement? Could anyone give me advice on this?
   Thanks a lot!
   Best regards!
                        Yours: James

__________________________________________________
Do You Yahoo!?
From homework help to love advice, Yahoo! Experts has your answer.
http://experts.yahoo.com/

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip