>From Chapter 6 - SIP Headers of SIP: Understanding the Session Initiation Protocol by Alan B. Johnston
The required Via header is used to record the SIP route taken by a request and is used to route a response back to the originator. A user agent generating a request records its own address in a Via header in the request. While the ordering of most SIP headers is not significant, the Via headers order is significant because it is used to route responses. A proxy forwarding the request adds a Via header containing its own address to the top of the list of Via headers. A proxy adding a Via header always includes a branch tag containing a cryptographic hash of the To, From, Call-ID, and Request-URI headers. A proxy or user agent generating a response to a request copies all the Via headers from the request in order into the response, then sends the response to the address specified in the top Via header. A proxy receiving a response checks the top Via header to ensure that it matches its own address. If it does not, the response has been misrouted and should be discarded. The top Via header is then removed, and the response forwarded to the address specified in the next Via header. Via headers contain protocol name and version number and transport (SIP/2.0/UDP, SIP/2.0/TCP, etc.) and may contain port numbers, and parameters such as received, hidden, branch, maddr, and ttl.A received tag is added to a Via header if a user agent or proxy receives the request from a different address than that specified in the top Via header. This indicates that a NAT or firewall proxy is in the message path. If present, the received tag is used in response routing. The hidden parameter indicates that the Via header has been encrypted. A branch parameter is added to Via headers by proxies, which is computed as a hash function of the Request-URI, and the To, From, Call-ID and CSeq number. A second part is added to the branch parameter if the request is being forked. The maddr and ttl parameters are used for multicast transport and have a similar meaning as the equivalent SIP URL parameters. The header can also contain optional comments. The compact form of the header is v. I hope this info is useful. Best regards, Harpreet --- Manju S <[EMAIL PROTECTED]> wrote: > Hi all... > > I have some basic question on sip. > > 1) what is the use of VIA header field? > 2) how is loop is detected by proxy? > > thanks in advance > > Regards > Manju > _______________________________________________ > Sip-implementors mailing list > [email protected] > https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors > ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com _______________________________________________ Sip-implementors mailing list [email protected] https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
