(Answer) (Category) SIP FAQ : (Category) SIP Protocol Operation :
What is the relationship between the From, Contact, Via and Record-Route/Route headers?
All these headers determine how requests and responses are routed in a network of SIP proxy servers. Roughly, the distinction is:

- From:
Used for subsequent requests from the callee to the caller if there is no Contact or Record-Route header. E.g., if Alice makes a call with

    From: Alice sip:alice@example.org 
to Bob, an INVITE request from Bob to Alice would use
    sip:alice@example.org 
as the To header and Request-URI.

- Contact:
Determines the destination placed in the Request-URI for subsequent requests and can be used to bypass proxies _not_ enumerated in a Record-Route header. Also used in responses by redirect servers and in REGISTER requests and responses.

- Record-Route/Route:
The Record-Route header is inserted into requests by proxies that want to be in the path of subsequent requests for the same call-id. It is then used by the user agent to route subsequent requests. The mechanism is similar to a source-route, as the Record-Route information is copied into a set of Route headers. The Request-URI is set to the first Route header.

- Via:
Via headers are inserted by servers into requests to detect loops and to allow responses to find their way back to the client. They have no influence on the routing of future requests (or responses).

Generally, in short, requests should be sent to Route if present, Contact if there is no Route, From if there is no Contact.

[Append to This Answer]
islepchin@dynamicsoft.com
2000-Jul-06 1:03am
Previous: (Answer) How can one recognize a retransmitted, duplicate or looped request?
Next: (Answer) How are URLs compared?
This document is: http://www.cs.columbia.edu/~hgs/sip/faq.cgi?file=26
[Search] [Appearance]
This is a Faq-O-Matic 2.710.
This FAQ administered by Henning Schulzrinne