Internet Communications Using SIP : Delivering VoIP and Multimedia Services With Session Initiation Protocol {2Nd Ed.}

(Steven Felgate) #1
SIP requests and responses are composed of either the request method or
response code, then a list of fields (called headers), which are similar to the
headers in an e-mail message. In fact some (such as To, From, Subject, and
Date) have an identical meaning.
An example SIP Request message is shown in Table 6.3, along with the min-
imum required set of headers and a line-by-line description.

Table 6.3 SIP Example with Line-by-Line Description
LINE DESCRIPTION
INVITE sip:[email protected] SIP/2.0 The first line of a SIP request does
not contain headers, but starts with
the name of the method (INVITE),
followed by a space, the Request-
URI, (in this case, sip:userb@
there.com, which is the destination
address of the request), a space,
then the current version of SIP
(2.0). Each line ends with a CRLF
(Carriage Return and Line Feed).
Note that both RFC 2543 and RFC
3261 SIP implementations are both
version 2.0.
Via: SIP/2.0/UDP 4.3.2.1:5060 The Viaheader contains the version
;branch=z9hG4bK765d of SIP (2.0) and the transport proto-
col (UDP) followed by the IP Address
(4.3.2.1) or host name of the
originator of the request and the
port number ( 5060 , the well-known
SIP port number). Any server that
forwards the request adds a Via
header with its own address to the
message and the port number at
which it wants to receive responses.
The branchparameter is a trans-
action identifier, indicated to be
unique by the first seven characters
being the cookie z9hG4bK.
To: User B <sip:[email protected]> The Toheader contains a display
name (User B) followed by the URI
of the request originator enclosed in
angle brackets <>(sip:userb@
there.com).

104 Chapter 6

Free download pdf