Reputation:
In a SIP INVITE message, what is the difference between the INVITE field address and the To field in the Message Header? Shouldn't the SIP URI in the INVITE field the same as SIP URI in the 'To' field in the message header?
Thanks
Upvotes: 0
Views: 3386
Reputation: 555
In a SIP INVITE message, what is the difference between the INVITE field address and the To field in the Message Header?
The 'to'
header field contains the desired address-of-record
; that address-of-record
is constant in nature (with exceptions).
The INVITE field address aka Request-URI
contains the current SIP-URI
target and is variable in nature.
Shouldn't the SIP URI in the INVITE field the same as SIP URI in the 'To' field in the message header?
Short answer : Yes when forming the initial INVITE and no when SIP routing occurs.
Longer stuff : If the user agent Alice initiates a call to a specific Bob SIP endpoint, it retrieves the Bob address-of-record from somewhere and then create a initial INVITE request with the desired address-of-record
placed in the Request-URI
field, place the same address-of-record
in the URI of the to
header field.
The initial INVITE is sent and routed ... at one SIP proxy the Request-URI
field is refined using the procedure as specified in [RFC3261] section 16.
If it receives a request targeted at the address-of-record that belongs to the domain that this proxy is responsible for then :
the request targets
, note that more than one target-URI
is possible!address-of-record
using REGISTRAR database.INVITE request
with the request URI
changed to newly fetched target URI
,target-URI
exist then proceed in the same way for forking purpose.Upvotes: 0
Reputation: 30699
For a request URI
the specification RFC3261 8.1.1.1 says:
The initial Request-URI of the message SHOULD be set to the value of the URI in the To field. One notable exception is the REGISTER method;
For the To
header the specification RFC3261 8.1.1.2 says:
The To header field first and foremost specifies the desired "logical" recipient of the request, or the address-of-record of the user or resource that is the target of this request. This may or may not be the ultimate recipient of the request.
For non-REGISTER requests the To
header URI is a "logical" value and it's typically left up to the agent that processes the request to decide how to use it (often nothing is done with it). The request URI
is much more critical. It dictates where and how the request needs to be sent.
One example that may help is when a request needs to be sent over a TCP transport. The request URI
could get produced as:
sip:1234@localhost;transport=tcp
Whereas the To
URI will remain:
sip:1234@localhost
Upvotes: 1
Reputation: 128
I think you are talking about the difference between RequestUri and To Uri.
Request URI :
INVITE sip:[email protected] SIP/2.0
To URI :
sip:[email protected];transport=UDP
The differece between them is Request Uri contain the next HOP ip adrress where as to uri contains the destination Number.
From source to Destination address ...we can have many hops.
I hpoe i answered your question
Upvotes: 1