draft-ietf-mmusic-sip-05.txt   draft-ietf-mmusic-sip-06.txt 
Internet Engineering Task Force MMUSIC WG Internet Engineering Task Force MMUSIC WG
Internet Draft Handley/Schulzrinne/Schooler Internet Draft Handley/Schulzrinne/Schooler
draft-ietf-mmusic-sip-05.txt ISI/Columbia U./Caltech draft-ietf-mmusic-sip-06.txt ISI/Columbia U./Caltech
May 14, 1998 June 13, 1998
Expires: November 1998 Expires: November 1998
SIP: Session Initiation Protocol SIP: Session Initiation Protocol
STATUS OF THIS MEMO STATUS OF THIS MEMO
This document is an Internet-Draft. Internet-Drafts are working This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, documents of the Internet Engineering Task Force (IETF), its areas,
and its working groups. Note that other groups may also distribute and its working groups. Note that other groups may also distribute
working documents as Internet-Drafts. working documents as Internet-Drafts.
skipping to change at page 4, line 23 skipping to change at page 4, line 23
Call: A call consists of all participants in a conference invited by Call: A call consists of all participants in a conference invited by
a common source. A SIP call is identified by a globally unique a common source. A SIP call is identified by a globally unique
call-id (Section 6.12). Thus, if a user is, for example, invited call-id (Section 6.12). Thus, if a user is, for example, invited
to the same multicast session by several people, each of these to the same multicast session by several people, each of these
invitations will be a unique call. A point-to-point Internet invitations will be a unique call. A point-to-point Internet
telephony conversation maps into a single SIP call. In a MCU- telephony conversation maps into a single SIP call. In a MCU-
based call-in conference, each participant uses a separate call based call-in conference, each participant uses a separate call
to invite himself to the MCU. to invite himself to the MCU.
Call leg: A call leg is identified by the combination of Call-ID, To
and From.
Client: An application program that establishes connections for the Client: An application program that establishes connections for the
purpose of sending requests. Clients may or may not interact purpose of sending requests. Clients may or may not interact
directly with a human user. directly with a human user. User agents and proxies contain
clients (and servers).
Conference: A multimedia session (see below), identified by a common Conference: A multimedia session (see below), identified by a common
session description. A conference may have zero or more members session description. A conference may have zero or more members
and includes the cases of a multicast conference, a full-mesh and includes the cases of a multicast conference, a full-mesh
conference and a two-party "telephone call", as well as conference and a two-party "telephone call", as well as
combinations of these. combinations of these.
Downstream: Requests sent in the direction from the caller to the Downstream: Requests sent in the direction from the caller to the
callee. callee.
skipping to change at page 6, line 21 skipping to change at page 6, line 24
session." (RFC 2327, [7]) (A session as defined for SDP may session." (RFC 2327, [7]) (A session as defined for SDP may
comprise one or more RTP sessions.) As defined, a callee may be comprise one or more RTP sessions.) As defined, a callee may be
invited several times, by different calls, to the same session. invited several times, by different calls, to the same session.
If SDP is used, a session is defined by the concatenation of the If SDP is used, a session is defined by the concatenation of the
user name , session id , network type , address type and address user name , session id , network type , address type and address
elements in the origin field. elements in the origin field.
(SIP) transaction: A SIP transaction occurs between a client and a (SIP) transaction: A SIP transaction occurs between a client and a
server and comprises all messages from the first request sent server and comprises all messages from the first request sent
from the client to the server up to a final (non-1xx) response from the client to the server up to a final (non-1xx) response
sent from the server to the client. A transaction is for a sent from the server to the client. A transaction is identified
single call (identified by a Call-ID, Section 6.12) and may be by the CSeq sequence number (Section 6.16) within a single call
identified by a CSeq sequence number (Section 6.16). If there leg The ACK request has the same CSeq number as the
is no CSeq, there can only be one pending transaction between a corresponding INVITE request, but comprises a transaction on
server and client for each call id. its own.
Upstream: Responses sent in the direction from the called client to Upstream: Responses sent in the direction from the called client to
the caller. the caller.
URL-encoded: A character string encoded according to RFC 1738, URL-encoded: A character string encoded according to RFC 1738,
Section 2.2 [11]. Section 2.2 [11].
User agent client (UAC), calling user agent: A user agent client is a User agent client (UAC), calling user agent: A user agent client is a
client application that initiates the SIP request. client application that initiates the SIP request.
skipping to change at page 6, line 48 skipping to change at page 7, line 5
received and that returns a response on behalf of the user. The received and that returns a response on behalf of the user. The
response may accept, reject or redirect the call. response may accept, reject or redirect the call.
An application program may be capable of acting both as a client and An application program may be capable of acting both as a client and
a server. For example, a typical multimedia conference control a server. For example, a typical multimedia conference control
application would act as a client to initiate calls or to invite application would act as a client to initiate calls or to invite
others to conferences and as a user agent server to accept others to conferences and as a user agent server to accept
invitations. The properties of the different SIP server types are invitations. The properties of the different SIP server types are
summarized in Table 1. summarized in Table 1.
1.4 Summary of SIP Operation
This section explains the basic protocol functionality and operation.
property redirect proxy user agent property redirect proxy user agent
server server server server server server
_______________________________________________________ _______________________________________________________
also acts as client no yes no also acts as client no yes no
return 1xx status yes yes yes return 1xx status yes yes yes
return 2xx status no yes yes return 2xx status no yes yes
return 3xx status yes yes yes return 3xx status yes yes yes
return 4xx status yes yes yes return 4xx status yes yes yes
return 5xx status yes yes yes return 5xx status yes yes yes
return 6xx status no yes yes return 6xx status no yes yes
insert Via header no yes no insert Via header no yes no
accept ACK no yes yes accept ACK no yes yes
Table 1: Properties of the different SIP server types Table 1: Properties of the different SIP server types
1.4 Summary of SIP Operation
This section explains the basic protocol functionality and operation.
Callers and callees are identified by SIP addresses, described in Callers and callees are identified by SIP addresses, described in
Section 1.4.1. When making a SIP call, a caller first locates the Section 1.4.1. When making a SIP call, a caller first locates the
appropriate server (Section 1.4.2) and then sends a SIP request appropriate server (Section 1.4.2) and then sends a SIP request
(Section 1.4.3). The most common SIP operation is the invitation (Section 1.4.3). The most common SIP operation is the invitation
(Section 1.4.4). Instead of directly reaching the intended callee, a (Section 1.4.4). Instead of directly reaching the intended callee, a
SIP request may be redirected or may trigger a chain of new SIP SIP request may be redirected or may trigger a chain of new SIP
requests by proxies (Section 1.4.5). Users can register their requests by proxies (Section 1.4.5). Users can register their
location(s) with SIP servers (Section 4.2.6). location(s) with SIP servers (Section 4.2.6).
1.4.1 SIP Addressing 1.4.1 SIP Addressing
skipping to change at page 8, line 40 skipping to change at page 8, line 42
the default port number 5060 is to be used. The default port number the default port number 5060 is to be used. The default port number
is the same for UDP and TCP. In all cases, the client first attempts is the same for UDP and TCP. In all cases, the client first attempts
to contact the server using UDP, then TCP. to contact the server using UDP, then TCP.
A client SHOULD rely on ICMP "Port Unreachable" messages rather than A client SHOULD rely on ICMP "Port Unreachable" messages rather than
time-outs to determine that a server is not reachable at a particular time-outs to determine that a server is not reachable at a particular
address. (For socket-based programs: For TCP, connect() returns address. (For socket-based programs: For TCP, connect() returns
ECONNREFUSED if there is no server at the designated address; for ECONNREFUSED if there is no server at the designated address; for
UDP, the socket should be bound to the destination address using UDP, the socket should be bound to the destination address using
connect() rather than sendto() or similar so that a second write() connect() rather than sendto() or similar so that a second write()
fails with ECONNREFUSED fails with ECONNREFUSED. )
If the SIP address contains a numeric IP address, the client contacts If the SIP address contains a numeric IP address, the client contacts
the SIP server at that address. Otherwise, the client follows the the SIP server at that address. Otherwise, the client follows the
steps below. steps below.
1. If there is a SRV DNS resource record (RFC 2052 [12]) of 1. If there is a SRV DNS resource record (RFC 2052 [12]) of
type sip.udp, contact the listed SIP servers in the order type sip.udp, contact the listed SIP servers in the order
of the preference values contained in those resource of the preference values contained in those resource
records, using UDP as a transport protocol at the port records, using UDP as a transport protocol at the port
number given in the URL or, if none provided, the one number given in the URL or, if none provided, the one
skipping to change at page 10, line 7 skipping to change at page 10, line 11
together with the responses triggered by that request make up a SIP together with the responses triggered by that request make up a SIP
transaction. The ACK request following an INVITE is not part of transaction. The ACK request following an INVITE is not part of
the transaction since it may traverse a different set of hosts. the transaction since it may traverse a different set of hosts.
If TCP is used, request and responses within a single SIP transaction If TCP is used, request and responses within a single SIP transaction
are carried over the same TCP connection (see Section 10). Several are carried over the same TCP connection (see Section 10). Several
SIP requests from the same client to the same server may use the same SIP requests from the same client to the same server may use the same
TCP connection or may open a new connection for each request. TCP connection or may open a new connection for each request.
If the client sent the request via unicast UDP, the response is sent If the client sent the request via unicast UDP, the response is sent
to the address contained in the next Via header field (Section 6.43) to the address contained in the next Via header field (Section 6.40)
of the response. If the request is sent via multicast UDP, the of the response. If the request is sent via multicast UDP, the
response is directed to the same multicast address and destination response is directed to the same multicast address and destination
port. For UDP, reliability is achieved using retransmission (Section port. For UDP, reliability is achieved using retransmission (Section
10). 10).
The SIP message format and operation is independent of the transport The SIP message format and operation is independent of the transport
protocol. protocol.
1.4.4 SIP Invitation 1.4.4 SIP Invitation
skipping to change at page 10, line 30 skipping to change at page 10, line 34
to join a particular conference or establish a two-party to join a particular conference or establish a two-party
conversation. After the callee has agreed to participate in the call, conversation. After the callee has agreed to participate in the call,
the caller confirms that it has received that response by sending an the caller confirms that it has received that response by sending an
ACK (Section 4.2.2) request. If the caller no longer wants to ACK (Section 4.2.2) request. If the caller no longer wants to
participate in the call, it sends a BYE request instead of an ACK. participate in the call, it sends a BYE request instead of an ACK.
The INVITE request typically contains a session description, for The INVITE request typically contains a session description, for
example written in SDP (RFC 2327, [7]) format, that provides the example written in SDP (RFC 2327, [7]) format, that provides the
called party with enough information to join the session. For called party with enough information to join the session. For
multicast sessions, the session description enumerates the media multicast sessions, the session description enumerates the media
types and formats that may be distributed to that session. For types and formats that may be distributed to that session. For a
unicast session, the session description enumerates the media types unicast session, the session description enumerates the media types
and formats that the caller is willing to receive and where it wishes and formats that the caller is willing to receive and where it wishes
the media data to be sent. In either case, if the callee wishes to the media data to be sent. In either case, if the callee wishes to
accept the call, it responds to the invitation by returning a similar accept the call, it responds to the invitation by returning a similar
description listing the media it wishes to receive. For a multicast description listing the media it wishes to receive. For a multicast
session, the callee should only return a session description if it is session, the callee should only return a session description if it is
unable to receive the media indicated in the caller's description. unable to receive the media indicated in the caller's description or
The caller may ignore the session description returned or use it to wants to receive data via unicast.
change the global session description.
The protocol exchanges for the INVITE method are shown in Fig. 1 for The protocol exchanges for the INVITE method are shown in Fig. 1 for
a proxy server and in Fig. 2 for a redirect server. In Fig. 1, the a proxy server and in Fig. 2 for a redirect server. In Fig. 1, the
proxy server accepts the INVITE request (step 1), contacts the proxy server accepts the INVITE request (step 1), contacts the
location service with all or parts of the address (step 2) and location service with all or parts of the address (step 2) and
obtains a more precise location (step 3). The proxy server then obtains a more precise location (step 3). The proxy server then
issues a SIP INVITE request to the address(es) returned by the issues a SIP INVITE request to the address(es) returned by the
location service (step 4). The user agent server alerts the user location service (step 4). The user agent server alerts the user
(step 5) and returns a success indication to the proxy server (step (step 5) and returns a success indication to the proxy server (step
6). The proxy server then returns the success result to the original 6). The proxy server then returns the success result to the original
skipping to change at page 11, line 43 skipping to change at page 12, line 4
The redirect server shown in Fig. 2 accepts the INVITE request (step The redirect server shown in Fig. 2 accepts the INVITE request (step
1), contacts the location service as before (steps 2 and 3) and, 1), contacts the location service as before (steps 2 and 3) and,
instead of contacting the newly found address itself, returns the instead of contacting the newly found address itself, returns the
address to the caller (step 4), which is then acknowledged via an address to the caller (step 4), which is then acknowledged via an
ACK request (step 5). The caller issues a new request, with the same ACK request (step 5). The caller issues a new request, with the same
call-ID but a higher CSeq, to the address returned by the first call-ID but a higher CSeq, to the address returned by the first
server (step 6). In the example, the call succeeds (step 7). The server (step 6). In the example, the call succeeds (step 7). The
caller and callee complete the handshake with an ACK (step 8). caller and callee complete the handshake with an ACK (step 8).
The next section discusses what happens if the location service The next section discusses what happens if the location service
returns more than one possible alternative.
+....... cs.columbia.edu .......+ +....... cs.columbia.edu .......+
: : : :
: (~~~~~~~~~~) : : (~~~~~~~~~~) :
: ( location ) : : ( location ) :
: ( service ) : : ( service ) :
: (~~~~~~~~~~) : : (~~~~~~~~~~) :
: ^ | : : ^ | :
: | hgs@play : : | hgs@play :
: 2| 3| : : 2| 3| :
: | | : : | | :
skipping to change at page 13, line 4 skipping to change at page 13, line 4
| : ( ) : | : ( ) :
| 8: ACK : ( ) : | 8: ACK : ( ) :
======================================================> (~~~~~~) : ======================================================> (~~~~~~) :
+...............................+ +...............................+
====> SIP request ====> SIP request
....> SIP response ....> SIP response
----> non-SIP protocols ----> non-SIP protocols
Figure 2: Example of SIP redirect server Figure 2: Example of SIP redirect server
returns more than one possible alternative.
1.4.5 Locating a User 1.4.5 Locating a User
A callee may move between a number of different end systems over A callee may move between a number of different end systems over
time. These locations can be dynamically registered with the SIP time. These locations can be dynamically registered with the SIP
server (Sections 1.4.7, 4.2.6). A location server may also use one or server (Sections 1.4.7, 4.2.6). A location server may also use one or
more other protocols, such as finger (RFC 1288 [16]), rwhois (RFC more other protocols, such as finger (RFC 1288 [16]), rwhois (RFC
2167 [17]), LDAP (RFC 1777 [18]), multicast-based protocols or 2167 [17]), LDAP (RFC 1777 [18]), multicast-based protocols or
operating-system dependent mechanism to actively determine the end operating-system dependent mechanism to actively determine the end
system where a user might be reachable. A location server may return system where a user might be reachable. A location server may return
several locations because the user is logged in at several hosts several locations because the user is logged in at several hosts
simultaneously or because the location server has (temporarily) simultaneously or because the location server has (temporarily)
inaccurate information. The SIP server combines the results to yield inaccurate information. The SIP server combines the results to yield
a list of a zero or more locations. It is recommended that each a list of a zero or more locations. It is recommended that each
location server sorts results according to the likelihood of success. location server sorts results according to the likelihood of success.
The action taken on receiving a list of locations varies with the The action taken on receiving a list of locations varies with the
type of SIP server. A SIP redirect server returns the list to the type of SIP server. A SIP redirect server returns the list to the
client sending the request as Location headers (Section 6.25). A SIP client sending the request as Location headers (Section 6.22). A SIP
proxy server can sequentially or in parallel try the addresses until proxy server can sequentially or in parallel try the addresses until
the call is successful (2xx response) or the callee has declined the the call is successful (2xx response) or the callee has declined the
call (6xx response). With sequential attempts, a proxy server can call (6xx response). With sequential attempts, a proxy server can
implement an "anycast" service. implement an "anycast" service.
If a proxy server forwards a SIP request, it MUST add itself to the If a proxy server forwards a SIP request, it MUST add itself to the
end of the list of forwarders noted in the Via (Section 6.43) end of the list of forwarders noted in the Via (Section 6.40)
headers. The Via trace ensures that replies can take the same path headers. The Via trace ensures that replies can take the same path
back, ensuring correct operation through compliant firewalls and back, ensuring correct operation through compliant firewalls and
avoiding request loops. On the response path, each host MUST remove avoiding request loops. On the response path, each host MUST remove
its Via, so that routing internal information is hidden from the its Via, so that routing internal information is hidden from the
callee and outside networks. When a multicast request is made, first callee and outside networks. When a multicast request is made, first
the host making the request, then the multicast address itself are the host making the request, then the multicast address itself are
added to the path. A proxy server MUST check that it does not added to the path. A proxy server MUST check that it does not
generate a request to a host listed in the Via list. (Note: If a generate a request to a host listed in the Via list. (Note: If a
host has several names or network addresses, this may not always host has several names or network addresses, this may not always
work. Thus, each host also checks if it is part of the Via list.) work. Thus, each host also checks if it is part of the Via list.)
skipping to change at page 14, line 22 skipping to change at page 14, line 24
The REGISTER request allows a client to let a proxy or redirect The REGISTER request allows a client to let a proxy or redirect
server know which address(es) it may be reached under. A client may server know which address(es) it may be reached under. A client may
also use it to install call handling features at the server. also use it to install call handling features at the server.
1.5 Protocol Properties 1.5 Protocol Properties
1.5.1 Minimal State 1.5.1 Minimal State
A single conference session or call may involve one or more SIP A single conference session or call may involve one or more SIP
request-response transactions. Proxy servers do not have to keep request-response transactions. Proxy servers do not have to keep
state for a particular call, however, they maintain state for a state for a particular call, however, they MAY maintain state for a
single SIP transaction, as discussed in Section 11. single SIP transaction, as discussed in Section 11.
For efficiency, a server may cache the results of location service For efficiency, a server may cache the results of location service
requests. requests.
1.5.2 Lower-Layer-Protocol Neutral 1.5.2 Lower-Layer-Protocol Neutral
SIP makes minimal assumptions about the underlying transport and SIP makes minimal assumptions about the underlying transport and
network-layer protocols. The lower-layer may provide either a packet network-layer protocols. The lower-layer may provide either a packet
or a byte stream service, with reliable or unreliable service. or a byte stream service, with reliable or unreliable service.
skipping to change at page 15, line 35 skipping to change at page 16, line ?
called. called.
Because interaction with some resources may require message headers Because interaction with some resources may require message headers
or message bodies to be specified as well as the SIP address, the SIP or message bodies to be specified as well as the SIP address, the SIP
URL scheme is defined to allow setting SIP request-header fields and URL scheme is defined to allow setting SIP request-header fields and
the SIP message-body. (This is similar to the mailto: URL [19].) the SIP message-body. (This is similar to the mailto: URL [19].)
A SIP URL follows the guidelines of RFC 1630, as revised, [20,21] and A SIP URL follows the guidelines of RFC 1630, as revised, [20,21] and
takes the following form: takes the following form:
SIP-URL = full-sip-url SIP-URL = "sip:" [ userinfo "@" ] hostport
full-sip-url = "sip:" ( user | phone ) [ ":" password ]
"@" [ host | nhost ] : port
url-parameters [ headers ] url-parameters [ headers ]
user = ; defined in RFC 1738 [11]
phone = telephone-subscriber
telephone-subscriber = ;
defined in [22]
password = *( unreserved | escaped |
";" | " " | "=" | "+" | "$" | "," )
host = ; defined in RFC 1738
nhost = hostnumber
hostnumber = digits "." digits "." digits "." digits
port = digits
url-parameters = *( ";" url-parameter) url-parameters = *( ";" url-parameter)
url-parameter = transport-param | url-parameter = transport-param | user-param
ttl-param | maddr-param | other-param | ttl-param | maddr-param | tag-param | other-param
transport-param = "transport=" ( "udp" | "tcp" ) transport-param = "transport=" ( "udp" | "tcp" )
ttl-param = "ttl=" ttl ttl-param = "ttl=" ttl
ttl = 1*3DIGIT ; 0 to 255 ttl = 1*3DIGIT ; 0 to 255
maddr-param = "maddr=" maddr maddr-param = "maddr=" maddr
maddr = ; dotted decimal multicast address maddr = IPv4address ; multicast address
user-param = "user=" ( "phone" )
tag-param = "tag=" UUID
other-param = *uric other-param = *uric
headers = "?" header *( " " header ) headers = "?" header *( "&" header )
header = hname "=" hvalue header = hname "=" hvalue
hname = *uric hname = *uric
hvalue = *uric hvalue = *uric
uric = ; defined in [21]
digits = 1*DIGIT digits = 1*DIGIT
Thus, a SIP URL can take either a short form or a full form. The
short form MAY only be used within SIP messages where the scheme
(SIP) can be assumed. In all other cases, and when parameters are
required to be specified, the full form MUST be used.
Note that all URL reserved characters MUST be encoded. The special Note that all URL reserved characters MUST be encoded. The special
hname "body" indicates that the associated hvalue is the message- hname "body" indicates that the associated hvalue is the message-
body of the SIP INVITE request. Within sip URLs, the characters body of the SIP INVITE request. Within sip URLs, the characters
"?", "=", "&" are reserved. "?", "=", "&" are reserved.
The mailto: URL and RFC 822 email addresses require that numeric The mailto: URL and RFC 822 email addresses require that numeric
host addresses ("host numbers") are enclosed in square brackets host addresses ("host numbers") are enclosed in square brackets
(presumably, since host names might be numeric), while host numbers (presumably, since host names might be numeric), while host numbers
without brackets are used for all other URLs. The SIP URL requires without brackets are used for all other URLs. The SIP URL requires
the latter form. the latter form.
The password parameter can be used for a basic authentication The elements userinfo, uric, hostport, IPv4address are defined in
mechanism that takes the place of an unlisted telephone number. Also, [21].
for Internet telephony gateways, it may serve as a personal
identification number (PIN). Including just the password in the URL
is more convenient than including a whole authentication header. This
approach may be reasonably secure if the URL is part of a secured web
page. Unless the SIP transaction is carried over a secure network
connection, this carries the same security risks as all URL-based
passwords and should only be used when security requirements are low.
In general, it is NOT RECOMMENDED and use of the Authorization
(Section 6.11) header is preferred.
The phone identifier is to be used when connecting to a telephony The SIP scheme MAY use the format "user:password" in the userinfo
gateway. The phone number follows the rules for international numbers field. The use of passwords in the userinfo is NOT RECOMMENDED,
in ITU Recommendation E.123, with only numbers and hyphens allowed. because the passing of authentication information in clear text (such
as URI) has proven to be a security risk in almost every case where
it has been used.
Examples of short and full-form SIP URLs are: If the host is an Internet telephony gateway, the userinfo field can
also encode a telephone number using the notation of telephone-
subscriber defined in [22]. The telephone number is a special case of
a user name and cannot be distinguished by a BNF. Thus, a URL
parameter, user, is added to distinguish telephone numbers from user
names. The phone identifier is to be used when connecting to a
telephony gateway. Even without this parameter, recipients of SIP
URLs MAY interpret the pre-@ part as a phone number if local
restrictions on the name space for user name allow to make this
determination.
The tag parameter allows to distinguish several instances of a user
that share the same host and port values, for example, where these
designate a firewall. The tag value is a version-1 (time-based) or
version-4 (random) UUID [31]. The tag value is designed to be
globally unique within each Call-ID and only to be used within the
same Call-ID. It SHOULD NOT be included in long-lived SIP URLs,
e.g., those found on web pages or user databases. A single user
maintains the same tag throughout the call identified by the Call-ID.
If a server handles SIP addresses for another domain, it MUST URL-
encode the "@" character (%40).
SIP URLs can define specific parameters of the request, including the
transport mechanism (UDP or TCP) and the use of multicast to make a
request. These parameters are added after the host and are separated
by semi-colons. For example, to specify to call j.doe@big.com using
multicast to 239.255.255.1 with a ttl of 15, the following URL would
be used:
The transport protocol UDP is to be assumed when a multicast address
is given.
Examples of SIP URLs are:
j.doe@big.com
sip:j.doe@big.com sip:j.doe@big.com
sip:j.doe:secret@big.com;transport=tcp sip:j.doe:secret@big.com;transport=tcp
sip:j.doe@big.com?subject=project sip:j.doe@big.com?subject=project
sip:+1-212-555-1212:1234@gateway.com sip:+1-212-555-1212:1234@gateway.com;user=phone
sip:alice@[10.1.2.3] sip:1212@gateway.com
sip:alice@10.1.2.3 sip:alice@10.1.2.3
sip:alice@example.com;tag=f81d4fae-7dec-11d0-a765-00a0c91e6bf6
sip:alice
Within a SIP message, URLs are used to indicate the source and Within a SIP message, URLs are used to indicate the source and
intended destination of a request, redirection addresses and the intended destination of a request, redirection addresses and the
current destination of a request. Normally all these fields will current destination of a request. Normally all these fields will
contain SIP URLs. When additional parameters are not required, the contain SIP URLs.
short form SIP URL can be used unambiguously.
SIP URLs are case-insensitive, so that sip:j.doe@example.com and SIP URLs are case-insensitive, so that sip:j.doe@example.com and
SIP:J.Doe@Example.com are equivalent. SIP:J.Doe@Example.com are equivalent. All URL parameters are included
when comparing SIP URLs for equality.
In some circumstances a non-SIP URL may be used in a SIP message. An In some circumstances a non-SIP URL may be used in a SIP message. An
example might be making a call from a telephone which is relayed by a example might be making a call from a telephone which is relayed by a
gateway onto the internet as a SIP request. In such a case, the gateway onto the internet as a SIP request. In such a case, the
source of the call is really the telephone number of the caller, and source of the call is really the telephone number of the caller, and
so a SIP URL is inappropriate and a phone URL might be used instead. so a SIP URL is inappropriate and a phone URL might be used instead.
To allow for this flexibility, SIP headers that specify user To allow for this flexibility, SIP headers that specify user
addresses allow these addresses to be SIP and non-SIP URLs. addresses allow these addresses to be SIP and non-SIP URLs.
Clearly not all URLs are appropriate to be used in a SIP message as a Clearly not all URLs are appropriate to be used in a SIP message as a
user address. The correct behavior when an unknown scheme is user address. The correct behavior when an unknown scheme is
encountered by a SIP server is defined in the context of each of the encountered by a SIP server is defined in the context of each of the
header fields that use a SIP URL. header fields that use a SIP URL.
SIP URLs can define specific parameters of the request, including the
transport mechanism (UDP or TCP) and the use of multicast to make a
request. These parameters are added after the host and are separated
by semi-colons. For example, to specify to call j.doe@big.com using
multicast to 239.255.255.1 with a ttl of 15, the following URL would
be used:
sip:j.doe@big.com;maddr=239.255.255.1;ttl=15
The transport protocol UDP is to be assumed when a multicast address
is given.
3 SIP Message Overview 3 SIP Message Overview
SIP is a text-based protocol and uses the ISO 10646 character set in SIP is a text-based protocol and uses the ISO 10646 character set in
UTF-8 encoding (RFC 2279 [23]). Lines are terminated by CRLF, but UTF-8 encoding (RFC 2279 [23]). Lines are terminated by CRLF, but
receivers should be prepared to also interpret CR and LF by receivers should be prepared to also interpret CR and LF by
themselves as line terminators. themselves as line terminators.
Except for the above difference in character sets, much of the Except for the above difference in character sets, much of the
message syntax is identical to HTTP/1.1, rather than repeating it message syntax is identical to HTTP/1.1, rather than repeating it
here we use [HX.Y] to refer to Section X.Y of the current HTTP/1.1 here we use [HX.Y] to refer to Section X.Y of the current HTTP/1.1
specification (RFC 2068 [10]). In addition, we describe SIP in both specification (RFC 2068 [10]). In addition, we describe SIP in both
prose and an augmented Backus-Naur form (BNF) [H2.1] described in prose and an augmented Backus-Naur form (BNF) [H2.1] described in
skipping to change at page 18, line 16 skipping to change at page 18, line 5
receivers should be prepared to also interpret CR and LF by receivers should be prepared to also interpret CR and LF by
themselves as line terminators. themselves as line terminators.
Except for the above difference in character sets, much of the Except for the above difference in character sets, much of the
message syntax is identical to HTTP/1.1, rather than repeating it message syntax is identical to HTTP/1.1, rather than repeating it
here we use [HX.Y] to refer to Section X.Y of the current HTTP/1.1 here we use [HX.Y] to refer to Section X.Y of the current HTTP/1.1
specification (RFC 2068 [10]). In addition, we describe SIP in both specification (RFC 2068 [10]). In addition, we describe SIP in both
prose and an augmented Backus-Naur form (BNF) [H2.1] described in prose and an augmented Backus-Naur form (BNF) [H2.1] described in
detail in RFC 2234 [24]. detail in RFC 2234 [24].
Unlike HTTP, SIP MAY use UDP. When sent over TCP or UDP, multiple SIP
transactions can be carried in a single TCP connection or UDP transactions can be carried in a single TCP connection or UDP
datagram. UDP datagrams, including all headers, should not normally datagram. UDP datagrams, including all headers, should not normally
be larger than the path maximum transmission unit (MTU) if the MTU is be larger than the path maximum transmission unit (MTU) if the MTU is
known, or 1400 bytes if the MTU is unknown. known, or 1400 bytes if the MTU is unknown.
The 1400 bytes accommodates lower-layer packet headers The 1400 bytes accommodates lower-layer packet headers
within the "typical" MTU of around 1500 bytes. Recent within the "typical" MTU of around 1500 bytes. Recent
studies [25] indicate that an MTU of 1500 bytes is a studies [25] indicate that an MTU of 1500 bytes is a
reasonable assumption. The next lower common MTU values are reasonable assumption. The next lower common MTU values are
1006 bytes for SLIP and 296 for low-delay PPP (RFC 1191 1006 bytes for SLIP and 296 for low-delay PPP (RFC 1191
skipping to change at page 19, line 17 skipping to change at page 19, line 4
CRLF CRLF
[ message-body ] [ message-body ]
start-line = Request-Line | Section 4.1 start-line = Request-Line | Section 4.1
Status-Line Section 5.1 Status-Line Section 5.1
message-header = *( general-header message-header = *( general-header
| request-header | request-header
| response-header | response-header
| entity-header ) | entity-header )
general-header = Call-ID ; Section 6.12
| CSeq ; Section 6.16
| Date ; Section 6.17
| Encryption ; Section 6.18
| Expires ; Section 6.19
| From ; Section 6.20
| Record-Route ; Section 6.30
| Timestamp ; Section 6.36
| To ; Section 6.37
| Via ; Section 6.40
entity-header = Content-Encoding ; Section 6.13
| Content-Length ; Section 6.14
| Content-Type ; Section 6.15
request-header = Accept ; Section 6.7
| Accept-Encoding ; Section 6.8
| Accept-Language ; Section 6.9
| Authorization ; Section 6.11
| Hide ; Section 6.21
| Location ; Section 6.22
| Max-Forwards ; Section 6.23
| Organization ; Section 6.24
| Priority ; Section 6.25
| Proxy-Authorization ; Section 6.27
| Proxy-Require ; Section 6.28
| Route ; Section 6.32
| Require ; Section 6.29
| Response-Key ; Section 6.31
| Subject ; Section 6.35
| User-Agent ; Section 6.39
response-header = Allow ; Section 6.10
| Location ; Section 6.22
| Proxy-Authenticate ; Section 6.26
| Retry-After ; Section 6.33
| Server ; Section 6.34
| Unsupported ; Section 6.38
| Warning ; Section 6.41
| WWW-Authenticate ; Section 6.42
Table 2: SIP headers
In the interest of robustness, any leading empty line(s) MUST be In the interest of robustness, any leading empty line(s) MUST be
ignored. In other words, if the Request or Response message begins ignored. In other words, if the Request or Response message begins
with a CRLF, the CRLF should be ignored. with a CRLF, the CRLF should be ignored.
4 Request 4 Request
The Request message format is shown below: The Request message format is shown below:
Request = Request-Line ; Section 4.1 Request = Request-Line ; Section 4.1
skipping to change at page 20, line 4 skipping to change at page 20, line 20
[ message-body ] ; Section 8 [ message-body ] ; Section 8
4.1 Request-Line 4.1 Request-Line
The Request-Line begins with a method token, followed by the The Request-Line begins with a method token, followed by the
Request-URI and the protocol version, and ending with CRLF. The Request-URI and the protocol version, and ending with CRLF. The
elements are separated by SP characters. No CR or LF are allowed elements are separated by SP characters. No CR or LF are allowed
except in the final CRLF sequence. except in the final CRLF sequence.
Request-Line ___ Method SP Request-URI SP SIP-Version CRLF Request-Line ___ Method SP Request-URI SP SIP-Version CRLF
general-header = Call-ID ; Section 6.12
| CSeq ; Section 6.16
| Date ; Section 6.17
| Encryption ; Section 6.18
| Expires ; Section 6.20
| From ; Section 6.21
| Record-Route ; Section 6.33
| Timestamp ; Section 6.39
| Via ; Section 6.43
entity-header = Content-Encoding ; Section 6.13
| Content-Length ; Section 6.14
| Content-Type ; Section 6.15
| ETag ; Section 6.19
request-header = Accept ; Section 6.7
| Accept-Encoding ; Section 6.8
| Accept-Language ; Section 6.9
| Authorization ; Section 6.11
| Hide ; Section 6.22
| If-Match ; Section 6.23
| If-None-Match ; Section 6.24
| Location ; Section 6.25
| Max-Forwards ; Section 6.26
| Organization ; Section 6.27
| Priority ; Section 6.28
| Proxy-Authorization ; Section 6.30
| Proxy-Require ; Section 6.31
| Route ; Section 6.35
| Require ; Section 6.32
| Response-Key ; Section 6.34
| Subject ; Section 6.38
| To ; Section 6.40
| User-Agent ; Section 6.42
response-header = Allow ; Section 6.10
| Location ; Section 6.25
| Proxy-Authenticate ; Section 6.29
| Retry-After ; Section 6.36
| Server ; Section 6.37
| Unsupported ; Section 6.41
| Warning ; Section 6.44
| WWW-Authenticate ; Section 6.45
Table 2: SIP headers
4.2 Methods 4.2 Methods
The methods are defined below. Methods that are not supported by a The methods are defined below. Methods that are not supported by a
proxy or redirect server are treated by that server as if they were proxy or redirect server are treated by that server as if they were
an INVITE method and forwarded accordingly. an INVITE method and forwarded accordingly.
Methods that are not supported by a user agent server cause a 501 Methods that are not supported by a user agent server cause a 501
(Not Implemented) response to be returned (Section 7). (Not Implemented) response to be returned (Section 7).
skipping to change at page 21, line 33 skipping to change at page 21, line 5
receive as well as their parameters such as network destination. If receive as well as their parameters such as network destination. If
the session description format allows this, it may also indicate the session description format allows this, it may also indicate
"send-only" media. A success response indicates in its message body "send-only" media. A success response indicates in its message body
which media the callee wishes to receive. which media the callee wishes to receive.
A server MAY automatically respond to an invitation for a conference A server MAY automatically respond to an invitation for a conference
the user is already participating in, identified either by the SIP the user is already participating in, identified either by the SIP
Call-ID or a globally unique identifier within the session Call-ID or a globally unique identifier within the session
description, with a 200 (OK) response. description, with a 200 (OK) response.
If a user agents receives an INVITE with a new CSeq sequence same Call-ID, it MUST check any version identifiers in the session
number, it MUST check any version identifiers in the session
description or, if there are no version identifiers, the content of description or, if there are no version identifiers, the content of
the session description to see if it has changed. If the session the session description to see if it has changed. It MUST also
description has changed, the user agent server MUST adjust the inspect any other header fields for changes and act accordingly. If
session parameters accordingly, possibly after asking the user for the session description has changed, the user agent server MUST
confirmation. (Versioning of the session description may be used to adjust the session parameters accordingly, possibly after asking the
accommodate the capabilities of new arrivals to a conference, add or user for confirmation. (Versioning of the session description may be
delete media or change from a unicast to a multicast conference.) used to accommodate the capabilities of new arrivals to a conference,
add or delete media or change from a unicast to a multicast
conference.)
This method MUST be supported by a SIP server and client. This method MUST be supported by a SIP server and client.
4.2.2 ACK 4.2.2 ACK
The ACK request confirms that the client has received a final The ACK request confirms that the client has received a final
response to an INVITE request. 2xx responses are acknowledged by response to an INVITE request. ( ACK is used only with INVITE
client user agents, all other final responses by the first proxy or requests.) 2xx responses are acknowledged by client user agents, all
client user agent to receive the response. The Via is always other final responses by the first proxy or client user agent to
initialized to the host that originates the ACK request, i.e., the receive the response. The Via is always initialized to the host that
client user agent after a 2xx response or the first proxy to receive originates the ACK request, i.e., the client user agent after a 2xx
a non-2xx final response. The ACK request is forwarded as the response or the first proxy to receive a non-2xx final response. The
corresponding INVITE request, based on its Request-URI. See Section ACK request is forwarded as the corresponding INVITE request, based
10 for details. This method MUST be supported by a SIP server and on its Request-URI. See Section 10 for details. This method MUST be
client. supported by a SIP server and client.
The ACK request MAY contain a message body with the final session The ACK request MAY contain a message body with the final session
description to be used by the callee. If the ACK message body is description to be used by the callee. If the ACK message body is
empty, the callee uses the session description in the INVITE empty, the callee uses the session description in the INVITE
request. request.
4.2.3 OPTIONS 4.2.3 OPTIONS
The client is being queried as to its capabilities. A server that The client is being queried as to its capabilities. A server that
believes it can contact the user, such as a user agent where the user believes it can contact the user, such as a user agent where the user
skipping to change at page 22, line 38 skipping to change at page 22, line 5
The user agent client uses BYE to indicate to the server that it The user agent client uses BYE to indicate to the server that it
wishes to abort the call. A BYE request is forwarded like an INVITE wishes to abort the call. A BYE request is forwarded like an INVITE
request. It terminates any on-going searches for the named call. A request. It terminates any on-going searches for the named call. A
caller SHOULD issue a BYE request before aborting a call ("hanging caller SHOULD issue a BYE request before aborting a call ("hanging
up"). Note that a BYE request may also be issued by the callee. up"). Note that a BYE request may also be issued by the callee.
If the INVITE request contained a Location header, the callee sends If the INVITE request contained a Location header, the callee sends
the BYE request to that address rather than the From address. the BYE request to that address rather than the From address.
This method MUST be supported by proxy servers and SHOULD be
supported by all other SIP server types. supported by all other SIP server types.
4.2.5 CANCEL 4.2.5 CANCEL
The CANCEL request cancels any pending searches, but does not The CANCEL request cancels any pending searches, but does not
terminate an accepted call at a particular user agent. (A call is terminate an accepted call at a particular user agent. (A call is
considered accepted if the callee has returned a 200 (OK) status considered accepted if the callee has returned a 200 (OK) status
response.) A proxy SHOULD issue a CANCEL request to all destinations response.) Any client MAY issue a CANCEL request at any time. A
proxy, in particular, MAY choose to send a CANCEL to destinations
that have not yet returned a final response after it has received a that have not yet returned a final response after it has received a
2xx or 6xx response for one or more of the parallel-search requests. 2xx or 6xx response for one or more of the parallel-search requests.
A proxy that receives a CANCEL request forwards the request to all A proxy that receives a CANCEL request forwards the request to all
destinations with pending requests triggered by an INVITE. The destinations with pending requests triggered by an INVITE. The
Call-ID, To and From in the CANCEL request are identical to those Call-ID, To and From in the CANCEL request are identical to those
contained in the CANCEL request, but the Via header field is contained in the INVITE request, but the Via header field is
initialized to the proxy issuing the CANCEL request. initialized to the proxy issuing the CANCEL request.
Once a user agent server has received a CANCEL, it MUST NOT issue a
2xx response for the cancelled invitation.
A redirect server or user agent server returns 200 (OK) if the Call- A redirect server or user agent server returns 200 (OK) if the Call-
ID exists and 481 (Invalid Call-ID) if not, but takes no further ID exists and 481 (Invalid Call-ID) if not, but takes no further
action. In particular, any existing call is unaffected. action. In particular, any existing call is unaffected.
The BYE request cannot be used to cancel branches of a The BYE request cannot be used to cancel branches of a
parallel search, since several branches may, through parallel search, since several branches may, through
intermediate proxies, find the same user agent server and intermediate proxies, find the same user agent server and
then terminate the call. then terminate the call.
This method MUST be supported by proxy servers and SHOULD be This method MUST be supported by proxy servers and SHOULD be
skipping to change at page 23, line 38 skipping to change at page 23, line 5
SIP user agents on the same subnet MAY listen to that address and use SIP user agents on the same subnet MAY listen to that address and use
it to become aware of the location of other local users [28]; it to become aware of the location of other local users [28];
however, they do not respond to the request. however, they do not respond to the request.
The REGISTER request interprets header fields as follows. We define The REGISTER request interprets header fields as follows. We define
"address-of-record" as the SIP address that the registry knows the "address-of-record" as the SIP address that the registry knows the
registrand under, typically of the form "user@domain" rather than registrand under, typically of the form "user@domain" rather than
"user@host". In third-party registration, the entity issuing the "user@host". In third-party registration, the entity issuing the
request is different from the entity being registered. request is different from the entity being registered.
To: The To header field contains the address-of-record whose
registration is to be created or updated. registration is to be created or updated.
From: The From header field contains the address-of-record of the From: The From header field contains the address-of-record of the
person responsible for the registration. For first-party person responsible for the registration. For first-party
registration, it is identical to the To header field value. registration, it is identical to the To header field value.
Request-URI: The Request-URI names the destination of the Request-URI: The Request-URI names the destination of the
registration request, i.e., the domain of the registrar. The registration request, i.e., the domain of the registrar. The
user name MUST be empty. Generally, the domains in the user name MUST be empty. Generally, the domains in the
Request-URI and the To header have the same value; however, it Request-URI and the To header have the same value; however, it
is possible to register as a "visitor", while maintaining one's is possible to register as a "visitor", while maintaining one's
name. For example, a traveller alice@acme.com may register under name. For example, a traveller sip:alice@acme.com may register
@atlanta.ayh.org under sip:@atlanta.ayh.org , with the former as the To field and
the latter as the Request-URI. The request is no longer
forwarded once it reached the server whose authoritative domain
is the one listed in the Request-URI.
Location: If the request contains a Location header field, requests Location: If the request contains a Location header field, requests
for the Request-URI will also be directed to the address(es) for the Request-URI will also be directed to the address(es)
given. It is recommended that user agents include both SIP UDP given. It is recommended that user agents include both SIP UDP
and TCP addresses in their registration. Registrations are and TCP addresses in their registration. Registrations are
additive. additive.
We cannot require that registration and requests use the We cannot require that registration and requests use the
same transport protocol, as multicast registrations may be same transport protocol, as multicast registrations may be
quite useful. quite useful.
skipping to change at page 24, line 28 skipping to change at page 23, line 44
address in the REGISTER request as the Request-URI. If the address in the REGISTER request as the Request-URI. If the
registration is changed while a user agent or proxy server processes registration is changed while a user agent or proxy server processes
an invitation, the new information should be used. an invitation, the new information should be used.
This allows a service known as "directed pick-up". This allows a service known as "directed pick-up".
After registration, the server MAY forward incoming SIP requests to After registration, the server MAY forward incoming SIP requests to
the network source address and port that originated the registration the network source address and port that originated the registration
request. A server SHOULD silently drop the registration after one request. A server SHOULD silently drop the registration after one
hour, unless refreshed by the client. A client may request a lower or hour, unless refreshed by the client. A client may request a lower or
higher refresh interval through the Expires header (Section 6.20). higher refresh interval through the Expires header (Section 6.19).
Based on this request and its configuration, the server chooses the Based on this request and its configuration, the server chooses the
expiration interval and indicates it through the Expires header in expiration interval and indicates it through the Expires header in
the response. A single address (if host-independent) may be the response. A single address (if host-independent) may be
registered from several different clients. registered from several different clients.
A client cancels an existing registration by sending a REGISTER A client cancels an existing registration by sending a REGISTER
request with an expiration time ( Expires) of zero seconds for a request with an expiration time ( Expires) of zero seconds for a
particular Location or the wildcard Location designated by a "*" particular Location or the wildcard Location designated by a "*"
for all registrations. for all registrations.
The server SHOULD return the current list of registrations in the 200
response as Location header fields.
Beyond its use as a simple location service, this method is Beyond its use as a simple location service, this method is
needed if there are several SIP servers on a single host, needed if there are several SIP servers on a single host,
so that some cannot use the default port number. Each such so that some cannot use the default port number. Each such
server would register with a server for the administrative server would register with a server for the administrative
domain. Since a client may not have easy access to the host domain. Since a client may not have easy access to the host
address or port number, using the source address and port address or port number, using the source address and port
from the request itself seems simpler. from the request itself seems simpler.
Support of this method is RECOMMENDED. Support of this method is RECOMMENDED.
skipping to change at page 25, line 40 skipping to change at page 24, line 48
4.3.1 SIP Version 4.3.1 SIP Version
Both request and response messages include the version of SIP in use, Both request and response messages include the version of SIP in use,
and basically follow [H3.1], with HTTP replaced by SIP. To be and basically follow [H3.1], with HTTP replaced by SIP. To be
conditionally compliant with this specification, applications sending conditionally compliant with this specification, applications sending
SIP messages MUST include a SIP-Version of "SIP/2.0". SIP messages MUST include a SIP-Version of "SIP/2.0".
4.4 Option Tags 4.4 Option Tags
Option tags are unique identifiers used to designate new options in Option tags are unique identifiers used to designate new options in
SIP. These tags are used in Require (Section 6.32) and Unsupported SIP. These tags are used in Require (Section 6.29) and Unsupported
(Section 6.41) fields. (Section 6.38) fields.
Syntax: Syntax:
option-tag ___ 1*urlc option-tag ___ 1*urlc
The creator of a new SIP option should either prefix the option with
a reverse domain name or register the new option with the Internet a reverse domain name or register the new option with the Internet
Assigned Numbers Authority (IANA). For example, Assigned Numbers Authority (IANA). For example,
"com.foo.mynewfeature" is an apt name for a feature whose inventor "com.foo.mynewfeature" is an apt name for a feature whose inventor
can be reached at "foo.com". Options registered with IANA have the can be reached at "foo.com". Options registered with IANA have the
prefix "org.ietf.sip.", options described in RFCs have the prefix prefix "org.ietf.sip.", options described in RFCs have the prefix
"org.ietf.rfc.N", where N is the RFC number. Option tags are case- "org.ietf.rfc.N", where N is the RFC number. Option tags are case-
insensitive. insensitive.
4.4.1 Registering New Option Tags with IANA 4.4.1 Registering New Option Tags with IANA
skipping to change at page 27, line 4 skipping to change at page 26, line 4
Response = Status-Line ; Section 5.1 Response = Status-Line ; Section 5.1
*( general-header *( general-header
| response-header | response-header
| entity-header ) | entity-header )
CRLF CRLF
[ message-body ] ; Section 8 [ message-body ] ; Section 8
[H6] applies except that HTTP-Version is replaced by SIP-Version. [H6] applies except that HTTP-Version is replaced by SIP-Version.
Also, SIP defines additional response codes and does not use some Also, SIP defines additional response codes and does not use some
HTTP codes.
5.1 Status-Line 5.1 Status-Line
The first line of a Response message is the Status-Line, consisting The first line of a Response message is the Status-Line, consisting
of the protocol version (Section 4.3.1) followed by a numeric of the protocol version (Section 4.3.1) followed by a numeric
Status-Code and its associated textual phrase, with each element Status-Code and its associated textual phrase, with each element
separated by SP characters. No CR or LF is allowed except in the separated by SP characters. No CR or LF is allowed except in the
final CRLF sequence. final CRLF sequence.
Status-Line ___ SIP-version SP Status-Code SP Reason-Phrase CRLF Status-Line ___ SIP-version SP Status-Code SP Reason-Phrase CRLF
skipping to change at page 28, line 23 skipping to change at page 27, line 18
| Client-Error Fig. 5 | Client-Error Fig. 5
| Server-Error Fig. 6 | Server-Error Fig. 6
| Global-Failure Fig. 7 | Global-Failure Fig. 7
| extension-code | extension-code
extension-code = 3DIGIT extension-code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF> Reason-Phrase = *<TEXT, excluding CR, LF>
Informational = "100" ; Trying Informational = "100" ; Trying
| "180" ; Ringing | "180" ; Ringing
| "181" ; Call Is Being Forwarded | "181" ; Call Is Being Forwarded
| "182" ; Queued
Success = "200" ; OK Success = "200" ; OK
Figure 3: Informational and success status codes Figure 3: Informational and success status codes
Redirection = "300" ; Multiple Choices Redirection = "300" ; Multiple Choices
| "301" ; Moved Permanently | "301" ; Moved Permanently
| "302" ; Moved Temporarily | "302" ; Moved Temporarily
| "303" ; See Other | "303" ; See Other
| "305" ; Use Proxy | "305" ; Use Proxy
| "380" ; Alternative Service | "380" ; Alternative Service
Figure 4: Redirection status codes Figure 4: Redirection status codes
SIP response codes are extensible. SIP applications are not required
to understand the meaning of all registered response codes, though
such understanding is obviously desirable. However, applications MUST
understand the class of any response code, as indicated by the first
digit, and treat any unrecognized response as being equivalent to the
x00 response code of that class, with the exception that an
unrecognized response MUST NOT be cached. For example, if a client
receives an unrecognized response code of 431, it can safely assume
that there was something wrong with its request and treat the
response as if it had received a 400 (Bad Request) response code. In
Client-Error = "400" ; Bad Request Client-Error = "400" ; Bad Request
| "401" ; Unauthorized | "401" ; Unauthorized
| "402" ; Payment Required | "402" ; Payment Required
| "403" ; Forbidden | "403" ; Forbidden
| "404" ; Not Found | "404" ; Not Found
| "405" ; Method Not Allowed | "405" ; Method Not Allowed
| "407" ; Proxy Authentication Required | "407" ; Proxy Authentication Required
| "408" ; Request Timeout | "408" ; Request Timeout
| "409" ; Conflict | "409" ; Conflict
| "410" ; Gone | "410" ; Gone
| "411" ; Length Required | "411" ; Length Required
| "412" ; Precondition Failed
| "413" ; Request Message Body Too Large | "413" ; Request Message Body Too Large
| "414" ; Request-URI Too Large | "414" ; Request-URI Too Large
| "415" ; Unsupported Media Type | "415" ; Unsupported Media Type
| "420" ; Bad Extension | "420" ; Bad Extension
| "480" ; Temporarily not available | "480" ; Temporarily not available
| "481" ; Invalid Call-ID | "481" ; Invalid Call-ID
| "482" ; Loop Detected | "482" ; Loop Detected
| "483" ; Too Many Hops | "483" ; Too Many Hops
Figure 5: Client error status codes Figure 5: Client error status codes
Server-Error = "500" ; Internal Server Error Server-Error = "500" ; Internal Server Error
| "501" ; Not Implemented | "501" ; Not Implemented
| "502" ; Bad Gateway | "502" ; Bad Gateway
| "503" ; Service Unavailable | "503" ; Service Unavailable
| "504" ; Gateway Timeout | "504" ; Gateway Timeout
| "505" ; SIP Version not supported | "505" ; SIP Version not supported
Figure 6: Server error status codes Figure 6: Server error status codes
SIP response codes are extensible. SIP applications are not required
to understand the meaning of all registered response codes, though
such understanding is obviously desirable. However, applications MUST
understand the class of any response code, as indicated by the first
digit, and treat any unrecognized response as being equivalent to the
x00 response code of that class, with the exception that an
unrecognized response MUST NOT be cached. For example, if a client
receives an unrecognized response code of 431, it can safely assume
Global-Failure | "600" ; Busy
| "603" ; Decline
| "604" ; Does not exist anywhere
| "606" ; Not Acceptable
Figure 7: Global failure status Codes
that there was something wrong with its request and treat the
response as if it had received a 400 (Bad Request) response code. In
such cases, user agents SHOULD present to the user the message body
returned with the response, since that message body is likely to
include human-readable information which will explain the unusual include human-readable information which will explain the unusual
status. status.
6 Header Field Definitions 6 Header Field Definitions
SIP header fields are similar to HTTP header fields in both syntax SIP header fields are similar to HTTP header fields in both syntax
and semantics [H4.2, H14]. In general the ordering of the header and semantics [H4.2, H14]. In general the ordering of the header
fields is not of importance (with the exception of Via fields, see fields is not of importance (with the exception of Via fields, see
below), but proxies MUST NOT reorder or otherwise modify header below), but proxies MUST NOT reorder or otherwise modify header
fields other than by adding a new Via or other hop-by-hop field. fields other than by adding a new Via or other hop-by-hop field.
Proxies MUST NOT, for example, change how header fields are broken Proxies MUST NOT, for example, change how header fields are broken
across lines. This allows an authentication field to be added after across lines. This allows an authentication field to be added after
the Via fields that will not be invalidated by proxies. Global-Failure | "600" ; Busy
| "603" ; Decline
| "604" ; Does not exist anywhere
| "606" ; Not Acceptable
Figure 7: Global failure status Codes
The header fields required, optional and not applicable for each The header fields required, optional and not applicable for each
method are listed in Table 3. The table uses "o" to indicate method are listed in Table 3. The table uses "o" to indicate
optional, "m" mandatory and "-" for not applicable. A "*" indicates optional, "m" mandatory and "-" for not applicable. A "*" indicates
that the header fields are needed only if message body is not empty: that the header fields are needed only if message body is not empty:
The Content-Type and Content-Length headers are required when there The Content-Type and Content-Length headers are required when there
is a valid message body (of non-zero length) associated with the is a valid message body (of non-zero length) associated with the
message (Section 8). message (Section 8).
The "type" column describes the request and response types the header The "type" column describes the request and response types the header
skipping to change at page 31, line 25 skipping to change at page 30, line 4
6.1 General Header Fields 6.1 General Header Fields
There are a few header fields that have general applicability for There are a few header fields that have general applicability for
both request and response messages. These header fields apply only to both request and response messages. These header fields apply only to
the message being transmitted. the message being transmitted.
General-header field names can be extended reliably only in General-header field names can be extended reliably only in
combination with a change in the protocol version. However, new or combination with a change in the protocol version. However, new or
experimental header fields may be given the semantics of general experimental header fields may be given the semantics of general
header fields if all parties in the communication recognize them to type enc. e-e ACK BYE CAN INV OPT REG
be general-header fields. ________________________________________________________________________________
Accept R e o o o o o o
Accept-Encoding R e o o o o o o
Accept-Language R n e o o o o o o
Allow 405 e o o o o o o
Authorization R e o o o o o o
Call-ID g n e m m m m o -
Content-Encoding e e * - - * * *
Content-Length e e m - - m m m
Content-Type e e * - - * * *
CSeq g n e m m m m m o
Date g e o o o o o o
Encryption g n e o o o o o o
Expires g e - - - o o o
From g e m m m m m m
Hide R n h o o o o o o
Location R e - - - - - o
Location 3xx e - - o o o o
Location 2xx e - - o o o -
Max-Forwards R n e o o o o o o
Organization R c e - - - o o o
Proxy-Authenticate 407 n h o o o o o o
Proxy-Authorization R n h o o o o o o
Proxy-Require R n h o o o o o o
Priority R c e - - - o - -
Require R n e o o o o o o
Retry-After R c e - - - - - o
Retry-After 600,603 c e - - - o - -
Response-Key R c e - o o o o o
Record-Route R h o o o o o o
Record-Route 2xx h o o o o o o
Route R h - o o o o o
Server r c e o o o o o o
Subject R c e - - - o - -
Timestamp g e o o o o o o
To g n e m m m m m m
Unsupported 420 e o o o o o o
User-Agent R c e o o o o o o
Via g n e m m m m m m
Warning r e o o o o o o
WWW-Authenticate 401 c e o o o o o o
6.2 Entity Header Fields Table 3: Summary of header fields
6.2 Entity Header Fields
Entity-header fields define meta-information about the message-body Entity-header fields define meta-information about the message-body
or, if no body is present, about the resource identified by the or, if no body is present, about the resource identified by the
request. The term "entity header" is an HTTP 1.1 term where the request. The term "entity header" is an HTTP 1.1 term where the
response body may contain a transformed version of the message body.
The original message body is referred to as the "entity". We retain
the same terminology for header fields but usually refer to the the same terminology for header fields but usually refer to the
"message body" rather then the entity as the two are the same in SIP. "message body" rather then the entity as the two are the same in SIP.
6.3 Request Header Fields 6.3 Request Header Fields
The request-header fields allow the client to pass additional The request-header fields allow the client to pass additional
information about the request, and about the client itself, to the information about the request, and about the client itself, to the
server. These fields act as request modifiers, with semantics server. These fields act as request modifiers, with semantics
equivalent to the parameters on a programming language method equivalent to the parameters on a programming language method
invocation. invocation.
skipping to change at page 33, line 4 skipping to change at page 32, line 16
field-name = token field-name = token
field-value = *( field-content | LWS ) field-value = *( field-content | LWS )
field-content = < the OCTETs making up the field-value field-content = < the OCTETs making up the field-value
and consisting of either *TEXT or combinations and consisting of either *TEXT or combinations
of token, tspecials, and quoted-string> of token, tspecials, and quoted-string>
The order in which header fields are received is not significant if The order in which header fields are received is not significant if
the header fields have different field names. Multiple header fields the header fields have different field names. Multiple header fields
with the same field-name may be present in a message if and only if with the same field-name may be present in a message if and only if
the entire field-value for that header field is defined as a comma- the entire field-value for that header field is defined as a comma-
type enc. e-e ACK BYE CAN INV OPT REG
________________________________________________________________________________
Accept R e o o o o o o
Accept-Encoding R e o o o o o o
Accept-Language R n e o o o o o o
Allow 405 e o o o o o o
Authorization R e o o o o o o
Call-ID g n e m m m m o -
Content-Encoding e e * - - * * *
Content-Length e e m - - m m m
Content-Type e e * - - * * *
CSeq g n e m m m m m o
Date g e o o o o o o
Encryption g n e o o o o o o
ETag 200 e - - - o - -
Expires g e - - - o o o
From R e m m m m m m
Hide R n h o o o o o o
If-Match R e o o - - - -
If-None-Match R e o o - - - -
Location R e - - - - - o
Location 3xx e - - o o o o
Location 2xx e - - o o o -
Max-Forwards R n e o o o o o o
Organization R c e - - - o o o
Proxy-Authenticate 407 n h o o o o o o
Proxy-Authorization R n h o o o o o o
Proxy-Require R n h o o o o o o
Priority R c e - - - o - -
Require R n e o o o o o o
Retry-After R c e - - - - - o
Retry-After 600,603 c e - - - o - -
Response-Key R c e - o o o o o
Record-Route R h o o o o o o
Record-Route 2xx h o o o o o o
Route R h - o o o o o
Server r c e o o o o o o
Subject R c e - - - o - -
Timestamp g e o o o o o o
To g n e m m m m m m
Unsupported 420 e o o o o o o
User-Agent R c e o o o o o o
Via g n e m m m m m m
Warning r e o o o o o o
WWW-Authenticate 401 c e o o o o o o
Table 3: Summary of header fields
separated list (i.e., #(values)). It MUST be possible to combine the separated list (i.e., #(values)). It MUST be possible to combine the
multiple header fields into one "field-name: field-value" pair, multiple header fields into one "field-name: field-value" pair,
without changing the semantics of the message, by appending each without changing the semantics of the message, by appending each
subsequent field-value to the first, each separated by a comma. The subsequent field-value to the first, each separated by a comma. The
order in which header fields with the same field-name are received is order in which header fields with the same field-name are received is
therefore significant to the interpretation of the combined field therefore significant to the interpretation of the combined field
value, and thus a proxy MUST NOT change the order of these field value, and thus a proxy MUST NOT change the order of these field
values when a message is forwarded. values when a message is forwarded.
Field names are not case-sensitive, although their values may be. Field names are not case-sensitive, although their values may be.
skipping to change at page 34, line 40 skipping to change at page 33, line 5
6.9 Accept-Language 6.9 Accept-Language
See [H14.4] for syntax. The Accept-Language request header can be See [H14.4] for syntax. The Accept-Language request header can be
used to allow the client to indicate to the server in which language used to allow the client to indicate to the server in which language
it would prefer to receive reason phrases, session descriptions or it would prefer to receive reason phrases, session descriptions or
status responses carried as message bodies. This may also be used as status responses carried as message bodies. This may also be used as
a hint by the proxy to which destination to connect the call to a hint by the proxy to which destination to connect the call to
(e.g., for selecting a human operator). (e.g., for selecting a human operator).
Example:
Accept-Language: da, en-gb;q=0.8, en;q=0.7 Accept-Language: da, en-gb;q=0.8, en;q=0.7
6.10 Allow 6.10 Allow
See [H14.7]. The Allow entity-header field lists the set of methods See [H14.7]. The Allow entity-header field lists the set of methods
supported by the resource identified by the Request-URI. The purpose supported by the resource identified by the Request-URI. The purpose
of this field is strictly to inform the recipient of valid methods of this field is strictly to inform the recipient of valid methods
associated with the resource. An Allow header field MUST be present associated with the resource. An Allow header field MUST be present
in a 405 (Method Not Allowed) response. in a 405 (Method Not Allowed) response.
6.11 Authorization 6.11 Authorization
See [H14.8] and [30]. A user agent that wishes to authenticate itself See [H14.8] and [30]. A user agent that wishes to authenticate itself
with a server -- usually, but not necessarily, after receiving a 401 with a server -- usually, but not necessarily, after receiving a 401
skipping to change at page 35, line 49 skipping to change at page 34, line 5
different Call-IDs. If desired, the client may use identifiers different Call-IDs. If desired, the client may use identifiers
within the session description to detect this duplication. For within the session description to detect this duplication. For
example, SDP contains a session id and version number in the origin ( example, SDP contains a session id and version number in the origin (
o) field. o) field.
The Call-ID may be any string consisting of the unreserved URI The Call-ID may be any string consisting of the unreserved URI
characters that can be guaranteed to be globally unique for the characters that can be guaranteed to be globally unique for the
duration of the request. Call-IDs are case-sensitive and are not duration of the request. Call-IDs are case-sensitive and are not
URL-encoded. URL-encoded.
Since the Call-ID is generated by and for SIP, there is no
reason to deal with the complexity of URL-encoding and reason to deal with the complexity of URL-encoding and
case-ignoring string comparison. case-ignoring string comparison.
The form local-id@host is recommended, where host is either the The form UUID@host is recommended, where host is either the fully
fully qualified domain name or a globally routable IP address. The qualified domain name or a globally routable IP address. The UUID is
local-id is a version-4 (random) UUID [31]. a version-4 (random) UUID [31].
Using cryptographically random identifiers provides some Using cryptographically random identifiers provides some
protection against session hijacking. protection against session hijacking.
Call-ID = ( "Call-ID" | "i" ) ":" UUID "@" host Call-ID = ( "Call-ID" | "i" ) ":" UUID "@" host
UUID = ; see [31]
Example: Example:
Call-ID: 3436538253725150855@foo.bar.com Call-ID: f81d4fae-7dec-11d0-a765-00a0c91e6bf6@foo.bar.com
6.13 Content-Encoding 6.13 Content-Encoding
The Content-Encoding entity-header field is used as a modifier to The Content-Encoding entity-header field is used as a modifier to
the media-type. When present, its value indicates what additional the media-type. When present, its value indicates what additional
content codings have been applied to the entity-body, and thus what content codings have been applied to the entity-body, and thus what
decoding mechanisms MUST be applied in order to obtain the media-type decoding mechanisms MUST be applied in order to obtain the media-type
referenced by the Content-Type header field. Content-Encoding is referenced by the Content-Type header field. Content-Encoding is
primarily used to allow a document to be compressed without losing primarily used to allow a document to be compressed without losing
the identity of its underlying media type. See [H14.11]. the identity of its underlying media type. See [H14.11].
skipping to change at page 37, line 7 skipping to change at page 35, line 4
Content-Length = "Content-Length" ":" 1*DIGIT Content-Length = "Content-Length" ":" 1*DIGIT
An example is An example is
Content-Length: 3495 Content-Length: 3495
Applications MUST use this field to indicate the size of the Applications MUST use this field to indicate the size of the
message-body to be transferred, regardless of the media type of the message-body to be transferred, regardless of the media type of the
entity. Any Content-Length greater than or equal to zero is a valid entity. Any Content-Length greater than or equal to zero is a valid
value. If no body is present in a message, then the Content-Length value. If no body is present in a message, then the Content-Length
header MUST be set to zero. If a server receives a message without
Content-Length, it MUST assume it to be zero. Section 8 describes
how to determine the length of the message body. how to determine the length of the message body.
6.15 Content-Type 6.15 Content-Type
The Content-Type entity-header field indicates the media type of the The Content-Type entity-header field indicates the media type of the
message-body sent to the recipient. message-body sent to the recipient.
Content-Type = "Content-Type" ":" media-type Content-Type = "Content-Type" ":" media-type
Example of this header field are Example of this header field are
Content-Type: application/sdp Content-Type: application/sdp
Content-Type: text/html; charset=ISO-8859-4 Content-Type: text/html; charset=ISO-8859-4
6.16 CSeq 6.16 CSeq
Clients MUST add the CSeq (command sequence) general-header field to Clients MUST add the CSeq (command sequence) general-header field to
every request. A CSeq request header field contains a single decimal every request. A CSeq request header field contains a single decimal
sequence number chosen by the requesting client and the request sequence number chosen by the requesting client, unique within a
method. The sequence number MUST be expressible as a 64-bit unsigned single value of Call-ID or, for requests without Call-ID, within the
integer. The initial value of the sequence number is arbitrary. request type. The sequence number MUST be expressible as a 32-bit
Consecutive requests that differ in request method, headers or body, unsigned integer. The initial value of the sequence number is
but have the same Call-ID MUST contain strictly monotonically arbitrary, but a value of zero is RECOMMENDED. Consecutive requests
increasing and contiguous sequence numbers; sequence numbers do not that differ in request method, headers or body, but have the same
wrap around. Retransmissions of the same request carry the same Call-ID MUST contain strictly monotonically increasing and contiguous
sequence number, but an INVITE with a different message body (a sequence numbers; sequence numbers do not wrap around.
"re-invitation") acquires a new, higher sequence number. A server Retransmissions of the same request carry the same sequence number,
responding to a request containing a CSeq header MUST echo the value but an INVITE with a different message body or different header
in the response. If the Method value is missing, the server fills it fields (a "re-invitation") acquires a new, higher sequence number. A
it appropriately. server responding to a request containing a CSeq header MUST echo
the value in the response. If the Method value is missing, the
server fills it it appropriately.
The ACK request MUST contain the same CSeq value as the INVITE The ACK and CANCEL requests MUST contain the same CSeq value as
request that it refers to, while a BYE or CANCEL request cancelling the INVITE request that it refers to, while a BYE request
an invitation MUST have a higher sequence number. cancelling an invitation MUST have a higher sequence number.
A user agent server MUST remember the highest sequence number for any A user agent server MUST remember the highest sequence number for any
INVITE request with the same Call-ID value. The server MUST respond INVITE request with the same Call-ID value. The server MUST respond
to, but ignore any INVITE request with a lower sequence number. to, but ignore any INVITE request with a lower sequence number.
All requests spawned in a parallel search have the same CSeq value All requests spawned in a parallel search have the same CSeq value
as the request triggering the parallel search. as the request triggering the parallel search.
CSeq = "CSeq" ":" 1*DIGIT Method
Strictly speaking, CSeq header fields are needed for any Strictly speaking, CSeq header fields are needed for any
SIP request that can be cancelled by a BYE or CANCEL SIP request that can be cancelled by a BYE or CANCEL
request or where a client can issue several requests for request or where a client can issue several requests for
the same Call-ID in close succession. Without a sequence the same Call-ID in close succession. Without a sequence
number, the response to an INVITE could be mistaken for number, the response to an INVITE could be mistaken for
the response to the cancellation ( BYE or CANCEL). Also, the response to the cancellation ( BYE or CANCEL). Also,
if the network duplicates packets or if an ACK is delayed if the network duplicates packets or if an ACK is delayed
until the server has sent an additional response, the until the server has sent an additional response, the
client could interpret an old response as the response to a client could interpret an old response as the response to a
re-invitation issued shortly thereafter. Using CSeq also re-invitation issued shortly thereafter. Using CSeq also
makes it easy for the server to distinguish different makes it easy for the server to distinguish different
versions of an invitation, without comparing the message versions of an invitation, without comparing the message
body. body.
The Method value allows the client to distinguish the response to an The Method value allows the client to distinguish the response to an
INVITE request from that of a CANCEL response. INVITE request from that of a CANCEL response. CANCEL requests can
be generated by proxies; if they were to increase the sequence
number, it might conflict with a later request issued by the user
agent for the same call.
At 64 bits, a server could generate one request a second for about With a length of 32 bits, a server could generate, within a single
500 billion years before needing to wrap around. call, one request a second for about 136 years before needing to wrap
around.
Forked requests must have the same CSeq as there would be ambiguity Forked requests must have the same CSeq as there would be ambiguity
otherwise between these forked requests and later BYE issued by the otherwise between these forked requests and later BYE issued by the
client user agent. client user agent.
Example: Example:
CSeq: 4711 INVITE CSeq: 4711 INVITE
6.17 Date 6.17 Date
skipping to change at page 39, line 13 skipping to change at page 37, line 4
their own clock. their own clock.
6.18 Encryption 6.18 Encryption
The Encryption general-header field specifies that the content has The Encryption general-header field specifies that the content has
been encrypted. Section 12 describes the overall SIP security been encrypted. Section 12 describes the overall SIP security
architecture and algorithms. It is intended for end-to-end encryption architecture and algorithms. It is intended for end-to-end encryption
of requests and responses. Requests are encrypted with a public key of requests and responses. Requests are encrypted with a public key
belonging to the entity named in the To header field. Responses are belonging to the entity named in the To header field. Responses are
encrypted with the public key conveyed in the Response-Key header encrypted with the public key conveyed in the Response-Key header
field.
SIP chose not to adopt HTTP's Content-Transfer-Encoding SIP chose not to adopt HTTP's Content-Transfer-Encoding
header because the encrypted body may contain additional header because the encrypted body may contain additional
SIP header fields as well as the body of the message. SIP header fields as well as the body of the message.
For any encrypted message, at least the message body and possibly For any encrypted message, at least the message body and possibly
other message header fields are encrypted. An application receiving a other message header fields are encrypted. An application receiving a
request or response containing an Encryption header field decrypts request or response containing an Encryption header field decrypts
the body and then concatenates the plaintext to the request line and the body and then concatenates the plaintext to the request line and
headers of the original message. Message headers in the decrypted headers of the original message. Message headers in the decrypted
part completely replace those with the same field name in the part completely replace those with the same field name in the
skipping to change at page 40, line 18 skipping to change at page 38, line 4
Content-Length: 885 Content-Length: 885
Encryption: PGP,version=2.6.2,encoding=ascii Encryption: PGP,version=2.6.2,encoding=ascii
hQEMAxkp5GPd+j5xAQf/ZDIfGD/PDOM1wayvwdQAKgGgjmZWe+MTy9NEX8O25Red hQEMAxkp5GPd+j5xAQf/ZDIfGD/PDOM1wayvwdQAKgGgjmZWe+MTy9NEX8O25Red
h0/pyrd/+DV5C2BYs7yzSOSXaj1C/tTK/4do6rtjhP8QA3vbDdVdaFciwEVAcuXs h0/pyrd/+DV5C2BYs7yzSOSXaj1C/tTK/4do6rtjhP8QA3vbDdVdaFciwEVAcuXs
ODxlNAVqyDi1RqFC28BJIvQ5KfEkPuACKTK7WlRSBc7vNPEA3nyqZGBTwhxRSbIR ODxlNAVqyDi1RqFC28BJIvQ5KfEkPuACKTK7WlRSBc7vNPEA3nyqZGBTwhxRSbIR
RuFEsHSVojdCam4htcqxGnFwD9sksqs6LIyCFaiTAhWtwcCaN437G7mUYzy2KLcA RuFEsHSVojdCam4htcqxGnFwD9sksqs6LIyCFaiTAhWtwcCaN437G7mUYzy2KLcA
zPVGq1VQg83b99zPzIxRdlZ+K7+bAnu8Rtu+ohOCMLV3TPXbyp+err1YiThCZHIu zPVGq1VQg83b99zPzIxRdlZ+K7+bAnu8Rtu+ohOCMLV3TPXbyp+err1YiThCZHIu
X9dOVj3CMjCP66RSHa/ea0wYTRRNYA/G+kdP8DSUcqYAAAE/hZPX6nFIqk7AVnf6 X9dOVj3CMjCP66RSHa/ea0wYTRRNYA/G+kdP8DSUcqYAAAE/hZPX6nFIqk7AVnf6
IpWHUPTelNUJpzUp5Ou+q/5P7ZAsn+cSAuF2YWtVjCf+SQmBR13p2EYYWHoxlA2/ IpWHUPTelNUJpzUp5Ou+q/5P7ZAsn+cSAuF2YWtVjCf+SQmBR13p2EYYWHoxlA2/
GgKADYe4M3JSwOtqwU8zUJF3FIfk7vsxmSqtUQrRQaiIhqNyG7KxJt4YjWnEjF5E
WUIPhvyGFMJaeQXIyGRYZAYvKKklyAJcm29zLACxU5alX4M25lHQd9FR9Zmq6Jed
wbWvia6cAIfsvlZ9JGocmQYF7pcuz5pnczqP+/yvRqFJtDGD/v3s++G2R+ViVYJO wbWvia6cAIfsvlZ9JGocmQYF7pcuz5pnczqP+/yvRqFJtDGD/v3s++G2R+ViVYJO
z/lxGUZaM4IWBCf+4DUjNanZM0oxAE28NjaIZ0rrldDQmO8V9FtPKdHxkqA5iJP+ z/lxGUZaM4IWBCf+4DUjNanZM0oxAE28NjaIZ0rrldDQmO8V9FtPKdHxkqA5iJP+
6vGOFti1Ak4kmEz0vM/Nsv7kkubTFhRl05OiJIGr9S1UhenlZv9l6RuXsOY/EwH2 6vGOFti1Ak4kmEz0vM/Nsv7kkubTFhRl05OiJIGr9S1UhenlZv9l6RuXsOY/EwH2
z8X9N4MhMyXEVuC9rt8/AUhmVQ== z8X9N4MhMyXEVuC9rt8/AUhmVQ==
=bOW+ =bOW+
Since proxies may base their forwarding decision on any combination Since proxies may base their forwarding decision on any combination
of SIP header fields, there is no guarantee that an encrypted request of SIP header fields, there is no guarantee that an encrypted request
"hiding" header fields will reach the same destination as an "hiding" header fields will reach the same destination as an
otherwise identical un-encrypted request. otherwise identical un-encrypted request.
6.19 ETag 6.19 Expires
The ETag response-header field labels an instance of the callee. A
callee MUST include an ETag in a 200 response to an INVITE if the
Location response-header field is not sufficient to uniquely identify
the callee. Typically, this is the case if the Location header
points to a proxy rather than the callee itself. (If requests are
forked, it is possible that two or more people "pick up the phone"
for the same call.)
If the caller receives a 2xx response containing an entity tag, it
MUST include a If-Match (Section 6.23) request-header field with
that entity tag in the ACK or BYE. It would send a BYE with the
entity tag if it does not wish to talk to this particular instance of
the callee.
The entity tag consists of an opaque quoted string. An entity tag
MUST be unique across all instances associated with a particular To
URI. A given entity tag value may be used for different URIs without
implying anything about the equivalence of those URIs. It is
RECOMMENDED that the entity tag is a cryptographically random
identifier with at least 32 bits of randomness.
Note that SIP does not use the concept of "weak" entity tags [H3.11].
ETag = "ETag" ":" entity-tag
entity-tag = quoted-string
6.20 Expires
The Expires entity-header field gives the date and time after which The Expires entity-header field gives the date and time after which
the message content expires. the message content expires.
This header field is currently defined only for the REGISTER and This header field is currently defined only for the REGISTER and
INVITE methods. For REGISTER, it is a request and response-header INVITE methods. For REGISTER, it is a request and response-header
field and allows the client to indicate how long the registration is field and allows the client to indicate how long the registration is
to be valid; the server uses it to indicate when the client has to to be valid; the server uses it to indicate when the client has to
re-register. The server's choice overrides that of the client. The re-register. The server's choice overrides that of the client. The
server MAY choose a shorter time interval than that requested by the server MAY choose a shorter time interval than that requested by the
client, but SHOULD not choose a longer one. client, but SHOULD not choose a longer one.
For INVITE, it is a request and response-header field. In a request, For INVITE, it is a request and response-header field. In a request,
the callee can limit the validity of an invitation. (For example, if the callee can limit the validity of an invitation. (For example, if
a client wants to limit how long a search should take at most or when a client wants to limit how long a search should take at most or when
a conference invitation is time-limited. A user interface may take a conference invitation is time-limited. A user interface may take
this is as a hint to leave the invitation window on the screen even this is as a hint to leave the invitation window on the screen even
if the user is not currently at the workstation.) This also limits if the user is not currently at the workstation.) This also limits
the duration of a search. If the request expires before the search the duration of a search. If the request expires before the search
completes, the proxy returns a 408 (Request Timeout) status. In a completes, the proxy returns a 408 (Request Timeout) status. In a 302
302 (Moved Temporarily) response, a server can advise the client of (Moved Temporarily) response, a server can advise the client of the
the maximal duration of the redirection. maximal duration of the redirection.
The value of this field can be either an HTTP-date or an integer The value of this field can be either an HTTP-date or an integer
number of seconds (in decimal), measured from the receipt of the number of seconds (in decimal), measured from the receipt of the
request. The latter approach is preferable for short durations, as request. The latter approach is preferable for short durations, as it
it does not depend on clients and servers sharing a synchronized does not depend on clients and servers sharing a synchronized clock.
clock.
Expires = "Expires" ":" ( HTTP-date | delta-seconds ) Expires = "Expires" ":" ( HTTP-date | delta-seconds )
Two example of its use are Two example of its use are
Expires: Thu, 01 Dec 1994 16:00:00 GMT Expires: Thu, 01 Dec 1994 16:00:00 GMT
Expires: 5 Expires: 5
6.21 From 6.20 From
Requests and responses MUST contain a From general-header field, Requests and responses MUST contain a From general-header field,
indicating the invitation initiator. The server copies the To and indicating the initiator of the request. The server copies the To and
From header fields from the request to the response. From header fields from the request to the response. The optional
display-name is meant to be rendered by a human user interface.
From = ( "From" | "f" ) ":" ( name-addr | addr-spec ) From = ( "From" | "f" ) ":" ( name-addr | addr-spec )
name-addr = [ display-name ] "<" addr-spec ">" name-addr = [ display-name ] "<" addr-spec ">"
addr-spec = SIP-URL | URI addr-spec = SIP-URL | URI
display-name = *token | quoted-string display-name = *token | quoted-string
Examples: Examples:
From: A. G. Bell <sip:agb@bell-telephone.com> From: A. G. Bell <sip:agb@bell-telephone.com>
From: sip:+12125551212@server.phone2net.com From: sip:+12125551212@server.phone2net.com
From: Anonymous <sip:c8oqz84zk7z@privacy.org>
6.22 Hide Call-ID, To and From are needed to identify a call leg
matters in calls with third-party control. The format is
similar to the equivalent RFC 822 header, but with a URI
instead of just an email address.
6.21 Hide
The Hide request header field indicates that the path comprised of The Hide request header field indicates that the path comprised of
the Via header fields (Section 6.43) should be hidden from the Via header fields (Section 6.40) should be hidden from
subsequent proxies and user agents. It can take two forms: Hide: subsequent proxies and user agents. It can take two forms: Hide:
route and Hide:hop. Hide header fields are typically added by the route and Hide:hop. Hide header fields are typically added by the
client user agent, but MAY be added by any proxy along the path. client user agent, but MAY be added by any proxy along the path.
If a request contains the " Hide: route" header field, all following If a request contains the " Hide: route" header field, all following
proxies SHOULD hide their previous hop. If a request contains the " proxies SHOULD hide their previous hop. If a request contains the "
Hide: hop" header field, only the next proxy SHOULD hide the previous Hide: hop" header field, only the next proxy SHOULD hide the previous
hop and then remove the Hide option unless it also wants to remain hop and then remove the Hide option unless it also wants to remain
anonymous. anonymous.
A server hides the previous hop by encrypting the host and port A server hides the previous hop by encrypting the host and port
parts of the top-most Via header with an algorithm of its choice. parts of the top-most Via header with an algorithm of its choice.
Servers SHOULD add additional "salt" to the host and port Servers SHOULD add additional "salt" to the host and port
information prior to encryption to prevent malicious downstream information prior to encryption to prevent malicious downstream
proxies from guessing earlier parts of the path based on seeing proxies from guessing earlier parts of the path based on seeing
identical encrypted Via headers. Hidden Via fields are marked with identical encrypted Via headers. Hidden Via fields are marked with
the hidden Via option, as described in Section 6.43. the hidden Via option, as described in Section 6.40.
A server that is capable of hiding Via headers MUST attempt to
decrypt all Via headers marked as "hidden" to perform loop decrypt all Via headers marked as "hidden" to perform loop
detection. Servers that are not capable of hiding can ignore hidden detection. Servers that are not capable of hiding can ignore hidden
Via fields in their loop detection algorithm. Via fields in their loop detection algorithm.
If hidden headers were not marked, a proxy would have to If hidden headers were not marked, a proxy would have to
decrypt all headers to detect loops, just in case one was decrypt all headers to detect loops, just in case one was
encrypted, as the Hide: Hop option may have been removed encrypted, as the Hide: Hop option may have been removed
along the way. along the way.
A host MUST NOT add such a " Hide:hop" header field unless it can A host MUST NOT add such a " Hide:hop" header field unless it can
skipping to change at page 43, line 40 skipping to change at page 40, line 39
restrictions for proxies and can cause requests to generate 482 (Loop restrictions for proxies and can cause requests to generate 482 (Loop
Detected) responses that could otherwise be avoided. Detected) responses that could otherwise be avoided.
The encryption of Via header fields is described in more detail in The encryption of Via header fields is described in more detail in
Section 12. Section 12.
The Hide header field has the following syntax: The Hide header field has the following syntax:
Hide = "Hide" ":" ( "route" | "hop" ) Hide = "Hide" ":" ( "route" | "hop" )
6.23 If-Match 6.22 Location
The If-Match request-header field is used with a method to make it
conditional. The server MUST NOT perform the request unless it had
returned one of the listed entity tags in a ETag header field in a
200 response for the same Call-ID. The "*" tag matches all entity
tags, as well as the case where the server that had not returned an
entity tag. If there is no match, a user agent server MUST return a
412 (Precondition Failed) response, while a proxy server forwards the
request according to the Request-URI. A proxy server that receives
an ACK with a matching entity tag MUST NOT forward the request.
If-Match = "If-Match" ":" ( "*" | 1#entity-tag )
The If-Match allows a caller to select among a set of callee that
answer to the same request-URI and To.
Example:
If-Match: "83ja", "148293289"
6.24 If-None-Match
The If-None-Match request-header field is used with a method to make
the method conditional. The server compares the list of entity tags
in the If-None-Match header to the entity tag that it had returned
in an ETag header (Section 6.19) as part of a 200 response for the
same Call-ID. The value "*" matches any entity tag. If one of the
entity tag in the If-None-Match header matches the ETag entity tag,
a user agent server MUST NOT perform the method requested and respond
with a status of 412 (Precondition Failed) instead while a proxy
server forwards the request. (The "*" value is included for symmetry
with If-Match only and currently has no practical application.)
If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag )
Example:
If-None-Match: "83ja", "148293289"
6.25 Location
The Location general-header field can appear in requests, 2xx The Location general-header field can appear in requests, 2xx
responses and 3xx responses. responses and 3xx responses.
REGISTER requests: REGISTER requests MAY contain Location header REGISTER requests: REGISTER requests MAY contain Location header
fields. They indicate under which locations the user may be fields. They indicate under which locations the user may be
reachable. The REGISTER request defines a wildcard Location reachable. The REGISTER request defines a wildcard Location
field, "*". that is only used with Expires: 0 to remove all field, "*". that is only used with Expires: 0 to remove all
registrations for a particular user. registrations for a particular user.
INVITE and ACK requests: INVITE and ACK requests MAY contain INVITE and ACK requests: INVITE and ACK requests MAY contain
Location headers indicating the location the request is Location headers indicating the location the request is
originating from. originating from. If the SIP address does not refer to the user
several locations within the same domain served by the proxy.)
This allows the callee to send a BYE directly to the This allows the callee to send a BYE directly to the
caller instead of through a series of proxies. The Via caller instead of through a series of proxies. The Via
header is not sufficient since the desired address may be header is not sufficient since the desired address may be
that of a proxy. that of a proxy.
INVITE 2xx responses: A user agent server sending a definitive,
positive response (2xx), MAY insert a Location response header
indicating the SIP address under which it is reachable most
directly for future SIP requests, such as ACK. This may be the
address of the server itself or that of a proxy, e.g., if the
host is behind a firewall. If the SIP address does not refer to
the user agent server, the SIP URL MUST contain a tag parameter
uniquely identifying the user agent. (The same person may be
logged on at several locations within the same domain served by
the proxy.) The value of this Location header is copied into
the Request-URI of subsequent ACK and BYE requests for this
call.
REGISTER 2xx responses: Similarly, a REGISTER response SHOULD return
all locations that a user is currently reachable under.
3xx responses: The Location response-header field can be used with a 3xx responses: The Location response-header field can be used with a
3xx response codes to indicate one or more addresses to try. It 3xx response codes to indicate one or more addresses to try. It
can appear in responses to INVITE and OPTIONS methods. The can appear in responses to INVITE and OPTIONS methods. The
Location header field contains URIs giving the new locations or Location header field contains URIs giving the new locations or
user names to try, or may simply specify additional transport user names to try, or may simply specify additional transport
parameters. A 301 (Moved Permanently) or 302 (Moved Temporarily) parameters. A 301 (Moved Permanently) or 302 (Moved Temporarily)
response SHOULD contain a Location field containing URIs of new response SHOULD contain a Location field containing URIs of new
addressed to be tried. A 301 or 302 response may also give the addressed to be tried. A 301 or 302 response may also give the
same location and username that was being tried but specify same location and username that was being tried but specify
additional transport parameters such as a multicast address to additional transport parameters such as a multicast address to
try or a change of SIP transport from UDP to TCP or vice versa. try or a change of SIP transport from UDP to TCP or vice versa.
INVITE 2xx responses: A user agent server sending a definitive,
positive response (2xx), MAY insert a Location response header
indicating the SIP address under which it is reachable most
directly for future SIP requests, such as ACK. This may be the
address of the server itself or that of a proxy, e.g., if the
host is behind a firewall. The value of this Location header is
copied into the Request-URI and the To header of subsequent
ACK and BYE requests for this call.
REGISTER 2xx responses: Similarly, a REGISTER response SHOULD return
all locations that a user is currently reachable under.
Note that the Location header may also refer to a different entity Note that the Location header may also refer to a different entity
than the one originally called. For example, a SIP call connected to than the one originally called. For example, a SIP call connected to
GSTN gateway may need to deliver a special information announcement GSTN gateway may need to deliver a special information announcement
such as "The number you have dialed has been changed." such as "The number you have dialed has been changed."
A Location response header may contain any suitable URI indicating A Location response header may contain any suitable URI indicating
where the called party may be reached, not limited to SIP URLs. For where the called party may be reached, not limited to SIP URLs. For
example, it may contain a phone or fax URL [22], a mailto: URL [19] example, it may contain a phone or fax URL [22], a mailto: URL [19]
or irc: URL. or irc: URL.
The following parameters are defined. Additional parameters may be The following parameters are defined. Additional parameters may be
defined in other specifications. defined in other specifications.
q: The qvalue indicates the relative preference among the locations q: The qvalue indicates the relative preference among the locations
given. qvalue values are decimal numbers from 0.0 to 1.0, with given. qvalue values are decimal numbers from 0.0 to 1.0, with
higher values indicating higher preference.
action: The action is only used when registering with the REGISTER action: The action is only used when registering with the REGISTER
request. It indicates how the client wishes forwarding to occur, request. It indicates how the client wishes forwarding to occur,
by proxying or by redirection. The action taken if this by proxying or by redirection. The action taken if this
parameter is not specified depends on server configuration. In parameter is not specified depends on server configuration. In
its response, the registrar SHOULD indicate the mode used. This its response, the registrar SHOULD indicate the mode used. This
parameter is ignored for other requests. parameter is ignored for other requests.
Location = ( "Location" | "m" ) ("*" | (1# (( SIP-URL | URI ) Location = ( "Location" | "m" ) ":" ("*" | (1# (( SIP-URL | URI )
*( ";" location-params ))) *( ";" location-params )))
location-params = "q" "=" qvalue location-params = "q" "=" qvalue
| "action" "=" "proxy" | "redirect" | "action" "=" "proxy" | "redirect"
| extension-attribute | extension-attribute
extension-attribute = extension-name [ "=" extension-value ] extension-attribute = extension-name [ "=" extension-value ]
Example: Example:
Location: sip:watson@worcester.bell-telephone.com ;q=0.7, Location: sip:watson@worcester.bell-telephone.com;tag=123
;q=0.7,
mailto:watson@bell-telephone.com ;q=0.1 mailto:watson@bell-telephone.com ;q=0.1
6.26 Max-Forwards 6.23 Max-Forwards
The Max-Forwards request-header field may be used with any SIP The Max-Forwards request-header field may be used with any SIP
method to limit the number of proxies or gateways that can forward method to limit the number of proxies or gateways that can forward
the request to the next inbound server. This can also be useful when the request to the next inbound server. This can also be useful when
the client is attempting to trace a request chain which appears to be the client is attempting to trace a request chain which appears to be
failing or looping in mid-chain. [H14.31] failing or looping in mid-chain. [H14.31]
Max-Forwards = "Max-Forwards" ":" 1*DIGIT Max-Forwards = "Max-Forwards" ":" 1*DIGIT
The Max-Forwards value is a decimal integer indicating the remaining The Max-Forwards value is a decimal integer indicating the remaining
number of times this request message may be forwarded. number of times this request message may be forwarded.
Each proxy or gateway recipient of a request containing a Max- Each proxy or gateway recipient of a request containing a Max-
Forwards header field MUST check and update its value prior to Forwards header field MUST check and update its value prior to
forwarding the request. If the received value is zero (0), the forwarding the request. If the received value is zero (0), the
recipient MUST NOT forward the request. Instead, for the OPTIONS and recipient MUST NOT forward the request. Instead, for the OPTIONS and
REGISTER methods, it MUST respond as the final recipient. For all REGISTER methods, it MUST respond as the final recipient. For all
other methods, the server returns 483 (Too many hops).
If the received Max-Forwards value is greater than zero, then the If the received Max-Forwards value is greater than zero, then the
forwarded message MUST contain an updated Max-Forwards field with a forwarded message MUST contain an updated Max-Forwards field with a
value decremented by one (1). value decremented by one (1).
Example: Example:
Max-Forwards: 6 Max-Forwards: 6
6.27 Organization 6.24 Organization
The Organization request-header field conveys the name of the The Organization request-header field conveys the name of the
organization to which the callee belongs. It may also be inserted by organization to which the callee belongs. It may also be inserted by
proxies at the boundary of an organization and may be used by client proxies at the boundary of an organization and may be used by client
software to filter calls. software to filter calls.
Organization = "Organization" ":" *text Organization = "Organization" ":" *text
6.28 Priority 6.25 Priority
The Priority request header signals the urgency of the call to the The Priority request header signals the urgency of the call to the
callee. callee.
Priority = "Priority" ":" priority-value Priority = "Priority" ":" priority-value
priority-value = "emergency" | "urgent" | "normal" | "non-urgent" priority-value = "emergency" | "urgent" | "normal"
| "non-urgent"
The value of "emergency" should only be used when life, limb or The value of "emergency" should only be used when life, limb or
property are in imminent danger. property are in imminent danger.
Examples: Examples:
Subject: A tornado is heading our way! Subject: A tornado is heading our way!
Priority: emergency Priority: emergency
Subject: Weekend plans Subject: Weekend plans
Priority: non-urgent Priority: non-urgent
These are the values of RFC 2076, with the addition of These are the values of RFC 2076, with the addition of
"emergency". "emergency".
6.29 Proxy-Authenticate
The Proxy-Authenticate response-header field MUST be included as The Proxy-Authenticate response-header field MUST be included as
part of a 407 (Proxy Authentication Required) response. The field part of a 407 (Proxy Authentication Required) response. The field
value consists of a challenge that indicates the authentication value consists of a challenge that indicates the authentication
scheme and parameters applicable to the proxy for this Request-URI. scheme and parameters applicable to the proxy for this Request-URI.
See [H14.33] for further details. See [H14.33] for further details.
A client SHOULD cache the credentials used for a particular proxy A client SHOULD cache the credentials used for a particular proxy
server and realm for the next request to that server. Credentials server and realm for the next request to that server. Credentials
are, in general, valid for a specific value of the Request-URI at a are, in general, valid for a specific value of the Request-URI at a
skipping to change at page 48, line 34 skipping to change at page 44, line 27
credentials for the particular Request-URI, it MAY attempt to use credentials for the particular Request-URI, it MAY attempt to use
the most-recently used credential. The server responds with 401 the most-recently used credential. The server responds with 401
(Unauthorized) if the client guessed wrong. (Unauthorized) if the client guessed wrong.
This suggested caching behavior is motivated by proxies This suggested caching behavior is motivated by proxies
restricting phone calls to authenticated users. It seems restricting phone calls to authenticated users. It seems
likely that in most cases, all destinations require the likely that in most cases, all destinations require the
same password. Note that end-to-end authentication is same password. Note that end-to-end authentication is
likely to be destination-specific. likely to be destination-specific.
6.30 Proxy-Authorization 6.27 Proxy-Authorization
The Proxy-Authorization request-header field allows the client to The Proxy-Authorization request-header field allows the client to
identify itself (or its user) to a proxy which requires identify itself (or its user) to a proxy which requires
authentication. The Proxy-Authorization field value consists of authentication. The Proxy-Authorization field value consists of
credentials containing the authentication information of the user credentials containing the authentication information of the user
agent for the proxy and/or realm of the resource being requested. See agent for the proxy and/or realm of the resource being requested. See
[H14.34] for further details. [H14.34] for further details.
6.31 Proxy-Require 6.28 Proxy-Require
The Proxy-Require header is used to indicate proxy-sensitive The Proxy-Require header is used to indicate proxy-sensitive
features that MUST be supported by the proxy. Any Proxy-Require features that MUST be supported by the proxy. Any Proxy-Require
header features that are not supported by the proxy MUST be header features that are not supported by the proxy MUST be
negatively acknowledged by the proxy to the client if not supported. negatively acknowledged by the proxy to the client if not supported.
Servers treat this field identically to the Require field. Servers treat this field identically to the Require field.
See Section 6.32 for more details on the mechanics of this message See Section 6.29 for more details on the mechanics of this message
and a usage example. and a usage example.
6.32 Require 6.29 Require
The Require request header is used by clients to tell user agent The Require request header is used by clients to tell user agent
servers about options that the client expects the server to support servers about options that the client expects the server to support
in order to properly process the request. If a server does not in order to properly process the request. If a server does not
understand the option, it MUST respond by returning status code 420 understand the option, it MUST respond by returning status code 420
(Bad Extension) and list those options it does not understand in the (Bad Extension) and list those options it does not understand in the
Unsupported header. Unsupported header.
Require = "Require" ":" 1#option-tag Require = "Require" ":" 1#option-tag
skipping to change at page 49, line 44 skipping to change at page 45, line 30
client-server pair, the interaction proceeds quickly, client-server pair, the interaction proceeds quickly,
saving a round-trip often required by negotiation saving a round-trip often required by negotiation
mechanisms. In addition, it also removes ambiguity when the mechanisms. In addition, it also removes ambiguity when the
client requires features that the server does not client requires features that the server does not
understand. Some features, such as call handling fields, understand. Some features, such as call handling fields,
are only of interest to end systems. are only of interest to end systems.
Proxy and redirect servers MUST ignore features that are not Proxy and redirect servers MUST ignore features that are not
understood. If a particular extension requires that intermediate understood. If a particular extension requires that intermediate
devices support it, the extension should be tagged in the Proxy- devices support it, the extension should be tagged in the Proxy-
Require field instead (see Section 6.31). Require field instead (see Section 6.28).
6.33 Record-Route 6.30 Record-Route
The Record-Route request and response header field is added to an The Record-Route request and response header field is added to an
INVITE request by any proxy that insists on being in the path of INVITE request by any proxy that insists on being in the path of
subsequent ACK and BYE requests for the same call. It contains a subsequent ACK and BYE requests for the same call. It contains a
globally reachable Request-URI that identifies the proxy server. globally reachable Request-URI that identifies the proxy server.
Each proxy server adds its Request-URI to the beginning of the list. Each proxy server adds its Request-URI to the beginning of the list.
The client copies the Record-Route header unchanged into the The server copies the Record-Route header unchanged into the
response. ( Record-Route is only relevant for 2xx responses.) response. ( Record-Route is only relevant for 2xx responses.)
The calling user agent client copies the Record-Route header into a The calling user agent client copies the Record-Route header into a
Route header of subsequent requests, reversing the order of requests, Route header of subsequent requests, reversing the order of requests,
so that the first entry is closest to the caller. If the response so that the first entry is closest to the caller. If the response
contained a Location header field, the calling user agent adds its contained a Location header field, the calling user agent adds its
content as the last Route header. Unless this would cause a loop, content as the last Route header. Unless this would cause a loop,
any clientMUST send any subsequent requests for this Call-ID to the any clientMUST send any subsequent requests for this Call-ID to the
first Request-URI in the Route request header and remove that entry. first Request-URI in the Route request header and remove that entry.
Some proxies, such as those controlling firewalls or in an
automatic call distribution (ACD) system, need to maintain
call state and thus need to receive any BYE and ACK call state and thus need to receive any BYE and ACK
packets for the call. packets for the call.
The Record-Route header field has the following syntax: The Record-Route header field has the following syntax:
Record-Route = "Record-Route" ":" 1# request-uri Record-Route = "Record-Route" ":" 1# request-uri
Example for a request that has traversed the hosts ieee.org and Example for a request that has traversed the hosts ieee.org and
bell-telephone.com , in that order: bell-telephone.com , in that order:
Record-Route: sip:a.g.bell@bell-telephone.com, sip:a.bell@ieee.org Record-Route: sip:a.g.bell@bell-telephone.com, sip:a.bell@ieee.org
6.34 Response-Key 6.31 Response-Key
The Response-Key request header field can be used by a client to The Response-Key request header field can be used by a client to
request the key that the called user agent SHOULD use to encrypt the request the key that the called user agent SHOULD use to encrypt the
response with. The syntax is: response with. The syntax is:
Response-Key = "Response-Key" ":" key-scheme 1*SP #key-param Response-Key = "Response-Key" ":" key-scheme 1*SP #key-param
key-scheme = token key-scheme = token
key-param = token "=" ( token | quoted-string ) key-param = token "=" ( token | quoted-string )
The key-scheme gives the type of encryption to be used for response. The key-scheme gives the type of encryption to be used for response.
skipping to change at page 51, line 18 skipping to change at page 46, line 39
If the client insists that the server return an encrypted response, If the client insists that the server return an encrypted response,
it includes a it includes a
Require: org.ietf.sip.encrypt-response Require: org.ietf.sip.encrypt-response
header field in its request. If the client cannot encrypt for header field in its request. If the client cannot encrypt for
whatever reason, it MUST follow normal Require header field whatever reason, it MUST follow normal Require header field
procedures and return an 420 (Bad Extension) response. If this procedures and return an 420 (Bad Extension) response. If this
Require header is not present, a client SHOULD still encrypt, but MAY Require header is not present, a client SHOULD still encrypt, but MAY
return an unencrypted response if unable to. return an unencrypted response if unable to.
6.35 Route 6.32 Route
The Route request header determines the route taken by a request. The Route request header determines the route taken by a request.
Each host removes the first entry and then proxies the request to the Each host removes the first entry and then proxies the request to the
host listed in that entry, also using it as the Request-URI. The host listed in that entry, also using it as the Request-URI. The
operation is further described in Section 6.33. operation is further described in Section 6.30.
The Route header field has the following syntax: The Route header field has the following syntax:
Route = "Route" ":" 1# request-uri 6.33 Retry-After
6.36 Retry-After
The Retry-After response header field can be used with a 503 The Retry-After response header field can be used with a 503
(Service Unavailable) response to indicate how long the service is (Service Unavailable) response to indicate how long the service is
expected to be unavailable to the requesting client and with a 404 expected to be unavailable to the requesting client and with a 404
(Not Found), 600 (Busy), or 603 (Decline) response to indicate when (Not Found), 600 (Busy), or 603 (Decline) response to indicate when
the called party may be available again. The value of this field can the called party may be available again. The value of this field can
be either an HTTP-date or an integer number of seconds (in decimal) be either an HTTP-date or an integer number of seconds (in decimal)
after the time of the response. after the time of the response.
A REGISTER request may include this header field when deleting A REGISTER request may include this header field when deleting
skipping to change at page 52, line 19 skipping to change at page 47, line 40
Retry-After: Mon, 21 Jul 1997 18:48:34 GMT (I'm in a meeting) Retry-After: Mon, 21 Jul 1997 18:48:34 GMT (I'm in a meeting)
Retry-After: Mon, 1 Jan 9999 00:00:00 GMT Retry-After: Mon, 1 Jan 9999 00:00:00 GMT
(Dear John: Don't call me back, ever) (Dear John: Don't call me back, ever)
Retry-After: Fri, 26 Sep 1997 21:00:00 GMT;duration=3600 Retry-After: Fri, 26 Sep 1997 21:00:00 GMT;duration=3600
Retry-After: 120 Retry-After: 120
In the third example, the callee is reachable for one hour starting In the third example, the callee is reachable for one hour starting
at 21:00 GMT. In the last example, the delay is 2 minutes. at 21:00 GMT. In the last example, the delay is 2 minutes.
6.37 Server 6.34 Server
The Server response-header field contains information about the The Server response-header field contains information about the
software used by the user agent server to handle the request. See software used by the user agent server to handle the request. See
[H14.39]. [H14.39].
6.38 Subject 6.35 Subject
This is intended to provide a summary, or indicate the nature, of the This is intended to provide a summary, or indicate the nature, of the
call, allowing call filtering without having to parse the session call, allowing call filtering without having to parse the session
description. (Also, the session description may not necessarily use description. (Also, the session description may not necessarily use
the same subject indication as the invitation.)
Subject = ( "Subject" | "s" ) ":" *text Subject = ( "Subject" | "s" ) ":" *text
Example: Example:
Subject: Tune in - they are talking about your work! Subject: Tune in - they are talking about your work!
6.39 Timestamp 6.36 Timestamp
The timestamp general header describes when the client sent the The timestamp general header describes when the client sent the
request to the server. The value of the timestamp is of significance request to the server. The value of the timestamp is of significance
only to the client and may use any timescale. The server MUST echo only to the client and may use any timescale. The server MUST echo
the exact same value and MAY, if it has accurate information about the exact same value and MAY, if it has accurate information about
this, add a floating point number indicating the number of seconds this, add a floating point number indicating the number of seconds
that have elapsed since it has received the request. The timestamp is that have elapsed since it has received the request. The timestamp is
used by the client to compute the round-trip time to the server so used by the client to compute the round-trip time to the server so
that it can adjust the timeout value for retransmissions. that it can adjust the timeout value for retransmissions.
Timestamp = "Timestamp" ":" *(DIGIT) [ "." *(DIGIT) ] [ delay ] Timestamp = "Timestamp" ":" *(DIGIT) [ "." *(DIGIT) ] [ delay ]
delay = *(DIGIT) [ "." *(DIGIT) ] delay = *(DIGIT) [ "." *(DIGIT) ]
6.40 To 6.37 To
The To request header field specifies the invited user, with the The To general-header field specifies the invited user, with the
same SIP URL syntax as the From field. same SIP URL syntax as the From field.
To = ( "To" | "t" ) ":" ( name-addr | addr-spec ) To = ( "To" | "t" ) ":" ( name-addr | addr-spec )
A SIP server returns a 400 (Bad Request) response if it receives a A SIP server returns a 400 (Bad Request) response if it receives a
request with a To header field containing a URI with a scheme it request with a To header field containing a URI with a scheme it
does not recognize. does not recognize.
Example: Example:
To: The Operator <sip:operator@cs.columbia.edu> To: The Operator <sip:operator@cs.columbia.edu>
To: sip:+12125551212@server.phone2net.com To: sip:+12125551212@server.phone2net.com
6.41 Unsupported Call-ID, To and From are needed to identify a call leg
matters in calls with third-party control.
The Unsupported response header lists the features not supported by The Unsupported response header lists the features not supported by
the server. See Section 6.32 for a usage example and motivation. the server. See Section 6.29 for a usage example and motivation.
6.42 User-Agent 6.39 User-Agent
The User-Agent request-header field contains information about the The User-Agent request-header field contains information about the
client user agent originating the request. See [H14.42]. client user agent originating the request. See [H14.42].
6.43 Via 6.40 Via
The Via field indicates the path taken by the request so far. This The Via field indicates the path taken by the request so far. This
prevents request looping and ensures replies take the same path as prevents request looping and ensures replies take the same path as
the requests, which assists in firewall traversal and other unusual the requests, which assists in firewall traversal and other unusual
routing situations. routing situations.
6.43.1 Requests 6.40.1 Requests
The client originating the request MUST insert into the request a Via The client originating the request MUST insert into the request a Via
field containing its host name or network address and, if not the field containing its host name or network address and, if not the
default port number, the port number it wishes to receive responses default port number, the port number it wishes to receive responses
at. (Note that this port number may differ from the UDP source port at. (Note that this port number may differ from the UDP source port
number of the request.) A fully-qualified domain name is RECOMMENDED. number of the request.) A fully-qualified domain name is RECOMMENDED.
Each subsequent proxy server that sends the request onwards MUST add Each subsequent proxy server that sends the request onwards MUST add
its own additional Via field before any existing Via fields. its own additional Via field before any existing Via fields.
A proxy that receives a redirection (3xx) response and then searches A proxy that receives a redirection (3xx) response and then searches
skipping to change at page 54, line 40 skipping to change at page 50, line 5
responses return with reversed source and destination responses return with reversed source and destination
ports. ports.
Additionally, if the message goes to a multicast address, an extra Additionally, if the message goes to a multicast address, an extra
Via field is added by the sender before all the other Via fields Via field is added by the sender before all the other Via fields
giving the multicast address and TTL. giving the multicast address and TTL.
If a proxy server receives a request which contains its own address, If a proxy server receives a request which contains its own address,
it MUST respond with a 482 (Loop Detected) status code. it MUST respond with a 482 (Loop Detected) status code.
This prevents a malfunctioning proxy server from causing
loops. Also, it cannot be guaranteed that a proxy server loops. Also, it cannot be guaranteed that a proxy server
can always detect that the address returned by a location can always detect that the address returned by a location
service refers to a host listed in the Via list, as a service refers to a host listed in the Via list, as a
single host may have aliases or several network interfaces. single host may have aliases or several network interfaces.
6.43.2 Receiver-tagged Via Fields 6.40.2 Receiver-tagged Via Fields
Normally every host that sends or forwards a SIP message adds a Via Normally every host that sends or forwards a SIP message adds a Via
field indicating the path traversed. However, it is possible that field indicating the path traversed. However, it is possible that
Network Address Translators (NAT) may change the source address of Network Address Translators (NAT) may change the source address of
the request, in which case the Via field cannot be relied on to route the request, in which case the Via field cannot be relied on to
replies. To prevent this, a proxy SHOULD check the top-most Via route replies. To prevent this, a proxy SHOULD check the top-most
header to ensure that it contains the sender's correct network Via header to ensure that it contains the sender's correct network
address, as seen from that proxy. If the sender's address is address, as seen from that proxy. If the sender's address is
incorrect, the proxy should add a received tag to the Via field incorrect, the proxy should add a received tag to the Via field
inserted by the previous hop. Such a modified Via field is known as a inserted by the previous hop. Such a modified Via field is known as a
receiver-tagged Via field. An example is: receiver-tagged Via field. An example is:
Via: SIP/2.0/UDP erlang.bell-telephone.com:5060 Via: SIP/2.0/UDP erlang.bell-telephone.com:5060
Via: SIP/2.0/UDP 10.0.0.1:5060, received=199.172.136.3 Via: SIP/2.0/UDP 10.0.0.1:5060 ;received=199.172.136.3
In this example, the message went from 10.0.0.1 and through a NAT In this example, the message went from 10.0.0.1 and through a NAT
using external address border.ieee.org (199.172.136.3) to using external address border.ieee.org (199.172.136.3) to
erlang.bell-telephone.com tagged the previous hop's Via field with erlang.bell-telephone.com tagged the previous hop's Via field with
the address that it actually came from. the address that it actually came from.
6.43.3 Responses 6.40.3 Responses
In the return path, Via fields are processed by a proxy or client In the return path, Via fields are processed by a proxy or client
according to the following rules: according to the following rules:
1. The first Via field should indicate the proxy or client 1. The first Via field should indicate the proxy or client
processing this message. If it does not, discard the processing this message. If it does not, discard the
message. Otherwise, remove this Via field. message. Otherwise, remove this Via field.
2. If the second Via field in a response is a multicast 2. If the second Via field in a response is a multicast
address, remove that Via field, and send the message to address, remove that Via field, and send the message to
the multicast address indicated. the multicast address indicated.
3. If the second Via field is a receiver-tagged field 3. If the second Via field is a receiver-tagged field
(Section 6.43.2) send the message to the address in the (Section 6.40.2), send the message to the address in the
received tag rather than that in the main part of the Via received tag. Otherwise, send send the message to the
field. address indicated in the sent-by parameter.
4. If the second Via field exists, send the message to the 4. If there is no second Via field, this response is destined
address indicated. If there is no second Via field, this for this client.
response is destined for this client.
These rules ensure that a proxy server only has to check the first These rules ensure that a client only has to check the first Via
Via field in a response to see if it needs processing. A user agent server or redirect server returns the response to the
network address where the request came from. (Since these servers do
not forward the request, they do not add a received tag.)
6.43.4 Syntax 6.40.4 Syntax
The format for a Via header is: The format for a Via header is:
Via = ( "Via" | "v") ":" 1#( sent-protocol sent-by Via = ( "Via" $|$ "v") ":" 1#( sent-protocol sent-by
*( ";" via-params ) [ comment ] ) *( ";" via-params ) [ comment ] )
via-params = via-hidden | via-ttl | via-received | via-branch via-params = via-hidden | via-ttl | via-received
| via-branch
via-hidden = "hidden" via-hidden = "hidden"
via-ttl = "ttl" "=" ttl via-ttl = "ttl" "=" ttl
via-received = "received" "=" host via-received = "received" "=" host
via-branch = "branch" "=" token via-branch = "branch" "=" token
sent-protocol = [ protocol-name "/" ] protocol-version sent-protocol = [ protocol-name "/" ] protocol-version
[ "/" transport ] [ "/" transport ]
protocol-name = "SIP" | token protocol-name = "SIP" $|$ token
protocol-version = token protocol-version = token
transport = "UDP" | "TCP" | token transport = "UDP" $|$ "TCP" $|$ token
sent-by = ( host [ ":" port ] ) | ( concealed-host ) sent-by = ( host [ ":" port ] ) $|$ ( concealed-host )
concealed-host = token concealed-host = token
ttl = 1*3DIGIT ; 0 to 255 ttl = 1*3DIGIT ; 0 to 255
The " ttl" parameter is included only if the address is a multicast The " ttl" parameter is included only if the address is a multicast
address. The " received" parameter is added only for receiver-added address. The " received" parameter is added only for receiver-added
Via fields (Section 6.43.2). For reasons of privacy, a client or Via fields (Section 6.40.2). For reasons of privacy, a client or
proxy may wish to hide its Via information by encrypting it (see proxy may wish to hide its Via information by encrypting it (see
Section 6.22). The " hidden" parameter is included if this header Section 6.21). The " hidden" parameter is included if this header
was hidden by the upstream proxy (see 6.22). was hidden by the upstream proxy (see 6.21).
The " branch" parameter is included by every forking proxy. The The " branch" parameter is included by every forking proxy. The
token uniquely identifies a branch of a particular search. The token uniquely identifies a branch of a particular search. The
identifier has to be unique only within a set of isomorphic requests. identifier has to be unique only within a set of isomorphic requests.
Note that privacy of the proxy relies on the cooperation of the next Note that privacy of the proxy relies on the cooperation of the next
hop, as the next-hop proxy will, by necessity, know the IP address hop, as the next-hop proxy will, by necessity, know the IP address
and port number of the source host. and port number of the source host.
Via: SIP/2.0/UDP first.example.com:4000 Via: SIP/2.0/UDP first.example.com:4000
Via: SIP/2.0/UDP adk8 Via: SIP/2.0/UDP adk8
6.44 Warning 6.41 Warning
The Warning response-header field is used to carry additional The Warning response-header field is used to carry additional
information about the status of a response. Warning headers are sent
with responses and have the following format:
Warning = "Warning" ":" 1#warning-value Warning = "Warning" ":" 1#warning-value
warning-value = warn-code SP warn-agent SP warn-text warning-value = warn-code SP warn-agent SP warn-text
warn-code = 3DIGIT "." 2DIGIT warn-code = 3DIGIT "." 2DIGIT
warn-agent = ( host [ ":" port ] ) | pseudonym warn-agent = ( host [ ":" port ] ) | pseudonym
; the name or pseudonym of the server adding ; the name or pseudonym of the server adding
; the Warning header, for use in debugging ; the Warning header, for use in debugging
warn-text = quoted-string warn-text = quoted-string
A response may carry more than one Warning header. A response may carry more than one Warning header.
skipping to change at page 57, line 38 skipping to change at page 52, line 40
early in the response. early in the response.
Systems that generate multiple Warning headers should order them Systems that generate multiple Warning headers should order them
with this user agent behavior in mind. with this user agent behavior in mind.
Example: Example:
Warning: 606.4 isi.edu Multicast not available Warning: 606.4 isi.edu Multicast not available
Warning: 606.2 isi.edu Incompatible protocol (RTP/XXP) Warning: 606.2 isi.edu Incompatible protocol (RTP/XXP)
6.45 WWW-Authenticate 6.42 WWW-Authenticate
The WWW-Authenticate response-header field MUST be included in 401 The WWW-Authenticate response-header field MUST be included in 401
(Unauthorized) response messages. The field value consists of at (Unauthorized) response messages. The field value consists of at
least one challenge that indicates the authentication scheme(s) and least one challenge that indicates the authentication scheme(s) and
parameters applicable to the Request-URI. parameters applicable to the Request-URI.
See [H14.46] and [30]. See [H14.46] and [30].
The WWW-Authenticate response-header field MUST be included in 401 The WWW-Authenticate response-header field MUST be included in 401
(Unauthorized) response messages. (Unauthorized) response messages.
The content of the realm parameter SHOULD be displayed to the user.
A user agent SHOULD cache the authorization credentials for a given A user agent SHOULD cache the authorization credentials for a given
value of the destination ( To header) and realm and attempt to re-use value of the destination ( To header) and realm and attempt to re-use
these values on the next request for that destination. these values on the next request for that destination.
In addition to the "basic" and "digest" authentication schemes In addition to the "basic" and "digest" authentication schemes
defined in the specifications cited above, SIP defines a new scheme, defined in the specifications cited above, SIP defines a new scheme,
PGP (RFC 2015, [32]), Section 13. Other schemes, such as S-MIME, are PGP (RFC 2015, [32]), Section 13. Other schemes, such as S-MIME, are
for further study. for further study.
7 Status Code Definitions 7 Status Code Definitions
skipping to change at page 58, line 33 skipping to change at page 53, line 31
Also, SIP defines a new class, 6xx. The default behavior for unknown Also, SIP defines a new class, 6xx. The default behavior for unknown
response codes is given for each category of codes. response codes is given for each category of codes.
7.1 Informational 1xx 7.1 Informational 1xx
Informational responses indicate that the server or proxy contacted Informational responses indicate that the server or proxy contacted
is performing some further action and does not yet have a definitive is performing some further action and does not yet have a definitive
response. The client SHOULD wait for a further response from the response. The client SHOULD wait for a further response from the
server, and the server SHOULD send such a response without further server, and the server SHOULD send such a response without further
prompting. Typically a server should send a 1xx response if it prompting. Typically a server should send a 1xx response if it
expects to take more than 200 ms to obtain a final response. expects to take more than 200 ms to obtain a final response. A server
can issue zero or more 1xx responses, with no restriction on their
ordering or uniqueness. Note that 1xx responses are not transmitted
reliably, that is, they do not cause the client to send an ACK.
Servers are free to retransmit informational responses and clients
can inquire about the current state of call processing by re-sending
the request.
7.1.1 100 Trying 7.1.1 100 Trying
Some unspecified action is being taken on behalf of this call (e.g., Some unspecified action is being taken on behalf of this call (e.g.,
a database is being consulted), but the user has not yet been a database is being consulted), but the user has not yet been
located. located.
7.1.2 180 Ringing 7.1.2 180 Ringing
The called user agent has located a possible location where the user The called user agent has located a possible location where the user
has been recently and is trying to alert them. has been recently and is trying to alert them.
7.1.3 181 Call Is Being Forwarded 7.1.3 181 Call Is Being Forwarded
A proxy server MAY use this status code to indicate that the call is A proxy server MAY use this status code to indicate that the call is
being forwarded to a different set of destinations. The new being forwarded to a different set of destinations. The new
destinations are listed in Location headers. Proxies SHOULD be destinations are listed in Location headers. Proxies SHOULD be
configurable not to reveal this information. configurable not to reveal this information.
The called party is temporarily unavailable, but the callee has
decided to queue the call rather than reject it. When the callee
becomes available, it will return the appropriate final status
response. The reason phrase MAY give further details about the status
of the call, e.g., "5 calls queued; expected waiting time is 15
minutes". The server MAY issue several 182 responses to update the
caller about the status of the queued call.
7.2 Successful 2xx 7.2 Successful 2xx
The request was successful and MUST terminate a search. The request was successful and MUST terminate a search.
7.2.1 200 OK 7.2.1 200 OK
The request has succeeded. The information returned with the response The request has succeeded. The information returned with the response
depends on the method used in the request, for example: depends on the method used in the request, for example:
BYE: The call has been terminated. The message body is empty. BYE: The call has been terminated. The message body is empty.
CANCEL: The search has been cancelled. The message body is empty. CANCEL: The search has been cancelled. The message body is empty.
INVITE: The callee has agreed to participate; the message body INVITE: The callee has agreed to participate; the message body
indicates the callee's capabilities. indicates the callee's capabilities.
OPTIONS: The callee has agreed to share its capabilities, included in OPTIONS: The callee has agreed to share its capabilities, included in
the message body. the message body.
REGISTER: The registration has succeeded. The message body is empty. REGISTER: The registration has succeeded. The client treats the
message body according to its Content-Type.
7.3 Redirection 3xx 7.3 Redirection 3xx
3xx responses give information about the user's new location, or 3xx responses give information about the user's new location, or
about alternative services that may be able to satisfy the call. They about alternative services that may be able to satisfy the call. They
SHOULD terminate an existing search, and MAY cause the initiator to SHOULD terminate an existing search, and MAY cause the initiator to
begin a new search if appropriate. begin a new search if appropriate.
Any redirection (3xx) response MUST NOT suggest any of the addresses Any redirection (3xx) response MUST NOT suggest any of the addresses
in the Via (Section 6.43) path of the request in the Location header in the Via (Section 6.40) path of the request in the Location header
field. (Addresses match if their host and port number match.) field. (Addresses match if their host and port number match.)
To avoid forwarding loops, a user agent client or proxy MUST check
whether the address returned by a redirect server equals an address
tried earlier.
7.3.1 300 Multiple Choices 7.3.1 300 Multiple Choices
The address in the request resolved to several choices, each with its The address in the request resolved to several choices, each with its
own specific location, and the user (or user agent) can select a own specific location, and the user (or user agent) can select a
preferred communication end point and redirect its request to that preferred communication end point and redirect its request to that
location. location.
The response SHOULD include an entity containing a list of resource
characteristics and location(s) from which the user or user agent can characteristics and location(s) from which the user or user agent can
choose the one most appropriate, if allowed by the Accept request choose the one most appropriate, if allowed by the Accept request
header. The entity format is specified by the media type given in the header. The entity format is specified by the media type given in the
Content-Type header field. The choices SHOULD also be listed as Content-Type header field. The choices SHOULD also be listed as
Location fields (Section 6.25). Unlike HTTP, the SIP response may Location fields (Section 6.22). Unlike HTTP, the SIP response may
contain several Location fields or a list of addresses in a contain several Location fields or a list of addresses in a
Location field. User agents MAY use the Location field value for Location field. User agents MAY use the Location field value for
automatic redirection or MAY ask the user to confirm a choice. automatic redirection or MAY ask the user to confirm a choice.
However, this specification does not define any standard for such However, this specification does not define any standard for such
automatic selection. automatic selection.
This header is appropriate if the callee can be reached at This header is appropriate if the callee can be reached at
several different locations and the server cannot or several different locations and the server cannot or
prefers not to proxy the request. prefers not to proxy the request.
7.3.2 301 Moved Permanently 7.3.2 301 Moved Permanently
The user can no longer be found at the address in the Request-URI and The user can no longer be found at the address in the Request-URI and
skipping to change at page 60, line 16 skipping to change at page 55, line 24
automatic selection. automatic selection.
This header is appropriate if the callee can be reached at This header is appropriate if the callee can be reached at
several different locations and the server cannot or several different locations and the server cannot or
prefers not to proxy the request. prefers not to proxy the request.
7.3.2 301 Moved Permanently 7.3.2 301 Moved Permanently
The user can no longer be found at the address in the Request-URI and The user can no longer be found at the address in the Request-URI and
the requesting client should retry at the new address given by the the requesting client should retry at the new address given by the
Location header field (Section 6.25). The caller SHOULD update any Location header field (Section 6.22). The caller SHOULD update any
local directories, address books and user location caches with this local directories, address books and user location caches with this
new value and redirect future requests to the address(es) listed. new value and redirect future requests to the address(es) listed.
7.3.3 302 Moved Temporarily 7.3.3 302 Moved Temporarily
The requesting client should retry the request at the new address(es) The requesting client should retry the request at the new address(es)
given by the Location header field (Section 6.25). The duration of given by the Location header field (Section 6.22). The duration of
the redirection can be indicated through an Expires (Section 6.20) the redirection can be indicated through an Expires (Section 6.19)
header. header.
7.3.4 380 Alternative Service 7.3.4 380 Alternative Service
The call was not successful, but alternative services are possible. The call was not successful, but alternative services are possible.
The alternative services are described in the message body of the The alternative services are described in the message body of the
response. response.
7.3.5 381 Ambiguous 7.3.5 381 Ambiguous
skipping to change at page 60, line 47 skipping to change at page 56, line 4
Location headers. Location headers.
Revealing alternatives may infringe on privacy concerns of the user Revealing alternatives may infringe on privacy concerns of the user
or the organization. It MUST be possible to configure a server to or the organization. It MUST be possible to configure a server to
respond with status 404 (Not Found) or to suppress the listing of respond with status 404 (Not Found) or to suppress the listing of
possible choices if the request address was ambiguous. possible choices if the request address was ambiguous.
Example response to a request with the URL lee@example.com : Example response to a request with the URL lee@example.com :
381 Ambiguous SIP/2.0 381 Ambiguous SIP/2.0
Location: carol.lee@example.com (Carol Lee)
Location: p.lee@example.com (Ping Lee)
Location: lee.foote@example.com (Lee M. Foote) Location: lee.foote@example.com (Lee M. Foote)
Some email and voice mail systems provide this Some email and voice mail systems provide this
functionality. A status code separate from 300 is used functionality. A status code separate from 300 is used
since the semantics are different: for 300, it is assumed since the semantics are different: for 300, it is assumed
that the same person or service will be reached by the that the same person or service will be reached by the
choices provided. While an automated choice or sequential choices provided. While an automated choice or sequential
search makes sense for a 300 response, user intervention is search makes sense for a 300 response, user intervention is
required for a 381 response. required for a 381 response.
7.4 Request Failure 4xx 7.4 Request Failure 4xx
skipping to change at page 61, line 50 skipping to change at page 57, line 5
returned if the domain in the Request-URI does not match any of the returned if the domain in the Request-URI does not match any of the
domains handled by the recipient of the request. domains handled by the recipient of the request.
7.4.6 405 Method Not Allowed 7.4.6 405 Method Not Allowed
The method specified in the Request-Line is not allowed for the The method specified in the Request-Line is not allowed for the
address identified by the Request-URI. The response MUST include an address identified by the Request-URI. The response MUST include an
Allow header containing a list of valid methods for the indicated Allow header containing a list of valid methods for the indicated
address. address.
7.4.7 407 Proxy Authentication Required
This code is similar to 401 (Unauthorized), but indicates that the This code is similar to 401 (Unauthorized), but indicates that the
client MUST first authenticate itself with the proxy. The proxy MUST client MUST first authenticate itself with the proxy. The proxy MUST
return a Proxy-Authenticate header field (section 6.29) containing a return a Proxy-Authenticate header field (section 6.26) containing a
challenge applicable to the proxy for the requested resource. The challenge applicable to the proxy for the requested resource. The
client MAY repeat the request with a suitable Proxy-Authorization client MAY repeat the request with a suitable Proxy-Authorization
header field (section 6.30). SIP access authentication is explained header field (section 6.27). SIP access authentication is explained
in section 12.3 and [H11]. in section 12.3 and [H11].
This status code should be used for applications where access to the This status code should be used for applications where access to the
communication channel (e.g., a telephony gateway) rather than the communication channel (e.g., a telephony gateway) rather than the
callee herself requires authentication. callee herself requires authentication.
7.4.8 408 Request Timeout 7.4.8 408 Request Timeout
The server could not produce a response, e.g., a user location, The server could not produce a response, e.g., a user location,
within the time indicated in the request via the Expires header. within the time indicated in the request via the Expires header. The
The client MAY repeat the request without modifications at any later client MAY repeat the request without modifications at any later
time. time.
7.4.9 412 Precondition Failed 7.4.9 420 Bad Extension
The precondition given in one or more of the request-header fields
evaluated to false when it was tested on the server. Preconditions
include If-Match (Section 6.23) and If-None-Match (Section 6.24).
7.4.10 420 Bad Extension
The server did not understand the protocol extension specified in a The server did not understand the protocol extension specified in a
Require (Section 6.32) header field. Require (Section 6.29) header field.
7.4.11 480 Temporarily Unavailable 7.4.10 480 Temporarily Unavailable
The callee's end system was contacted successfully but the callee is The callee's end system was contacted successfully but the callee is
currently unavailable (e.g., not logged in or logged in in such a currently unavailable (e.g., not logged in or logged in in such a
manner as to preclude communication with the callee). The response manner as to preclude communication with the callee). The response
may indicate a better time to call in the Retry-After header. The may indicate a better time to call in the Retry-After header. The
user may also be available elsewhere (unbeknownst to this host), user may also be available elsewhere (unbeknownst to this host),
thus, this response does not terminate any searches. The reason thus, this response does not terminate any searches. The reason
phrase SHOULD indicate the more precise cause as to why the callee is phrase SHOULD indicate the more precise cause as to why the callee is
unavailable. This value SHOULD be setable by the user agent. unavailable. This value SHOULD be setable by the user agent.
7.4.12 481 Invalid Call-ID 7.4.11 481 Invalid Call-ID
The server received a BYE or CANCEL request with a Call-ID (Section The server received a BYE or CANCEL request with a Call-ID (Section
6.12 value it does not recognize. (A server simply discards an ACK 6.12) value it does not recognize. (A server simply discards an ACK
with an invalid Call-ID.) with an invalid Call-ID.)
7.4.13 482 Loop Detected 7.4.12 482 Loop Detected
The server received a request with a Via path containing itself.
7.4.14 483 Too Many Hops The server received a request with a Via (Section 6.40) path
containing itself.
The server received a request that contains more Via entries (hops) 7.4.13 483 Too Many Hops
than allowed by the Max-Forwards header field.
7.4.15 484 Address Incomplete The server received a request that contains more Via entries (hops)
(Section 6.40) than allowed by the Max-Forwards (Section 6.23)
header field.
The server received a request with a To address or Request-URI that The server received a request with a To (Section 6.37) address or
was incomplete. Additional information should be provided. Request-URI that was incomplete. Additional information should be
provided.
This status code allows overlapped dialing. This status code allows overlapped dialing.
7.5 Server Failure 5xx 7.5 Server Failure 5xx
5xx responses are failure responses given when a server itself has 5xx responses are failure responses given when a server itself has
erred. They are not definitive failures, and MUST NOT terminate a erred. They are not definitive failures, and MUST NOT terminate a
search if other possible locations remain untried. search if other possible locations remain untried.
7.5.1 500 Server Internal Error 7.5.1 500 Server Internal Error
skipping to change at page 64, line 16 skipping to change at page 59, line 4
server has to use it when becoming overloaded. Some servers may wish server has to use it when becoming overloaded. Some servers may wish
to simply refuse the connection. to simply refuse the connection.
7.5.5 504 Gateway Timeout 7.5.5 504 Gateway Timeout
The server, while acting as a gateway, did not receive a timely The server, while acting as a gateway, did not receive a timely
response from the server (e.g., a location server) it accessed in response from the server (e.g., a location server) it accessed in
attempting to complete the request. attempting to complete the request.
7.5.6 505 Version Not Supported 7.5.6 505 Version Not Supported
The server does not support, or refuses to support, the SIP protocol
version that was used in the request message. The server is version that was used in the request message. The server is
indicating that it is unable or unwilling to complete the request indicating that it is unable or unwilling to complete the request
using the same major version as the client, other than with this using the same major version as the client, other than with this
error message. The response SHOULD contain an entity describing why error message. The response SHOULD contain an entity describing why
that version is not supported and what other protocols are supported that version is not supported and what other protocols are supported
by that server. by that server.
7.6 Global Failures 6xx 7.6 Global Failures 6xx
6xx responses indicate that a server has definitive information about 6xx responses indicate that a server has definitive information about
skipping to change at page 65, line 19 skipping to change at page 60, line 4
communicate, but cannot adequately support the session described. The communicate, but cannot adequately support the session described. The
606 (Not Acceptable) response MAY contain a list of reasons in a 606 (Not Acceptable) response MAY contain a list of reasons in a
Warning header describing why the session described cannot be Warning header describing why the session described cannot be
supported. These reasons can be one or more of: supported. These reasons can be one or more of:
606.1 Insufficient Bandwidth: The bandwidth specified in the session 606.1 Insufficient Bandwidth: The bandwidth specified in the session
description or defined by the media exceeds that known to be description or defined by the media exceeds that known to be
available. available.
606.2 Incompatible Protocol: One or more protocols described in the 606.2 Incompatible Protocol: One or more protocols described in the
request are not available.
606.3 Incompatible Format: One or more media formats described in the 606.3 Incompatible Format: One or more media formats described in the
request is not available. request is not available.
606.4 Multicast Not Available: The site where the user is located 606.4 Multicast Not Available: The site where the user is located
does not support multicast. does not support multicast.
606.5 Unicast Not Available: The site where the user is located does 606.5 Unicast Not Available: The site where the user is located does
not support unicast communication (usually due to the presence not support unicast communication (usually due to the presence
of a firewall). of a firewall).
skipping to change at page 66, line 24 skipping to change at page 61, line 4
Encoding header field, otherwise Content-Encoding MUST be omitted. Encoding header field, otherwise Content-Encoding MUST be omitted.
If applicable, the character set of the message body is indicated as If applicable, the character set of the message body is indicated as
part of the Content-Type header-field value. part of the Content-Type header-field value.
8.3 Message Body Length 8.3 Message Body Length
The body length in bytes MUST be given by the Content-Length header The body length in bytes MUST be given by the Content-Length header
field. If no body is present in a message, then the Content-Length field. If no body is present in a message, then the Content-Length
header MUST set to zero. If a server receives a message without header MUST set to zero. If a server receives a message without
Content-Length, it MUST assume it to be zero.
The "chunked" transfer encoding of HTTP/1.1 MUST NOT be used for SIP. The "chunked" transfer encoding of HTTP/1.1 MUST NOT be used for SIP.
(Note: The chunked encoding modifies the body of a message in order (Note: The chunked encoding modifies the body of a message in order
to transfer it as a series of chunks, each with its own size to transfer it as a series of chunks, each with its own size
indicator.) indicator.)
9 Compact Form 9 Compact Form
When SIP is carried over UDP with authentication and a complex When SIP is carried over UDP with authentication and a complex
session description, it may be possible that the size of a request or session description, it may be possible that the size of a request or
response is larger than the MTU. To reduce this problem, a more response is larger than the MTU. To reduce this problem, a more
skipping to change at page 67, line 24 skipping to change at page 62, line 4
l:187 l:187
v=0 v=0
o=user1 53655765 2353687637 IN IP4 128.3.4.5 o=user1 53655765 2353687637 IN IP4 128.3.4.5
s=Mbone Audio s=Mbone Audio
i=Discussion of Mbone Engineering Issues i=Discussion of Mbone Engineering Issues
e=mbone@somewhere.com e=mbone@somewhere.com
c=IN IP4 224.2.0.1/127 c=IN IP4 224.2.0.1/127
t=0 0 t=0 0
m=audio 3456 RTP/AVP 0 m=audio 3456 RTP/AVP 0
Mixing short field names and long field names is allowed, but not
recommended. Servers MUST accept both short and long field names for
requests. Proxies MUST NOT translate a request between short and long requests. Proxies MUST NOT translate a request between short and long
forms if authentication fields are present. forms if authentication fields are present.
10 SIP Transport 10 SIP Transport
10.1 General Remarks 10.1 General Remarks
SIP is defined so it can use either UDP (unicast or multicast) or TCP SIP is defined so it can use either UDP (unicast or multicast) or TCP
as a transport protocol; it provides its own reliability mechanism. as a transport protocol; it provides its own reliability mechanism.
skipping to change at page 68, line 12 skipping to change at page 62, line 34
a request with a final response within 200 ms, it MUST issue a a request with a final response within 200 ms, it MUST issue a
provisional (1xx) response as soon as possible. Stateless proxies provisional (1xx) response as soon as possible. Stateless proxies
MUST NOT issue provisional responses on their own. MUST NOT issue provisional responses on their own.
After receiving a CANCEL request from an upstream client, a stateful After receiving a CANCEL request from an upstream client, a stateful
proxy server SHOULD send a CANCEL on all branches where it has not proxy server SHOULD send a CANCEL on all branches where it has not
yet received a final response. yet received a final response.
10.1.2 Responses 10.1.2 Responses
A server MAY issue one or more provisional responses at any time
before sending a final response.
Responses are mapped to requests by the matching To, From, Call-ID, Responses are mapped to requests by the matching To, From, Call-ID,
CSeq headers and the branch parameter of the first Via header. CSeq headers and the branch parameter of the first Via header.
Responses terminate request retransmissions even if they have Via Responses terminate request retransmissions even if they have Via
headers that cause them to be delivered to an upstream client. headers that cause them to be delivered to an upstream client.
A stateful proxy may receive a response that it does not have state A stateful proxy may receive a response that it does not have state
for, that is, where it has no a record of an isomorphic request. If for, that is, where it has no a record of an isomorphic request. If
the Via header field indicates that the upstream server used TCP, the the Via header field indicates that the upstream server used TCP, the
proxy actively opens a TCP connection to that address. Thus, proxies proxy actively opens a TCP connection to that address. Thus, proxies
have to be prepared to receive responses on the incoming side of have to be prepared to receive responses on the incoming side of
passive TCP connections, even though most responses will arrive on passive TCP connections, even though most responses will arrive on
the incoming side of an active connection. (An active connection is a the incoming side of an active connection. (An active connection is a
TCP connection initiated by the proxy, a passive connection is one TCP connection initiated by the proxy, a passive connection is one
accepted by the proxy, but initiated by another entity.) accepted by the proxy, but initiated by another entity.)
100 responses are not forwarded, other 1xx responses MAY be 100 responses are not forwarded, other 1xx responses MAY be
forwarded, possibly after the server eliminates responses with status forwarded, possibly after the server eliminates responses with status
codes that had already been sent earlier. 2xx responses are forwarded codes that had already been sent earlier. 2xx responses are forwarded
according to the Via header. Once a stateful proxy has received a
2xx response, it MUST NOT forward non-2xx final responses. Responses
with status 300 and higher are retransmitted by each stateful proxy with status 300 and higher are retransmitted by each stateful proxy
until the next upstream proxy sends an ACK (see below for timing until the next upstream proxy sends an ACK (see below for timing
details) or CANCEL. details) or CANCEL.
A stateful proxy can remove state for a call attempt and close any A stateful proxy can remove state for a call attempt and close any
connections 20 seconds after receiving the first final response. connections 20 seconds after receiving the first final response.
The 20 second window is given by the maximum retransmission The 20 second window is given by the maximum retransmission
duration of 200 responses (10 times T4), in case the ACK duration of 200 responses (10 times T4), in case the ACK
is lost somewhere on the way to the called user agent or is lost somewhere on the way to the called user agent or
the next stateful proxy. the next stateful proxy.
10.2 Unicast UDP 10.2 Unicast UDP
UDP packets MUST have a source address that is valid as a destination UDP packets MUST have a source address that is valid as a destination
for requests and responses. Responses are returned to the address for requests and responses. Responses are returned to the address
listed in the Via header field (Section 6.43), not the source listed in the Via header field (Section 6.40), not the source
address of the request. address of the request.
10.3 Multicast UDP 10.3 Multicast UDP
Requests may be multicast. Multicast requests SHOULD have a time-to- Requests may be multicast. Multicast requests SHOULD have a time-to-
live value of no greater than one, i.e., be restricted to the local live value of no greater than one, i.e., be restricted to the local
network. network.
If the request was received via multicast, the response is also If the request was received via multicast, the response is also
returned via multicast. The server delays its response by a random returned via multicast. The server delays its response by a random
skipping to change at page 69, line 32 skipping to change at page 63, line 50
has reached a set limit on the number of retransmissions. If the has reached a set limit on the number of retransmissions. If the
response is provisional, the client continues to retransmit the response is provisional, the client continues to retransmit the
request, albeit less frequently, using timer T2. The default values request, albeit less frequently, using timer T2. The default values
of timer T1 and T2 are 1 and 5 seconds, respectively. The default of timer T1 and T2 are 1 and 5 seconds, respectively. The default
retransmit limit is 20 times. After the server sends a final retransmit limit is 20 times. After the server sends a final
response, it cannot be sure the client has received the response, and response, it cannot be sure the client has received the response, and
thus SHOULD cache the results for at least 100 seconds to avoid thus SHOULD cache the results for at least 100 seconds to avoid
having to, for example, contact the user or user location server having to, for example, contact the user or user location server
again upon receiving a retransmission. again upon receiving a retransmission.
Each server in a proxy chain generates its own final response to a
CANCEL request. BYE and OPTIONS final responses are generated by
redirect and user agent servers.
The value of the initial retransmission timer is smaller The value of the initial retransmission timer is smaller
than that that for TCP since it is expected that network than that that for TCP since it is expected that network
paths suitable for interactive communications have round- paths suitable for interactive communications have round-
trip times smaller than 1.5 seconds. To avoid flooding the trip times smaller than 1.5 seconds. To avoid flooding the
network with packets every second even if the destination network with packets every second even if the destination
network is unreachable, the retransmission count has to be network is unreachable, the retransmission count has to be
bounded. Given that most transactions should consist of one bounded. Given that most transactions should consist of one
request and a few responses, round-trip time estimation request and a few responses, round-trip time estimation
seems less than helpful. If RTT estimation is desired to seems less than helpful. If RTT estimation is desired to
more quickly discover a missing final response, each more quickly discover a missing final response, each
request retransmission needs to be labeled with its own request retransmission needs to be labeled with its own
Timestamp (Section 6.39), returned in the response. The Timestamp (Section 6.36), returned in the response. The
server caches the result until it can be sure that the server caches the result until it can be sure that the
client will not retransmit the same request again. client will not retransmit the same request again.
10.5 REGISTER 10.5 REGISTER
A client MAY repeat its registration attempts at intervals of 2, 4, A client MAY repeat its registration attempts at intervals of 2, 4,
8, ..., 512, 512, ... seconds if it receives no response. 8, ..., 512, 512, ... seconds if it receives no response.
Retransmitting REGISTER indefinitely ensures that a user Retransmitting REGISTER indefinitely ensures that a user
will eventually be able to register after a registrar will eventually be able to register after a registrar
skipping to change at page 70, line 32 skipping to change at page 64, line 52
the called party may be "rung" or extensive searches may be the called party may be "rung" or extensive searches may be
performed, so delays between the request and a definitive performed, so delays between the request and a definitive
response can reach several tens of seconds. If either response can reach several tens of seconds. If either
caller or callee are automated servers not directly caller or callee are automated servers not directly
controlled by a human being, a call attempt may be controlled by a human being, a call attempt may be
unbounded in time. unbounded in time.
2. If a telephony user interface is modeled or if we need to 2. If a telephony user interface is modeled or if we need to
interface to the PSTN, the caller's user interface will interface to the PSTN, the caller's user interface will
provide "ringback", a signal that the callee is being provide "ringback", a signal that the callee is being
alerted. (The status response 180 (Trying) may be used to alerted. (The status response 180 (Ringing) may be used to
initiate ringback.) Once the callee picks up, the caller initiate ringback.) Once the callee picks up, the caller
needs to know so that it can enable the voice path and stop needs to know so that it can enable the voice path and stop
ringback. The callee's response to the invitation could get
lost. Unless the response is transmitted reliably, the
caller will continue to hear ringback while the callee caller will continue to hear ringback while the callee
assumes that the call exists. assumes that the call exists.
3. The client has to be able to terminate an on-going request, 3. The client has to be able to terminate an on-going request,
e.g., because it is no longer willing to wait for the e.g., because it is no longer willing to wait for the
connection or search to succeed. The server will have to connection or search to succeed. The server will have to
wait several round-trip times to interpret the lack of wait several round-trip times to interpret the lack of
request retransmissions as the end of a call. If the call request retransmissions as the end of a call. If the call
succeeds shortly after the caller has given up, the callee succeeds shortly after the caller has given up, the callee
will "pick up the phone" and not be "connected". will "pick up the phone" and not be "connected".
skipping to change at page 71, line 12 skipping to change at page 65, line 28
provisional, the client continues to retransmit the request, albeit provisional, the client continues to retransmit the request, albeit
less frequently, using timer T3. The default values of timer T1 and less frequently, using timer T3. The default values of timer T1 and
T3 are 1 and 30 seconds, respectively. The default retransmit limit T3 are 1 and 30 seconds, respectively. The default retransmit limit
is 20. is 20.
The value of T3 was chosen so that for most normal phone The value of T3 was chosen so that for most normal phone
calls, only one INVITE request will be issued. Typically, calls, only one INVITE request will be issued. Typically,
a phone switches to an answering machine or voice mail a phone switches to an answering machine or voice mail
after about 20--22 seconds. after about 20--22 seconds.
Upon receiving a final response, the client sends an ACK to the Upon receiving a 2xx final response, the client sends an ACK to the
address listed in the Location header field contained in the address listed in the Location header field contained in the
response. The To header field in the ACK request assumes the value response. If the response did not contain a Location header, the
of the Location header field. If the response did not contain a client uses the same To header field as for the INVITE request and
Location header, the client uses the same To header field as for the sends the ACK to the same destination as the original INVITE
INVITE request and sends the ACK to the same destination as the request.
original INVITE request.
ACKs for final responses other than 2xx are sent to the source of the
response.
The server retransmits the final response at intervals of T4 (default The server retransmits the final response at intervals of T4 (default
value of T4 = 2 seconds) until it receives an ACK request for the value of T4 = 2 seconds) until it receives an ACK request for the
same Call-ID and CSeq from the same From source or until it has same Call-ID and CSeq from the same From source or until it has
retransmitted the final response 10 times. The ACK request MUSTNOT be retransmitted the final response 10 times. The ACK request MUSTNOT be
acknowledged to prevent a response- ACK feedback loop. acknowledged to prevent a response- ACK feedback loop.
Fig. 8 and 9 show the client and server state diagram for Fig. 8 and 9 show the client and server state diagram for
invitations. invitations.
Using the mechanism in Sec. 10.4 does not work well for the Using the mechanism in Sec. 10.4 does not work well for the
long delays between INVITE and a final response. If the long delays between INVITE and a final response. If the
200 response gets lost, the callee would believe the call 200 response gets lost, the callee would believe the call
to exist, but the voice path would be dead since the caller to exist, but the voice path would be dead since the caller
does not know that the callee has picked up. Thus, the
INVITE retransmission interval would have to be on the
order of a second or two to limit the duration of this
state confusion.
Blindly retransmitting the response increases the probability of
success, but at the cost of significantly higher processing and
network load.
10.8 TCP Connections
A single TCP connection can serve one or more SIP transactions. A
transaction contains zero or more provisional responses followed by
one or more final responses. (Typically, transactions contain exactly
one final response, but there are exceptional circumstances, where,
+===========+ +===========+
| Initial | | Initial |
+===========+ +===========+
| |
| |
| - | -
| ------ | ------
| INVITE | INVITE
+------v v +------v v
T1 +-----------+ T1 +-----------+
skipping to change at page 72, line 45 skipping to change at page 66, line 45
--- | Completed |<-------+ --- | Completed |<-------+
ACK +-----------+ ACK +-----------+
+------| +------|
event event
------- -------
message message
Figure 8: State transition diagram of client for INVITE method Figure 8: State transition diagram of client for INVITE method
for example, multiple 200 responses may be generated.) order of a second or two to limit the duration of this
state confusion.
Blindly retransmitting the response increases the probability of
success, but at the cost of significantly higher processing and
network load.
After sending an INVITE request, the client keeps the connection
open until the first final response arrives. If that response has a
+===========+ +===========+
| Initial |<-------------+ | Initial |<-------------+
+===========+ | +===========+ |
| | | |
| | | |
| INVITE | | INVITE |
| ------ | | ------ |
| 1xx | | 1xx |
+------v v | +------v v |
INVITE +-----------+ | INVITE +-----------+ |
skipping to change at page 73, line 46 skipping to change at page 67, line 47
- +-----------+ | - +-----------+ |
+------| | | +------| | |
+-----------------+ +-----------------+
event event
------- -------
message message
Figure 9: State transition diagram of server for INVITE method Figure 9: State transition diagram of server for INVITE method
A single TCP connection can serve one or more SIP transactions. A
transaction contains zero or more provisional responses followed by
one or more final responses. (Typically, transactions contain exactly
one final response, but there are exceptional circumstances, where,
for example, multiple 200 responses may be generated.)
status code of 300 or larger, the client sends an ACK. If the status code of 300 or larger, the client sends an ACK. If the
response status code is 2xx and the client is a user agent client, it response status code is 2xx and the client is a user agent client, it
sends an ACK. If the client is not a user agent, the response is sends an ACK. If the client is not a user agent, the response is
forwarded upstream. forwarded upstream.
The client MAY close the connection at any time. The server SHOULD The client MAY close the connection at any time. The server SHOULD
NOT close the TCP connection until it has sent its final response, at NOT close the TCP connection until it has sent its final response, at
which point it MAY close the TCP connection if it wishes to. However, which point it MAY close the TCP connection if it wishes to. However,
normally it is the client's responsibility to close the connection. normally it is the client's responsibility to close the connection.
skipping to change at page 74, line 30 skipping to change at page 68, line 33
11 Behavior of SIP Servers 11 Behavior of SIP Servers
This section describes behavior of a SIP server in detail. Servers This section describes behavior of a SIP server in detail. Servers
can operate in proxy or redirect mode. Proxy servers can "fork" can operate in proxy or redirect mode. Proxy servers can "fork"
connections, i.e., a single incoming request spawns several outgoing connections, i.e., a single incoming request spawns several outgoing
(client) requests. (client) requests.
A proxy server always inserts a Via header field containing its own A proxy server always inserts a Via header field containing its own
address into those requests that are caused by an incoming request. address into those requests that are caused by an incoming request.
Each proxy MUST insert a " branch" parameter (Section 6.43). To Each proxy MUST insert a " branch" parameter (Section 6.40). To
prevent loops, a server MUST check if its own address is already prevent loops, a server MUST check if its own address is already
contained in the Via header of the incoming request. contained in the Via header of the incoming request.
A proxy server MAY convert a version-x SIP request or response to a A proxy server MAY convert a version-x SIP request or response to a
version-y request or response, where x may be larger, smaller or version-y request or response, where x may be larger, smaller or
equal to y. equal to y.
This rule allows a proxy to serve as a go-between between This rule allows a proxy to serve as a go-between between
two servers that have no version of the protocol in common. two servers that have no version of the protocol in common.
skipping to change at page 75, line 4 skipping to change at page 69, line 4
transport protocol A and issues requests, acting as a SIP client, transport protocol A and issues requests, acting as a SIP client,
using transport protocol B. If not stated explicitly, rules apply to using transport protocol B. If not stated explicitly, rules apply to
any combination of transport protocols. For conciseness, we only any combination of transport protocols. For conciseness, we only
describe behavior with UDP and TCP, but the same rules apply for any describe behavior with UDP and TCP, but the same rules apply for any
unreliable datagram or reliable protocol, respectively. unreliable datagram or reliable protocol, respectively.
The detailed connection behavior for UDP and TCP is described in The detailed connection behavior for UDP and TCP is described in
Section 10. Section 10.
11.1 Redirect Server 11.1 Redirect Server
A redirect server does not issue any SIP requests of its own. It can
return a response that refuses or redirects the request. After return a response that refuses or redirects the request. After
receiving an INVITE request, once the server has gathered the list receiving an INVITE request, once the server has gathered the list
of alternative locations or has decided to refuse the call, it of alternative locations or has decided to refuse the call, it
returns the final response of class 3xx or 6xx. This ends the SIP returns the final response of class 3xx or 6xx. This ends the SIP
transaction. The redirect server maintains transaction state for the transaction. The redirect server maintains transaction state for the
whole SIP transaction. whole SIP transaction. It is up to the client to detect forwarding
loops between redirect servers.
11.2 User Agent Server 11.2 User Agent Server
User agent servers behave similarly to redirect servers, except that User agent servers behave similarly to redirect servers, except that
they may also accept a call with a response of class 2xx. they may also accept a call with a response of class 2xx.
11.3 Stateless Proxy: Proxy Servers Issuing Single Unicast Requests 11.3 Stateless Proxy: Proxy Servers Issuing Single Unicast Requests
Proxies in this category issue at most a single unicast request for Proxies in this category issue at most a single unicast request for
each incoming SIP request, that is, they do not "fork" requests. each incoming SIP request, that is, they do not "fork" requests.
skipping to change at page 75, line 51 skipping to change at page 69, line 51
All requests carry the same Call-ID. For unicast, each of the All requests carry the same Call-ID. For unicast, each of the
requests has a different (host-dependent) Request-URI. For requests has a different (host-dependent) Request-URI. For
multicast, a single request is issued, likely with a host-independent multicast, a single request is issued, likely with a host-independent
Request-URI. A client receiving a multicast query does not have to Request-URI. A client receiving a multicast query does not have to
check whether the host part of the Request-URI matches its own host check whether the host part of the Request-URI matches its own host
or domain name. To avoid response implosion, servers MUST NOT answer or domain name. To avoid response implosion, servers MUST NOT answer
multicast requests with a "404 Not Found" status code. Servers MAY multicast requests with a "404 Not Found" status code. Servers MAY
decide not to answer multicast requests if their response would be decide not to answer multicast requests if their response would be
5xx. Responses to multicast requests are multicast with the same TTL 5xx. Responses to multicast requests are multicast with the same TTL
as the request, where the TTL is derived from the ttl parameter in as the request, where the TTL is derived from the ttl parameter in
the Via header (Section 6.43). the Via header (Section 6.40).
Successful responses to an INVITE request SHOULD contain a Location Successful responses to an INVITE request SHOULD contain a Location
header so that the following ACK or BYE bypasses the proxy search header so that the following ACK or BYE bypasses the proxy search
mechanism. If the proxy requires future requests to be routed through
it, it adds a Record-Route header to the request (Section 6.33).
The following pseudo-code describes the behavior of a proxy server The following pseudo-code describes the behavior of a proxy server
issuing several requests in response to an incoming INVITE request. issuing several requests in response to an incoming INVITE request.
The function request(r, a, b) sends a SIP request of type r to The function request(r, a, b) sends a SIP request of type r to
address a, with branch id b. await_response() waits until a response address a, with branch id b. await_response() waits until a response
is received and returns the response. close(a) closes the TCP is received and returns the response. close(a) closes the TCP
connection to client with address a. response(s, l, L) sends a connection to client with address a. response(s, l, L) sends a
response to the client with status s and list of locations L, with l response to the client with status s and list of locations L, with l
entries. ismulticast() returns 1 if the location is a multicast entries. ismulticast() returns 1 if the location is a multicast
address and zero otherwise. The variable timeleft indicates the address and zero otherwise. The variable timeleft indicates the
amount of time left until the maximum response time has expired. The amount of time left until the maximum response time has expired. The
skipping to change at page 76, line 35 skipping to change at page 70, line 29
/* request type */ /* request type */
typedef enum {INVITE, ACK, BYE, OPTIONS, CANCEL, REGISTER} Method; typedef enum {INVITE, ACK, BYE, OPTIONS, CANCEL, REGISTER} Method;
process_request(Method R, int N, address_t address[]) process_request(Method R, int N, address_t address[])
{ {
struct { struct {
address_t address; /* address */ address_t address; /* address */
int branch; /* branch id */ int branch; /* branch id */
int done; /* has responded */ int done; /* has responded */
} outgoing; } outgoing[];
int done[]; /* address has responded */ int done[]; /* address has responded */
char *location[]; /* list of locations */ char *location[]; /* list of locations */
int heard = 0; /* number of sites heard from */ int heard = 0; /* number of sites heard from */
int class; /* class of status code */ int class; /* class of status code */
int best = 1000; /* best response so far */ int best = 1000; /* best response so far */
int timeleft = 120; /* sample timeout value */ int timeleft = 120; /* sample timeout value */
int loc = 0; /* number of locations */ int loc = 0; /* number of locations */
struct { /* response */ struct { /* response */
int status; /* response status; -2: BYE; -1: CANCEL */ int status; /* response status; -2: BYE; -1: CANCEL */
char *location; /* redirect location */ int locations; /* number of redirect locations */
char *location[]; /* redirect locations */
address_t a; /* address of respondent */ address_t a; /* address of respondent */
int branch; /* branch identifier */ int branch; /* branch identifier */
} r; } r;
int i; int i;
for (i = 0; i < N; i++) { for (i = 0; i < N; i++) {
request(R, address[i], i); request(R, address[i], i);
outgoing[i].done = 0; outgoing[i].done = 0;
outgoing[i].branch = i; outgoing[i].branch = i;
} }
while (timeleft > 0 && heard < N) { while (timeleft > 0 && heard < N) {
r = await_response(); r = await_response();
class = r.status / 100;
if (r.status < 0) { if (r.status < 0) {
break; break;
} }
/* If final response, mark branch as done. */
if (class >= 2) { if (class >= 2) {
heard++; heard++;
for (i = 0; i < N; i++) { for (i = 0; i < N; i++) {
if (r.branch == outgoing.branch[i]) { if (r.branch == outgoing[i].branch) {
outgoing[i].done = 1; outgoing[i].done = 1;
break; break;
} }
} }
} }
if (class == 2) { if (class == 2) {
best = r.status; best = r.status;
break; break;
} }
else if (class == 3) { else if (class == 3) {
/* A server may optionally recurse. The server MUST check whether /* A server may optionally recurse. The server MUST check whether
* it has tried this location before and whether the location is * it has tried this location before and whether the location is
* part of the Via path of the incoming request. This check is * part of the Via path of the incoming request. This check is
* omitted here for brevity. Multicast locations MUST NOT be * omitted here for brevity. Multicast locations MUST NOT be
* returned to the client if the server is not recursing. * returned to the client if the server is not recursing.
*/ */
if (recurse) { if (recurse) {
multicast = 0; multicast = 0;
N++; N += r.locations;
request(R, r.location); for (i = 0; i < r.locations; i++) {
request(R, r.location[i]);
}
} else if (!ismulticast(r.location)) { } else if (!ismulticast(r.location)) {
locations[loc++] = r.location; locations[loc++] = r.location;
best = r.status; best = r.status;
} }
request(ACK, r.a, r.branch);
} }
else if (class == 4) { else if (class == 4) {
request(ACK, r.a, r.branch); request(ACK, r.a, r.branch);
if (best >= 400) best = r.status; if (best >= 400) best = r.status;
} }
else if (class == 5) { else if (class == 5) {
request(ACK, r.a, r.branch); request(ACK, r.a, r.branch);
if (best >= 500) best = r.status; if (best >= 500) best = r.status;
} }
else if (class == 6) { else if (class == 6) {
request(ACK, r.a, r.branch); request(ACK, r.a, r.branch);
best = r.status; best = r.status;
break; break;
} }
} /* CANCEL */
if (r.status == -1) {
/* CANCEL or BYE */
if (r.status < 0) {
response(200, loc, 0); response(200, loc, 0);
}
/* BYE */ /* BYE */
if (r.status == -2) { else if (r.status == -2) {
for (i = 0; i < N; i++) { for (i = 0; i < N; i++) {
request(BYE, address[i], i); request(BYE, address[i], i);
} }
} }
}
else { else {
/* We haven't heard anything useful from anybody. */ /* We haven't heard anything useful from anybody. */
if (best == 1000) { if (best == 1000) {
best = 404; best = 404;
} }
if (best/100 != 3) loc = 0; if (best/100 != 3) loc = 0;
response(best, loc, locations); response(best, loc, locations);
} }
/* /*
* Close the other pending transactions by sending CANCEL. * If complete or CANCELed, close the other pending transactions by
* sending CANCEL.
*/ */
if (r.status > -1) { if (r.status > 0 || r.status == -1) {
for (i = 0; i < N; i++) { for (i = 0; i < N; i++) {
if (!outgoing[i].done) { if (!outgoing[i].done) {
request(CANCEL, address[i], outgoing[i].branch); request(CANCEL, address[i], outgoing[i].branch);
if (tcp) close(a); if (tcp) close(a);
} }
} }
} }
} }
Responses are processed as follows. The process completes when all Responses are processed as follows. The process completes when all
skipping to change at page 79, line 18 skipping to change at page 73, line 5
2xx: The proxy MUST forward the response upstream towards the client, 2xx: The proxy MUST forward the response upstream towards the client,
without sending an ACK downstream. without sending an ACK downstream.
3xx: The proxy MUST send an ACK and MAY recurse on the listed 3xx: The proxy MUST send an ACK and MAY recurse on the listed
Location addresses. Otherwise, the locations in the response are Location addresses. Otherwise, the locations in the response are
added to separate lists for 300, 301 and 302 responses added to separate lists for 300, 301 and 302 responses
maintained by the proxy. The lowest-numbered 300 response is maintained by the proxy. The lowest-numbered 300 response is
returned to the client on completion. returned to the client on completion.
4xx, 5xx: The proxy MUST send an ACK and remember the response if it
has a lower status code than any previous 4xx and 5xx responses. has a lower status code than any previous 4xx and 5xx responses.
On completion, the lowest-numbered response is returned if there On completion, the lowest-numbered response is returned if there
were no 2xx or 3xx responses. were no 2xx or 3xx responses.
6xx: The proxy MUST forward the response to the client and send an 6xx: The proxy MUST forward the response to the client and send an
ACK. Other pending requests SHOULD be terminated with CANCEL. ACK. Other pending requests SHOULD be terminated with CANCEL.
The proxy server must maintain state until all responses have been The proxy server SHOULD maintain state until all responses have been
received or for 60 seconds if the request was multicast. received or for 60 seconds if the request was multicast.
After receiving a 2xx or 6xx response, the server SHOULD terminate After receiving a 2xx or 6xx response, the server SHOULD terminate
all other pending requests by sending a CANCEL request and closing all other pending requests by sending a CANCEL request and closing
the TCP connection, if applicable. (Terminating pending requests is the TCP connection, if applicable. (Terminating pending requests is
advisable as searches consume resources. Also, INVITE requests may advisable as searches consume resources. Also, INVITE requests may
"ring" on a number of workstations if the callee is currently logged "ring" on a number of workstations if the callee is currently logged
in more than once.) in more than once.)
When operating in this mode, a proxy server MUST ignore any responses When operating in this mode, a proxy server MUST ignore any responses
received for Call-IDs for which it does not have a pending received for Call-IDs for which it does not have a pending
transaction. (If server were to forward responses not belonging to a transaction. (If server were to forward responses not belonging to a
current transaction using the Via field, the requesting client would current transaction using the Via field, the requesting client would
get confused if it has just issued another request using the same get confused if it has just issued another request using the same
Call-ID.) Call-ID.)
If a proxy server receives a BYE request for a pending search or the If a proxy server receives a BYE request for a pending search, the
TCP connection initiating the search is closed by the upstream proxy MUST terminate all pending requests by sending a BYE request.
client, the proxy server SHOULD terminate all pending requests by
sending a BYE request and closing the TCP connections, if applicable.
11.5 Proxy Server Issuing Several ACK and BYE Requests 11.5 Proxy Server Issuing Several ACK and BYE Requests
In most cases, ACK and BYE requests will bypass proxies and reach In most cases, ACK and BYE requests will bypass proxies and reach
the desired party directly, keeping proxies from having to make the desired party directly, keeping proxies from having to make
forwarding decisions. forwarding decisions.
User agent clients respond to ACK and BYE requests with unknown User agent clients respond to ACK and BYE requests with unknown
Call-ID with status code 481 (Invalid Call-ID). Call-ID with status code 481 (Invalid Call-ID).
skipping to change at page 80, line 23 skipping to change at page 73, line 55
previously responded with 2xx or have not yet responded to the last previously responded with 2xx or have not yet responded to the last
INVITE. INVITE.
If the proxy has no call state for a particular Call-ID and To If the proxy has no call state for a particular Call-ID and To
destination, it forwards the request to all downstream servers. destination, it forwards the request to all downstream servers.
12 Security Considerations 12 Security Considerations
12.1 Confidentiality and Privacy: Encryption 12.1 Confidentiality and Privacy: Encryption
12.1.1 SIP Transactions 12.1.1 SIP Requests and Responses
the communication patterns and communication content of individuals
SIP transactions can contain sensitive information about the and thus should be protected against eavesdropping. The SIP message
communication patterns and communication content of individuals and body may also contain encryption keys for the session itself.
thus should be protected against eavesdropping. The SIP message body
may also contain encryption keys for the session itself.
SIP supports three complementary forms of encryption to protect SIP supports three complementary forms of encryption to protect
privacy: privacy:
o End-to-end encryption of the SIP message body and certain o End-to-end encryption of the SIP message body and certain
sensitive header fields; sensitive header fields;
o hop-by-hop encryption to prevent eavesdropping that tracks who o hop-by-hop encryption to prevent eavesdropping that tracks who
is calling whom; is calling whom;
skipping to change at page 81, line 8 skipping to change at page 74, line 33
the entire SIP request or response on the wire (the request may the entire SIP request or response on the wire (the request may
already have been end-to-end encrypted) so that packet sniffers or already have been end-to-end encrypted) so that packet sniffers or
other eavesdroppers cannot see who is calling whom. Note that proxies other eavesdroppers cannot see who is calling whom. Note that proxies
can still see who is calling whom, and this information may also be can still see who is calling whom, and this information may also be
deducible by performing a network traffic analysis, so this provides deducible by performing a network traffic analysis, so this provides
a very limited but still worthwhile degree of protection. a very limited but still worthwhile degree of protection.
SIP Via fields are used to route a response back along the path SIP Via fields are used to route a response back along the path
taken by the request and to prevent infinite request loops. However, taken by the request and to prevent infinite request loops. However,
the information given by them may also provide useful information to the information given by them may also provide useful information to
an attacker. Section 6.22 describes how a sender can request that Via an attacker. Section 6.21 describes how a sender can request that Via
fields be encrypted by cooperating proxies without compromising the fields be encrypted by cooperating proxies without compromising the
purpose of the Via field. purpose of the Via field.
12.2 End-to-End Encryption 12.2 End-to-End Encryption
End-to-end encryption relies on keys shared by the two user agents End-to-end encryption relies on keys shared by the two user agents
involved in the transaction. Typically, the message is sent encrypted involved in the request. Typically, the message is sent encrypted
with the public key of the recipient, so that only that recipient can with the public key of the recipient, so that only that recipient can
read the message. SIP does not limit the security mechanisms that may read the message. SIP does not limit the security mechanisms that may
be used, but all implementations SHOULD support PGP-based encryption. be used, but all implementations SHOULD support PGP-based encryption.
A SIP request (or response) is end-to-end encrypted by splitting the A SIP request (or response) is end-to-end encrypted by splitting the
message to be sent into a part to be encrypted and a short header message to be sent into a part to be encrypted and a short header
that will remain in the clear. Some parts of the SIP message, namely that will remain in the clear. Some parts of the SIP message, namely
the request line, the response line and certain header fields marked the request line, the response line and certain header fields marked
with "n" in the "enc." column in Table 3 need to be read and returned with "n" in the "enc." column in Table 3 need to be read and returned
by proxies and thus MUST NOT be encrypted end-to-end. Possibly by proxies and thus MUST NOT be encrypted end-to-end. Possibly
sensitive information that needs to be made available as plaintext sensitive information that needs to be made available as plaintext
include destination address ( To) and the forwarding path ( Via) of include destination address ( To) and the forwarding path ( Via) of
the call. The Authorization header MUST remain in the clear if it the call. The Authorization header MUST remain in the clear if it
contains a digital signature as the signature is generated after contains a digital signature as the signature is generated after
encryption, but MAY be encrypted if it contains "basic" or "digest"
authentication. The From header field SHOULD normally remain in the
clear, but MAY be encrypted if required, in which case some proxies clear, but MAY be encrypted if required, in which case some proxies
MAY return a 401 (Unauthorized) status if they require a From field. MAY return a 401 (Unauthorized) status if they require a From field.
Other header fields MAY be encrypted or MAY travel in the clear as Other header fields MAY be encrypted or MAY travel in the clear as
desired by the sender. The Subject, Allow, Call-ID, and Content- desired by the sender. The Subject, Allow, Call-ID, and Content-
Type header fields will typically be encrypted. The Accept, Type header fields will typically be encrypted. The Accept,
Accept-Language, Date, Expires, Priority, Require, Cseq, and Accept-Language, Date, Expires, Priority, Require, Cseq, and
Timestamp header fields will remain in the clear. Timestamp header fields will remain in the clear.
All fields that will remain in the clear MUST precede those that will All fields that will remain in the clear MUST precede those that will
skipping to change at page 82, line 33 skipping to change at page 76, line 5
length of the encrypted body. The encrypted body is preceded by a length of the encrypted body. The encrypted body is preceded by a
blank line as a normal SIP message body would be. blank line as a normal SIP message body would be.
Upon receipt by the called user agent possessing the correct Upon receipt by the called user agent possessing the correct
decryption key, the message body as indicated by the Content-Length decryption key, the message body as indicated by the Content-Length
field is decrypted, and the now-decrypted body is appended to the field is decrypted, and the now-decrypted body is appended to the
clear-text header fields. There is no need for an additional clear-text header fields. There is no need for an additional
Content-Length header field within the encrypted body because the Content-Length header field within the encrypted body because the
length of the actual message body is unambiguous after decryption. length of the actual message body is unambiguous after decryption.
Had no SIP header fields required encryption, the message would have
been as below. Note that the encrypted body must then include a blank been as below. Note that the encrypted body must then include a blank
line (start with CRLF) to disambiguate between any possible SIP line (start with CRLF) to disambiguate between any possible SIP
header fields that might have been present and the SIP message body. header fields that might have been present and the SIP message body.
INVITE watson@boston.bell-telephone.com SIP/2.0$ INVITE watson@boston.bell-telephone.com SIP/2.0$
Via: SIP/2.0/UDP 169.130.12.5$ Via: SIP/2.0/UDP 169.130.12.5$
To: watson@bell-telephone.com (T. A. Watson)$ To: watson@bell-telephone.com (T. A. Watson)$
From: a.g.bell@bell-telephone.com (A. Bell)$ From: a.g.bell@bell-telephone.com (A. Bell)$
Encryption: PGP version=5.0$ Encryption: PGP version=5.0$
Content-Type: application/sdp$ Content-Type: application/sdp$
skipping to change at page 83, line 37 skipping to change at page 77, line 4
Any SIP header fields that were encrypted in a request should also be Any SIP header fields that were encrypted in a request should also be
encrypted in an encrypted response. Location response fields MAY be encrypted in an encrypted response. Location response fields MAY be
encrypted if the information they contain is sensitive, or MAY be encrypted if the information they contain is sensitive, or MAY be
left in the clear to permit proxies more scope for localized left in the clear to permit proxies more scope for localized
searches. searches.
12.2.2 Encryption by Proxies 12.2.2 Encryption by Proxies
Normally, proxies are not allowed to alter end-to-end header fields Normally, proxies are not allowed to alter end-to-end header fields
and message bodies. Proxies MAY, however, encrypt an unsigned request and message bodies. Proxies MAY, however, encrypt an unsigned request
or response with the key of the call recipient.
Proxies may need to encrypt a SIP request if the end system Proxies may need to encrypt a SIP request if the end system
cannot perform encryption or to enforce organizational cannot perform encryption or to enforce organizational
security policies. security policies.
12.2.3 Hop-by-Hop Encryption 12.2.3 Hop-by-Hop Encryption
It is RECOMMENDED that SIP transactions are also protected by It is RECOMMENDED that SIP requests and responses are also protected
security mechanisms at the transport and network layer. by security mechanisms at the transport and network layer.
12.2.4 Via field encryption 12.2.4 Via field encryption
When Via fields are to be hidden, a proxy that receives a request When Via fields are to be hidden, a proxy that receives a request
containing an appropriate " Hide: hop" header field (as specified in containing an appropriate " Hide: hop" header field (as specified in
section 6.22) SHOULD encrypt the header field. As only the proxy that section 6.21) SHOULD encrypt the header field. As only the proxy that
encrypts the field will decrypt it, the algorithm chosen is entirely encrypts the field will decrypt it, the algorithm chosen is entirely
up to the proxy implementor. Two methods satisfy these requirements: up to the proxy implementor. Two methods satisfy these requirements:
o The server keeps a cache of Via fields and the associated To o The server keeps a cache of Via fields and the associated To
field, and replaces the Via field with an index into the field, and replaces the Via field with an index into the
cache. On the reverse path, take the Via field from the cache cache. On the reverse path, take the Via field from the cache
rather than the message. rather than the message.
This is insufficient to prevent message looping, and so an This is insufficient to prevent message looping, and so an
additional ID must be added so that the proxy can detect loops. additional ID must be added so that the proxy can detect loops.
skipping to change at page 84, line 44 skipping to change at page 78, line 4
The latter is the preferred solution, although proxy developers may The latter is the preferred solution, although proxy developers may
devise other methods that might also satisfy the requirements. devise other methods that might also satisfy the requirements.
12.3 Message Integrity and Access Control: Authentication 12.3 Message Integrity and Access Control: Authentication
An active attacker may be able to modify and replay SIP requests and An active attacker may be able to modify and replay SIP requests and
responses unless protective measures are taken. In practice, the same responses unless protective measures are taken. In practice, the same
cryptographic measures that are used to ensure the authenticity of cryptographic measures that are used to ensure the authenticity of
the SIP message also serve to authenticate the originator of the the SIP message also serve to authenticate the originator of the
message.
Transport-layer or network-layer authentication may be used for hop- Transport-layer or network-layer authentication may be used for hop-
by-hop authentication. SIP also extends the HTTP WWW-Authenticate by-hop authentication. SIP also extends the HTTP WWW-Authenticate
(Section 6.45 and Authorization (Section 6.11) header and their (Section 6.42 and Authorization (Section 6.11) header and their
Proxy- counterparts to include cryptographically strong signatures. Proxy- counterparts to include cryptographically strong signatures.
SIP also supports the HTTP "basic" authentication scheme [33] that SIP also supports the HTTP "basic" authentication scheme [33] that
offers a very rudimentary mechanism of ascertaining the identity of offers a very rudimentary mechanism of ascertaining the identity of
the caller. the caller.
Since SIP requests are often sent to parties with which no Since SIP requests are often sent to parties with which no
prior communication relationship has existed, we do not prior communication relationship has existed, we do not
specify authentication based on shared secrets. specify authentication based on shared secrets.
SIP requests may be authenticated using the Authorization header SIP requests may be authenticated using the Authorization header
skipping to change at page 85, line 49 skipping to change at page 79, line 5
INVITE watson@boston.bell-telephone.com SIP/2.0 INVITE watson@boston.bell-telephone.com SIP/2.0
Via: SIP/2.0/UDP 169.130.12.5 Via: SIP/2.0/UDP 169.130.12.5
Authorization: PGP version=5.0, signature=... Authorization: PGP version=5.0, signature=...
From: a.g.bell@bell-telephone.com (A. Bell) From: a.g.bell@bell-telephone.com (A. Bell)
To: watson@bell-telephone.com (T. A. Watson) To: watson@bell-telephone.com (T. A. Watson)
Call-ID: 187602141351@worcester.bell-telephone.com Call-ID: 187602141351@worcester.bell-telephone.com
Subject: Mr. Watson, come here. Subject: Mr. Watson, come here.
Content-Type: application/sdp Content-Type: application/sdp
Content-Length: ... Content-Length: ...
v=0
o=bell 53655765 2353687637 IN IP4 128.3.4.5 o=bell 53655765 2353687637 IN IP4 128.3.4.5
c=IN IP4 135.180.144.94 c=IN IP4 135.180.144.94
m=audio 3456 RTP/AVP 0 3 4 5 m=audio 3456 RTP/AVP 0 3 4 5
Then the data block that is signed is: Then the data block that is signed is:
INVITESIP/2.0From: a.g.bell@bell-telephone.com (A. Bell) INVITESIP/2.0From: a.g.bell@bell-telephone.com (A. Bell)
To: watson@bell-telephone.com (T. A. Watson) To: watson@bell-telephone.com (T. A. Watson)
Call-ID: 187602141351@worcester.bell-telephone.com Call-ID: 187602141351@worcester.bell-telephone.com
Subject: Mr. Watson, come here. Subject: Mr. Watson, come here.
skipping to change at page 87, line 6 skipping to change at page 80, line 4
enough information to fake a response.) enough information to fake a response.)
Client should be particularly careful with 3xx redirection responses. Client should be particularly careful with 3xx redirection responses.
Thus a client receiving, for example, a 301 (Moved Permanently) which Thus a client receiving, for example, a 301 (Moved Permanently) which
was not authenticated when the public key of the called user agent is was not authenticated when the public key of the called user agent is
known to the client, and authentication was requested in the request known to the client, and authentication was requested in the request
SHOULD be treated as suspicious. The correct behaviour in such a case SHOULD be treated as suspicious. The correct behaviour in such a case
would be for the called-user to form a dated response containing the would be for the called-user to form a dated response containing the
Location field to be used, to sign it, and give this signed stub Location field to be used, to sign it, and give this signed stub
response to the proxy that will provide the redirection. Thus the response to the proxy that will provide the redirection. Thus the
response can be authenticated correctly. There may be circumstances
where such unauthenticated responses are unavoidable, but a client
SHOULD NOT automatically redirect such a request to the new location SHOULD NOT automatically redirect such a request to the new location
without alerting the user to the authentication failure before doing without alerting the user to the authentication failure before doing
so. so.
Another problem might be responses such as 6xx failure responses Another problem might be responses such as 6xx failure responses
which would simply terminate a search, or "4xx" and "5xx" response which would simply terminate a search, or "4xx" and "5xx" response
failures. failures.
If TCP is being used, a proxy SHOULD treat 4xx and 5xx responses as If TCP is being used, a proxy SHOULD treat 4xx and 5xx responses as
valid, as they will not terminate a search. However, 6xx responses valid, as they will not terminate a search. However, 6xx responses
skipping to change at page 88, line 11 skipping to change at page 81, line 4
do so. It is obliged to forward the 6xx response back to the client. do so. It is obliged to forward the 6xx response back to the client.
The client can then ignore the response, but if it repeats the The client can then ignore the response, but if it repeats the
request it will probably reach the same rogue proxy again, and the request it will probably reach the same rogue proxy again, and the
process will repeat. process will repeat.
13 SIP Security Using PGP 13 SIP Security Using PGP
13.1 PGP Authentication Scheme 13.1 PGP Authentication Scheme
The "pgp" authentication scheme is based on the model that the client The "pgp" authentication scheme is based on the model that the client
must authenticate itself with a request signed with the client's
private key. The server can then ascertain the origin of the request
if it has access to the public key, preferably signed by a trusted if it has access to the public key, preferably signed by a trusted
third party. third party.
13.1.1 The WWW-Authenticate Response Header 13.1.1 The WWW-Authenticate Response Header
WWW-Authenticate ___ "WWW-Authenticate" ":" "pgp" pgp-challenge WWW-Authenticate = "WWW-Authenticate" ":" "pgp" pgp-challenge
pgp-challenge ___ 1# ( realm | pgp-version | pgp-algorithm ) pgp-challenge = 1# ( realm | pgp-version | pgp-algorithm )
realm ___ "realm" "=" realm-value realm = "realm" "=" realm-value
realm-value ___ quoted-string realm-value = quoted-string
pgp-version ___ "version" "=" digit *( "." digit ) *letter pgp-version = "version" "=" digit *( "." digit ) *letter
pgp-algorithm ___ "algorithm" "=" ( "md5" | "sha1" | token ) pgp-algorithm = "algorithm" "=" ( "md5" | "sha1" | token )
The meanings of the values of the parameters used above are as The meanings of the values of the parameters used above are as
follows: follows:
realm: A string to be displayed to users so they know which identity realm: A string to be displayed to users so they know which identity
to use. This string should contain at least the name of the host to use. This string should contain at least the name of the host
performing the authentication and might additionally indicate performing the authentication and might additionally indicate
the collection of users who might have access. An example might the collection of users who might have access. An example might
be " Users with call-out privileges ". be " Users with call-out privileges ".
skipping to change at page 89, line 14 skipping to change at page 82, line 4
13.1.2 The Authorization Request Header 13.1.2 The Authorization Request Header
The client is expected to retry the request, passing an Authorization The client is expected to retry the request, passing an Authorization
header line, which is defined as follows. header line, which is defined as follows.
Authorization ___ "Authorization" ":" "pgp" pgp-response Authorization ___ "Authorization" ":" "pgp" pgp-response
pgp-response ___ 1# (realm | pgp-version | pgp-signature | signed-by) pgp-response ___ 1# (realm | pgp-version | pgp-signature | signed-by)
pgp-signature ___ "signature" "=" quoted-string pgp-signature ___ "signature" "=" quoted-string
signed-by ___ "signed-by" "=" URI signed-by ___ "signed-by" "=" URI
The signature MUST correspond to the From header of the request
unless the signed-by parameter is provided. unless the signed-by parameter is provided.
pgp-signature: The PGP ASCII-armored signature, as it appears between pgp-signature: The PGP ASCII-armored signature, as it appears between
the "BEGIN PGP MESSAGE" and "END PGP MESSAGE" delimiters, the "BEGIN PGP MESSAGE" and "END PGP MESSAGE" delimiters,
without the version indication. The signature is included without the version indication. The signature is included
without any linebreaks. without any linebreaks.
The signature is computed across the request method, request version The signature is computed across the request method, request version
and header fields following the Authorization header and the message and header fields following the Authorization header and the message
body, in the same order as they appear in the message. The request body, in the same order as they appear in the message. The request
skipping to change at page 91, line 23 skipping to change at page 84, line 5
14 Examples 14 Examples
14.1 Registration 14.1 Registration
A user at host saturn.bell-tel.com registers on start-up, via A user at host saturn.bell-tel.com registers on start-up, via
multicast, with the local SIP server named sip.bell-tel.com the multicast, with the local SIP server named sip.bell-tel.com the
example, the user agent on saturn expects to receive SIP requests on example, the user agent on saturn expects to receive SIP requests on
UDP port 3890. UDP port 3890.
C->S: REGISTER sip:@bell-tel.com SIP/2.0
From: sip:watson@bell-tel.com
To: sip:watson@bell-tel.com To: sip:watson@bell-tel.com
Location: sip:saturn.bell-tel.com:3890;transport=udp Location: sip:saturn.bell-tel.com:3890;transport=udp
Expires: 7200 Expires: 7200
CSeq: 1 REGISTER
The registration expires after two hours. Any future invitations for The registration expires after two hours. Any future invitations for
watson@bell-tel.com arriving at sip.bell-tel.com will now be watson@bell-tel.com arriving at sip.bell-tel.com will now be
redirected to watson@saturn.bell-tel.com , UDP port 3890. redirected to watson@saturn.bell-tel.com , UDP port 3890.
If Watson wants to be reached elsewhere, say, an on-line service he If Watson wants to be reached elsewhere, say, an on-line service he
uses while traveling, he updates his reservation after first uses while traveling, he updates his reservation after first
cancelling any existing locations: cancelling any existing locations:
C->S: REGISTER sip:@bell-tel.com SIP/2.0 C->S: REGISTER sip:@bell-tel.com SIP/2.0
skipping to change at page 92, line 24 skipping to change at page 85, line 4
The request could be send to either the registrar at bell-tel.com or The request could be send to either the registrar at bell-tel.com or
the server at example.com example.com would proxy the request to the the server at example.com example.com would proxy the request to the
address indicated in the Request-URI. Then, Max-Forwards header address indicated in the Request-URI. Then, Max-Forwards header
could be used to restrict the registration to that server. could be used to restrict the registration to that server.
14.2 Invitation to Multicast Conference 14.2 Invitation to Multicast Conference
The first example invites schooler@vlsi.cs.caltech.edu to a multicast The first example invites schooler@vlsi.cs.caltech.edu to a multicast
session. All examples use the Session Description Protocol (SDP) (RFC session. All examples use the Session Description Protocol (SDP) (RFC
2327 [7]) as the session description format.
14.2.1 Request 14.2.1 Request
C->S: INVITE sip:schooler@vlsi.cs.caltech.edu SIP/2.0 C->S: INVITE sip:schooler@vlsi.cs.caltech.edu SIP/2.0
Via: SIP/2.0/UDP 239.128.16.254 16 Via: SIP/2.0/UDP 239.128.16.254 ;ttl=16
Via: SIP/2.0/UDP 131.215.131.131 Via: SIP/2.0/UDP 131.215.131.131
Via: SIP/2.0/UDP 128.16.64.19 Via: SIP/2.0/UDP 128.16.64.19
From: Mark Handley <sip:mjh@isi.edu> From: Mark Handley <sip:mjh@isi.edu>
To: Eve Schooler <sip:schooler@caltech.edu> To: Eve Schooler <sip:schooler@caltech.edu>
Subject: SIP will be discussed, too Subject: SIP will be discussed, too
Call-ID: 19971205T234505.56.78@oregon.isi.edu Call-ID: 19971205T234505.56.78@oregon.isi.edu
Content-Type: application/sdp Content-Type: application/sdp
CSeq: 4711 CSeq: 4711 INVITE
Content-Length: 187 Content-Length: 187
v=0 v=0
o=user1 53655765 2353687637 IN IP4 128.3.4.5 o=user1 53655765 2353687637 IN IP4 128.3.4.5
s=Mbone Audio s=Mbone Audio
i=Discussion of Mbone Engineering Issues i=Discussion of Mbone Engineering Issues
e=mbone@somewhere.com e=mbone@somewhere.com
c=IN IP4 224.2.0.1/127 c=IN IP4 224.2.0.1/127
t=0 0 t=0 0
m=audio 3456 RTP/AVP 0 m=audio 3456 RTP/AVP 0
skipping to change at page 93, line 27 skipping to change at page 85, line 51
The header is terminated by an empty line and is followed by a The header is terminated by an empty line and is followed by a
message body containing the session description. message body containing the session description.
14.2.2 Response 14.2.2 Response
The called user agent, directly or indirectly through proxy servers, The called user agent, directly or indirectly through proxy servers,
indicates that it is alerting ("ringing") the called party: indicates that it is alerting ("ringing") the called party:
S->C: SIP/2.0 180 Ringing S->C: SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 239.128.16.254 16 ;branch=17 Via: SIP/2.0/UDP 239.128.16.254 ;ttl=16 ;branch=17
Via: SIP/2.0/UDP csvax.cs.caltech.edu ;branch=8348
Via: SIP/2.0/UDP north.east.isi.edu
To: Eve Schooler <sip:schooler@caltech.edu> To: Eve Schooler <sip:schooler@caltech.edu>
From: Mark Handley <sip:mjh@isi.edu> From: Mark Handley <sip:mjh@isi.edu>
Call-ID: 19971205T234505.56.78@north.east.isi.edu Call-ID: 19971205T234505.56.78@north.east.isi.edu
Location: sip:es@jove.cs.caltech.edu Location: sip:es@jove.cs.caltech.edu
CSeq: 4711 CSeq: 4711 INVITE
A sample response to the invitation is given below. The first line of A sample response to the invitation is given below. The first line of
the response states the SIP version number, that it is a 200 (OK) the response states the SIP version number, that it is a 200 (OK)
response, which means the request was successful. The Via headers response, which means the request was successful. The Via headers
are taken from the request, and entries are removed hop by hop as the are taken from the request, and entries are removed hop by hop as the
response retraces the path of the request. A new authentication field response retraces the path of the request. A new authentication field
MAY be added by the invited user's agent if required. The Call-ID is MAY be added by the invited user's agent if required. The Call-ID is
taken directly from the original request, along with the remaining taken directly from the original request, along with the remaining
fields of the request message. The original sense of From field is fields of the request message. The original sense of From field is
preserved (i.e., it is the session initiator). preserved (i.e., it is the session initiator).
skipping to change at page 94, line 13 skipping to change at page 86, line 32
which should be reachable from the caller's host. which should be reachable from the caller's host.
S->C: SIP/2.0 200 OK S->C: SIP/2.0 200 OK
Via: SIP/2.0/UDP 239.128.16.254 16 ;branch=17 Via: SIP/2.0/UDP 239.128.16.254 16 ;branch=17
Via: SIP/2.0/UDP csvax.cs.caltech.edu ;branch=8348 Via: SIP/2.0/UDP csvax.cs.caltech.edu ;branch=8348
Via: SIP/2.0/UDP north.east.isi.edu Via: SIP/2.0/UDP north.east.isi.edu
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: sip:schooler@cs.caltech.edu To: sip:schooler@cs.caltech.edu
Call-ID: 19971205T234505.56.78@north.east.isi.edu Call-ID: 19971205T234505.56.78@north.east.isi.edu
Location: sip:es@jove.cs.caltech.edu Location: sip:es@jove.cs.caltech.edu
CSeq: 4711 CSeq: 4711 INVITE
The caller confirms the invitation by sending a request to the The caller confirms the invitation by sending a request to the
location named in the Location header: location named in the Location header:
C->S: ACK sip:es@jove.cs.caltech.edu SIP/2.0 C->S: ACK sip:es@jove.cs.caltech.edu SIP/2.0
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: sip:schooler@cs.caltech.edu To: sip:schooler@cs.caltech.edu
Call-ID: 19971205T234505.56.78@oregon.isi.edu Call-ID: 19971205T234505.56.78@oregon.isi.edu
CSeq: 4711 CSeq: 4711 ACK
14.3 Two-party Call 14.3 Two-party Call
For two-party Internet phone calls, the response must contain a For two-party Internet phone calls, the response must contain a
description of where to send the data. In the example below, Bell description of where to send the data. In the example below, Bell
calls Watson. Bell indicates that he can receive RTP audio codings 0
(PCMU), 3 (GSM), 4 (G.723) and 5 (DVI4).
C->S: INVITE sip:watson@boston.bell-tel.com SIP/2.0 C->S: INVITE sip:watson@boston.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP 169.130.12.5 Via: SIP/2.0/UDP 169.130.12.5
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:watson@bell-tel.com> To: T. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com Call-ID: 1985853074@kensington.bell-tel.com
Subject: Mr. Watson, come here. Subject: Mr. Watson, come here.
CSeq: 17 CSeq: 17 INVITE
Content-Type: application/sdp Content-Type: application/sdp
Content-Length: ... Content-Length: ...
v=0 v=0
o=bell 53655765 2353687637 IN IP4 128.3.4.5 o=bell 53655765 2353687637 IN IP4 128.3.4.5
c=IN IP4 135.180.144.94 c=IN IP4 135.180.144.94
m=audio 3456 RTP/AVP 0 3 4 5 m=audio 3456 RTP/AVP 0 3 4 5
S->C: SIP/2.0 100 Trying
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com
Content-Length: 0
S->C: SIP/2.0 180 Ringing
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com
Content-Length: 0
S->C: SIP/2.0 182 Queued, 2 callers ahead
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com
Content-Length: 0
S->C: SIP/2.0 182 Queued, 1 caller ahead
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com
Content-Length: 0
S->C: SIP/2.0 200 OK S->C: SIP/2.0 200 OK
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: sip:watson@bell-tel.com To: sip:watson@bell-tel.com
Call-ID: 1985853074@kensington.bell-tel.com Call-ID: 1985853074@kensington.bell-tel.com
CSeq: 17 CSeq: 17 INVITE
Location: sip:watson@boston.bell-tel.com Location: sip:watson@boston.bell-tel.com
Content-Length: ... Content-Length: ...
v=0 v=0
o=watson 4858949 4858949 IN IP4 192.1.2.3 o=watson 4858949 4858949 IN IP4 192.1.2.3
c=IN IP4 135.180.161.25 c=IN IP4 135.180.161.25
m=audio 5004 RTP/AVP 0 3 m=audio 5004 RTP/AVP 0 3
The example illustrates the use of informational status responses.
Here, the reception of the call is confirmed immediately (100), then,
possibly after some database mapping delay, the call rings (180) and
is then queued, with periodic status updates.
Watson can only receive PCMU and GSM. Note that Watson's list of Watson can only receive PCMU and GSM. Note that Watson's list of
codecs may or may not be a subset of the one offered by Bell, as each codecs may or may not be a subset of the one offered by Bell, as each
party indicates the data types it is willing to receive. Watson will party indicates the data types it is willing to receive. Watson will
send audio data to port 3456 at 135.180.144.94, Bell will send to send audio data to port 3456 at 135.180.144.94, Bell will send to
port 5004 at 135.180.161.25. port 5004 at 135.180.161.25.
By default, the media session is one RTP session. Watson will receive By default, the media session is one RTP session. Watson will receive
RTCP packets on port 5005, while Bell will receive them on port 3457. RTCP packets on port 5005, while Bell will receive them on port 3457.
Since the two sides have agree on the set of media, Watson confirms Since the two sides have agree on the set of media, Watson confirms
the call without enclosing another session description: the call without enclosing another session description:
C->S: ACK sip:watson@boston.bell-tel.com SIP/2.0 C->S: ACK sip:watson@boston.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP 169.130.12.5 Via: SIP/2.0/UDP 169.130.12.5
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:watson@bell-tel.com> To: T. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com Call-ID: 1985853074@kensington.bell-tel.com
CSeq: 17 CSeq: 17 ACK
Content-Length: 0 Content-Length: 0
14.4 Terminating a Call 14.4 Terminating a Call
To terminate a call, caller or callee can send a BYE request: To terminate a call, caller or callee can send a BYE request:
C->S: BYE sip:watson@boston.bell-tel.com SIP/2.0 C->S: BYE sip:watson@boston.bell-tel.com SIP/2.0
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. A. Watson <sip:watson@bell-tel.com> To: T. A. Watson <sip:watson@bell-tel.com>
Call-ID: 1985853074@kensington.bell-tel.com Call-ID: 1985853074@kensington.bell-tel.com
CSeq: 18 CSeq: 18 BYE
If the callee wants to abort the call, it simply reverses the To and If the callee wants to abort the call, it simply reverses the To and
From fields. Note that it is unlikely that an BYE from the callee From fields. Note that it is unlikely that an BYE from the callee
will traverse the same proxies as the original INVITE. will traverse the same proxies as the original INVITE.
14.5 Forking Proxy 14.5 Forking Proxy
In this example, Bell ( a.g.bell@bell-tel.com ) (C), currently seated In this example, Bell ( a.g.bell@bell-tel.com ) (C), currently seated
at host c.bell-tel.com wants to call Watson ( t.watson@ieee.org ). At at host c.bell-tel.com wants to call Watson ( t.watson@ieee.org ). At
the time of the call, Watson is logged in at two workstations, the time of the call, Watson is logged in at two workstations,
watson@x.bell-tel.com (X) and watson@y.bell-tel.com (Y), and has watson@x.bell-tel.com (X) and watson@y.bell-tel.com (Y), and has
registered with the IEEE proxy server (P) called proxy.ieee.org
registration for the home machine of Watson, at watson@h.bell-tel.com
(H), as well as a permanent registration at watson@acm.org (A). For (H), as well as a permanent registration at watson@acm.org (A). For
brevity, the examples omit the session description. brevity, the examples omit the session description.
Watson's user agent sends the invitation to the SIP server for the Watson's user agent sends the invitation to the SIP server for the
ieee.org domain: ieee.org domain:
C->P: INVITE sip:watson@ieee.org SIP/2.0 C->P: INVITE sip:watson@ieee.org SIP/2.0
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@kensington.bell-tel.com Call-ID: 1985853074@kensington.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
The SIP server tries the four addresses in parallel. It sends the The SIP server tries the four addresses in parallel. It sends the
following message to the home machine: following message to the home machine:
P->H: INVITE sip:watson@h.bell-tel.com SIP/2.0 P->H: INVITE sip:watson@h.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP proxy.ieee.org ;branch=1 Via: SIP/2.0/UDP proxy.ieee.org ;branch=1
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
immediately yields a 404 (Not Found) response, since Watson is not This request immediately yields a 404 (Not Found) response, since
currently logged in at home: Watson is not currently logged in at home:
H->P: SIP/2.0 404 Not Found H->P: SIP/2.0 404 Not Found
Via: SIP/2.0/UDP proxy.ieee.org ;branch=1 Via: SIP/2.0/UDP proxy.ieee.org ;branch=1
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
ETag: "4711"
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
The proxy ACKs the response so that host H can stop retransmitting The proxy ACKs the response so that host H can stop retransmitting
it: it:
P->H: ACK sip:watson@h.bell-tel.com SIP/2.0 P->H: ACK sip:watson@h.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP proxy.ieee.org ;branch=1 Via: SIP/2.0/UDP proxy.ieee.org ;branch=1
If-Match: "4711" If-Match: "4711"
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com
CSeq: 19
Also, P attempts to reach Watson through the ACM server: Also, P attempts to reach Watson through the ACM server:
P->A: INVITE sip:watson@acm.org SIP/2.0 P->A: INVITE sip:watson@acm.org SIP/2.0
Via: SIP/2.0/UDP proxy.ieee.org ;branch=2 Via: SIP/2.0/UDP proxy.ieee.org ;branch=2
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
In parallel, the next attempt proceeds, with an INVITE to X and Y: In parallel, the next attempt proceeds, with an INVITE to X and Y:
P->X: INVITE sip:watson@x.bell-tel.com SIP/2.0 P->X: INVITE sip:watson@x.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP proxy.ieee.org ;branch=3 Via: SIP/2.0/UDP proxy.ieee.org ;branch=3
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
P->Y: INVITE sip:watson@y.bell-tel.com SIP/2.0 P->Y: INVITE sip:watson@y.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP proxy.ieee.org ;branch=4 Via: SIP/2.0/UDP proxy.ieee.org ;branch=4
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
As it happens, both Watson at X and a colleague in the other lab at As it happens, both Watson at X and a colleague in the other lab at
host Y hear the phones ringing and pick up. Both X and Y return 200s host Y hear the phones ringing and pick up. Both X and Y return 200s
via the proxy to Bell. The ETag is not strictly necessary here, via the proxy to Bell. The tag URI parameter is not strictly
since the Location header is unambiguous. necessary here, since the Location header is unambiguous.
X->P: SIP/2.0 200 OK X->P: SIP/2.0 200 OK
Via: SIP/2.0/UDP proxy.ieee.org ;branch=3 Via: SIP/2.0/UDP proxy.ieee.org ;branch=3
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
ETag: "1620" Location: sip:t.watson@x.bell-tel.com;tag=1620
Location: sip:t.watson@x.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
Y->P: SIP/2.0 200 OK Y->P: SIP/2.0 200 OK
Via: SIP/2.0/UDP proxy.ieee.org ;branch=4 Via: SIP/2.0/UDP proxy.ieee.org ;branch=4
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
ETag: "2016"
Location: sip:t.watson@y.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 INVITE
This response is forwarded to Bell, using the Via information. At Both responses are forwarded to Bell, using the Via information. At
this point, the ACM server is still searching its database. P can now this point, the ACM server is still searching its database. P can now
cancel this attempt: cancel this attempt:
P->A: CANCEL sip:watson@acm.org SIP/2.0 P->A: CANCEL sip:watson@acm.org SIP/2.0
Via: SIP/2.0/UDP proxy.ieee.org ;branch=2 Via: SIP/2.0/UDP proxy.ieee.org ;branch=2
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 CANCEL
The ACM server gladly stops its neural-network database search and The ACM server gladly stops its neural-network database search and
responds with a 200. The 200 will not travel any further, since P is responds with a 200. The 200 will not travel any further, since P is
the last Via stop. the last Via stop.
A->P: SIP/2.0 200 OK A->P: SIP/2.0 200 OK
Via: SIP/2.0/UDP proxy.ieee.org ;branch=3 Via: SIP/2.0/UDP proxy.ieee.org ;branch=3
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 CANCEL
Bell gets the two 200 responses from X and Y in short order. Bell's Bell gets the two 200 responses from X and Y in short order. Bell's
reaction now depends on his software. He can either send an ACK to reaction now depends on his software. He can either send an ACK to
both if human intelligence is needed to determine who he wants to both if human intelligence is needed to determine who he wants to
talk to or he can automatically reject one of the two calls. Here, he talk to or he can automatically reject one of the two calls. Here, he
acknowledges both, separately and directly to the final destination: acknowledges both, separately and directly to the final destination:
C->X: ACK sip:watson@x.bell-tel.com SIP/2.0 C->X: ACK sip:watson@x.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
If-Match: "1620" If-Match: "1620"
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 ACK
C->Y: ACK sip:watson@y.bell-tel.com SIP/2.0 C->Y: ACK sip:watson@y.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
If-Match: "2016"
From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 19 CSeq: 19 ACK
After a brief discussion between the three, it becomes clear that After a brief discussion between the three, it becomes clear that
Watson is at X, thus Bell sends a BYE to Y, which is replied to: Watson is at X, thus Bell sends a BYE to Y, which is replied to:
C->Y: BYE sip:watson@y.bell-tel.com SIP/2.0 C->Y: BYE sip:watson@y.bell-tel.com SIP/2.0
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
If-Match: "2016" If-Match: "2016"
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 20 CSeq: 20 BYE
Y->C: SIP/2.0 200 OK Y->C: SIP/2.0 200 OK
Via: SIP/2.0/UDP c.bell-tel.com Via: SIP/2.0/UDP c.bell-tel.com
From: A. Bell <sip:a.g.bell@bell-tel.com> From: A. Bell <sip:a.g.bell@bell-tel.com>
To: T. Watson <sip:t.watson@ieee.org> To: T. Watson <sip:t.watson@ieee.org>
Call-ID: 1985853074@c.bell-tel.com Call-ID: 1985853074@c.bell-tel.com
CSeq: 20 CSeq: 20 BYE
14.6 Redirects 14.6 Redirects
Replies with status codes 301 (Moved Permanently) or 302 (Moved Replies with status codes 301 (Moved Permanently) or 302 (Moved
Temporarily) specify another location using the Location field: Temporarily) specify another location using the Location field:
S->C: SIP/2.0 302 Moved temporarily S->C: SIP/2.0 302 Moved temporarily
Via: SIP/2.0/UDP csvax.cs.caltech.edu ;branch=8348 Via: SIP/2.0/UDP csvax.cs.caltech.edu ;branch=8348
Via: SIP/2.0/UDP 128.16.64.19 Via: SIP/2.0/UDP 128.16.64.19
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: sip:schooler@cs.caltech.edu To: sip:schooler@cs.caltech.edu
Call-ID: 3779067998@oregon.isi.edu Call-ID: 3779067998@oregon.isi.edu
Location: sip:@239.128.16.254;ttl=16;transport=udp Location: sip:@239.128.16.254;ttl=16;transport=udp
CSeq: 19 CSeq: 19 INVITE
Content-Length: 0 Content-Length: 0
In this example, the proxy located at csvax.cs.caltech.edu is being In this example, the proxy located at csvax.cs.caltech.edu is being
advised to contact the multicast group 239.128.16.254 with a ttl of advised to contact the multicast group 239.128.16.254 with a ttl of
16 and UDP transport. In normal situations, a server would not 16 and UDP transport. In normal situations, a server would not
suggest a redirect to a local multicast group unless, as in the above suggest a redirect to a local multicast group unless, as in the above
situation, it knows that the previous proxy or client is within the situation, it knows that the previous proxy or client is within the
scope of the local group. If the request is redirected to a multicast scope of the local group. If the request is redirected to a multicast
group, a proxy server SHOULD query the multicast address itself
rather than sending the redirect back towards the client as multicast
may be scoped; this allows a proxy within the appropriate scope may be scoped; this allows a proxy within the appropriate scope
regions to make the query. regions to make the query.
14.7 Alternative Services 14.7 Alternative Services
An example of a 350 (Alternative Service) response is: An example of a 350 (Alternative Service) response is:
S->C: SIP/2.0 350 Alternative Service S->C: SIP/2.0 350 Alternative Service
Via: SIP/2.0/UDP 131.215.131.131 Via: SIP/2.0/UDP 131.215.131.131
Via: SIP/2.0/UDP 128.16.64.19 Via: SIP/2.0/UDP 128.16.64.19
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: schooler@cs.caltech.edu To: schooler@cs.caltech.edu
Call-ID: 19971205T234505.56.78@oregon.isi.edu Call-ID: 19971205T234505.56.78@oregon.isi.edu
Location: recorder@131.215.131.131 Location: sip:ecorder@131.215.131.131
CSeq: 19 CSeq: 19 INVITE
Content-Type: application/sdp Content-Type: application/sdp
Content-Length: 146 Content-Length: 146
v=0 v=0
o=mm-server 2523535 0 IN IP4 131.215.131.131 o=mm-server 2523535 0 IN IP4 131.215.131.131
s=Answering Machine s=Answering Machine
i=Leave an audio message i=Leave an audio message
c=IN IP4 131.215.131.131 c=IN IP4 131.215.131.131
t=0 0 t=0 0
m=audio 12345 RTP/AVP 0 m=audio 12345 RTP/AVP 0
skipping to change at page 101, line 35 skipping to change at page 93, line 44
the session description provided (modified as appropriate for a the session description provided (modified as appropriate for a
unicast session to contain the appropriate local address and port for unicast session to contain the appropriate local address and port for
the invitation initiator). This request SHOULD contain a different the invitation initiator). This request SHOULD contain a different
Call-ID from the one in the original request. An example would be: Call-ID from the one in the original request. An example would be:
C->S: INVITE sip:mm-server@131.215.131.131 SIP/2.0 C->S: INVITE sip:mm-server@131.215.131.131 SIP/2.0
Via: SIP/2.0/UDP 128.16.64.19 Via: SIP/2.0/UDP 128.16.64.19
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: sip:schooler@cs.caltech.edu To: sip:schooler@cs.caltech.edu
Call-ID: 19971205T234505.56.78@128.16.64.19 Call-ID: 19971205T234505.56.78@128.16.64.19
CSeq: 20 CSeq: 20 INVITE
Content-Type: application/sdp Content-Type: application/sdp
Content-Length: 146 Content-Length: 146
v=0 v=0
o=mm-server 2523535 0 IN IP4 131.215.131.131 o=mm-server 2523535 0 IN IP4 131.215.131.131
s=Answering Machine s=Answering Machine
i=Leave an audio message
c=IN IP4 128.16.64.19
t=0 0 t=0 0
m=audio 26472 RTP/AVP 0 m=audio 26472 RTP/AVP 0
Invitation initiators MAY choose to treat a 350 (Alternative Service) Invitation initiators MAY choose to treat a 350 (Alternative Service)
response as a failure if they wish to do so. response as a failure if they wish to do so.
14.8 Negotiation 14.8 Negotiation
An example of a 606 (Not Acceptable) response is: An example of a 606 (Not Acceptable) response is:
S->C: SIP/2.0 606 Not Acceptable S->C: SIP/2.0 606 Not Acceptable
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: sip:schooler@cs.caltech.edu To: sip:schooler@cs.caltech.edu
skipping to change at page 102, line 15 skipping to change at page 94, line 18
response as a failure if they wish to do so. response as a failure if they wish to do so.
14.8 Negotiation 14.8 Negotiation
An example of a 606 (Not Acceptable) response is: An example of a 606 (Not Acceptable) response is:
S->C: SIP/2.0 606 Not Acceptable S->C: SIP/2.0 606 Not Acceptable
From: sip:mjh@isi.edu From: sip:mjh@isi.edu
To: sip:schooler@cs.caltech.edu To: sip:schooler@cs.caltech.edu
Call-ID: 19971205T234505.56.78@128.16.64.19 Call-ID: 19971205T234505.56.78@128.16.64.19
Location: mjh@131.215.131.131 Location: sip:mjh@131.215.131.131
Warning: 606.1 Insufficient bandwidth (only have ISDN), Warning: 606.1 Insufficient bandwidth (only have ISDN),
606.3 Incompatible format, 606.3 Incompatible format,
606.4 Multicast not available 606.4 Multicast not available
Content-Type: application/sdp Content-Type: application/sdp
Content-Length: 50 Content-Length: 50
v=0 v=0
s=Lets talk s=Lets talk
b=CT:128 b=CT:128
c=IN IP4 131.215.131.131 c=IN IP4 131.215.131.131
skipping to change at page 102, line 42 skipping to change at page 94, line 45
whiteboard. The audio coding and whiteboard are not available, but whiteboard. The audio coding and whiteboard are not available, but
the response states that DVI, PCM or LPC audio could be supported in the response states that DVI, PCM or LPC audio could be supported in
order of preference. The response also states that multicast is not order of preference. The response also states that multicast is not
available. In such a case, it might be appropriate to set up a available. In such a case, it might be appropriate to set up a
transcoding gateway and re-invite the user. transcoding gateway and re-invite the user.
14.9 OPTIONS Request 14.9 OPTIONS Request
A caller Alice can use an OPTIONS request to find out the A caller Alice can use an OPTIONS request to find out the
capabilities of a potential callee Bob, without "ringing" the capabilities of a potential callee Bob, without "ringing" the
designated address. In this case, Bob indicates that he can be designated address. Bob returns a description indicating that he is
reached at three different addresses, ranging from voice-over-IP to a capable of receiving audio and video, with a list of supported
PSTN phone to a pager. encodings.
C->S: OPTIONS sip:bob@example.com SIP/2.0
From: Alice <sip:alice@anywhere.org>
To: Bob <sip:bob@example.com>
Accept: application/sdp
S->C: SIP/2.0 200 OK
Location: sip:bob@host.example.com ;service=IP,voice-mail
;media=audio ;duplex=full ;q=0.7
Location: phone:+1-415-555-1212 ; service=ISDN;mobility=fixed;
language=en,es,iw ;q=0.5
Location: phone:+1.800.555.1212 ; service=pager;mobility=mobile;
duplex=send-only;media=text; q=0.1
Alternatively, Bob could have returned a description of
C->S: OPTIONS sip:bob@example.com SIP/2.0
From: Alice <sip:alice@anywhere.org>
To: Bob <sip:bob@example.com> To: Bob <sip:bob@example.com>
Accept: application/sdp Accept: application/sdp
S->C: SIP/2.0 200 OK S->C: SIP/2.0 200 OK
Content-Length: 81 Content-Length: 81
Content-Type: application/sdp Content-Type: application/sdp
v=0 v=0
m=audio 0 RTP/AVP 0 1 3 99 m=audio 0 RTP/AVP 0 1 3 99
m=video 0 RTP/AVP 29 30 m=video 0 RTP/AVP 29 30
skipping to change at page 104, line 24 skipping to change at page 96, line 4
SHOULD be able to parse the Warning response header to provide SHOULD be able to parse the Warning response header to provide
useful feedback to the caller. useful feedback to the caller.
Authentication: If a client wishes to invite callees that require Authentication: If a client wishes to invite callees that require
caller authentication, it must be able to recognize the 401 caller authentication, it must be able to recognize the 401
(Unauthorized) status code, must be able to generate the (Unauthorized) status code, must be able to generate the
Authorization request header and MUST understand the WWW- Authorization request header and MUST understand the WWW-
Authenticate response header. Authenticate response header.
If a client wishes to use proxies that require caller authentication, If a client wishes to use proxies that require caller authentication,
it MUST be able to recognize the 407 (Proxy Authentication Required)
status code, MUST be able to generate the Proxy-Authorization request
header and understand the Proxy-Authenticate response header. header and understand the Proxy-Authenticate response header.
A.2 Server A.2 Server
A minimally compliant server implementation MUST understand the A minimally compliant server implementation MUST understand the
INVITE, ACK, OPTIONS and BYE requests. It MUST parse and generate, INVITE, ACK, OPTIONS and BYE requests. It MUST parse and generate,
as appropriate, the Call-ID, Content-Length, Content-Type, as appropriate, the Call-ID, Content-Length, Content-Type,
Expires, From, Max-Forwards, Require, To and Via headers. It MUST Expires, From, Max-Forwards, Require, To and Via headers. It MUST
echo the CSeq header in the response. It SHOULD include the Server echo the CSeq header in the response. It SHOULD include the Server
header in its responses. header in its responses.
skipping to change at page 105, line 7 skipping to change at page 96, line 32
By default, the nth media session in a unicast INVITE request will By default, the nth media session in a unicast INVITE request will
become a single RTP session with the nth media session in the become a single RTP session with the nth media session in the
response. Thus, the callee should be careful to order media response. Thus, the callee should be careful to order media
descriptions appropriately. descriptions appropriately.
It is assumed that if caller or callee include a particular media It is assumed that if caller or callee include a particular media
type, they want to both send and receive media data. If the callee type, they want to both send and receive media data. If the callee
does not want to send a particular media type, it should mark the does not want to send a particular media type, it should mark the
media entry as recvonly receive a particular media type, it may mark media entry as recvonly receive a particular media type, it may mark
as sendonly wants to neither receiver nor send a particular media it as sendonly wants to neither receive nor send a particular media
type, it should set the port to zero. (RTCP ports are not needed in type, it should set the port to zero. (RTCP ports are not needed in
this case.) this case.)
The caller should include all media types that it is willing to send The caller should include all media types that it is willing to send
so that the receiver can provide matching media descriptions. so that the receiver can provide matching media descriptions.
The callee should set the port to zero if callee and caller only want The callee should set the port to zero if callee and caller only want
to receive a media type. to receive a media type.
C Summary of Augmented BNF C Summary of Augmented BNF
skipping to change at page 105, line 29 skipping to change at page 97, line 4
In this specification we use the Augmented Backus-Naur Form notation In this specification we use the Augmented Backus-Naur Form notation
described in RFC 2234 [24]. For quick reference, the following is a described in RFC 2234 [24]. For quick reference, the following is a
brief summary of the main features of this ABNF. brief summary of the main features of this ABNF.
"abc" "abc"
The case-insensitive string of characters "abc" (or "Abc", The case-insensitive string of characters "abc" (or "Abc",
"aBC", etc.); "aBC", etc.);
%d32 %d32
The character with ASCII code decimal 32 (space); The character with ASCII code decimal 32 (space);
*term
zero of more instances of term; zero of more instances of term;
3*term 3*term
three or more instances of term; three or more instances of term;
2*4term 2*4term
two, three or four instances of term; two, three or four instances of term;
[ term ] [ term ]
term is optional; term is optional;
term1 term2 term3 term1 term2 term3
set notation: term1, term2 and term3 must all appear but set notation: term1, term2 and term3 must all appear but
their order is unimportant; their order is unimportant;
term1 | term2 term1 | term2
either term1 or term2 may appear but not both; either term1 or term2 may appear but not both;
#term #term
a comma separated list of term; a comma separated list of term;
2#term
a comma separated list of term containing at least 2 items;
2#4term
a comma separated list of term containing 2 to 4 items.
Common Tokens
Certain tokens are used frequently in the BNF this document, and not
defined elsewhere. Their meaning is well understood but we include it
here for completeness.
CR = %d13 ; carriage return character
LF = %d10 ; line feed character
CRLF = CR LF ; typically the end of a line
SP = %d32 ; space character
TAB = %d09 ; tab character
LWS = *( SP | TAB) ; linear whitespace
DIGIT = "0" .. "9" ; a single decimal digit
D IANA Considerations
Section 4.4 describes a name space and mechanism for registering SIP
options.
type UAC proxy UAS type UAC proxy UAS
____________________________________________________ ____________________________________________________
Accept R - o o Accept R - o o
Accept-Language R - b b Accept-Language R - b b
Allow 405 o - - Allow 405 o - -
Authorization R a o a Authorization R a o a
Call-ID g m m m Call-ID g m m m
Content-Length g m m m Content-Length g m m m
Content-Type g m - m Content-Type g m - m
CSeq g o m m CSeq g o m m
skipping to change at page 106, line 50 skipping to change at page 98, line 51
Table 4: This table indicates which systems should be able to parse Table 4: This table indicates which systems should be able to parse
which response header fields. Type is as table 3. "-" indicates the which response header fields. Type is as table 3. "-" indicates the
field is not meaningful to this system (although it might be field is not meaningful to this system (although it might be
generated by it). "m" indicates the field MUST be understood. "b" generated by it). "m" indicates the field MUST be understood. "b"
indicates the field SHOULD be understood by a Basic implementation. indicates the field SHOULD be understood by a Basic implementation.
"r" indicates the field SHOULD be understood if the system claims to "r" indicates the field SHOULD be understood if the system claims to
understand redirection. "a" indicates the field SHOULD be understood understand redirection. "a" indicates the field SHOULD be understood
if the system claims to support authentication. "e" indicates the if the system claims to support authentication. "e" indicates the
field SHOULD be understood if the system claims to support field SHOULD be understood if the system claims to support
encryption. "o" indicates support of the field is purely optional. encryption. "o" indicates support of the field is purely optional.
2#term Changes in Version -06
a comma separated list of term containing at least 2 items;
Common Tokens
Certain tokens are used frequently in the BNF this document, and not
defined elsewhere. Their meaning is well understood but we include it
here for completeness.
CR = %d13 ; carriage return character
LF = %d10 ; line feed character
CRLF = CR LF ; typically the end of a line
SP = %d32 ; space character
TAB = %d09 ; tab character
LWS = *( SP | TAB) ; linear whitespace
DIGIT = "0" .. "9" ; a single decimal digit
D IANA Considerations
Section 4.4 describes a name space and mechanism for registering SIP
options.
Changes in Version -05
Since version -04, the following changes have been made.
o Local part of Call-ID needs to be cryptographically random.
o Added Response-Key, Encryption, Hide and "pgp"
authentication method.
o Removed Public, following the revised HTTP/1.1 [30]; Allow
can do the same thing.
o Updated phone URLs to [22].
o Proxy-Require header added, as in RTSP.
o "Emergency" priority value added.
o 381 (Ambiguous) status code added.
o Sequence numbers should be contiguous to allow loss detection.
Limited to 64 bits to allow numerical computations.
o The service definitions have been moved to a separate
document.
o The Also header field and Location parameters have moved to
a separate document.
o Call-ID defined consistently, with behavior for several calls
with the same Call-ID and several calls with different Call-
IDs for the same conference.
o UNREGISTER was removed since REGISTER with an expiration time
of zero accomplishes the same thing.
o Max-Forwards header and status 483 added.
o The default port number 5060 has been assigned to SIP. The
address 224.0.1.75 also has been assigned as the "all SIP
servers" multicast address.
o Added table with list of headers used by each SIP
server/client type.
o CSeq mandatory for requests and minimal implementations.
o Proxy search rules made more precise.
o Added ability of (state-ful) proxies to request to see BYE
and ACK packets via Record-Route and Route.
o Retransmission timer for INVITE changed to T3 = 30 seconds to
avoid multiple INVITEs for a typical phone call.
o ACKs may contain session descriptions.
o signed-by parameter added to Authorization header.
o INVITE and ACK requests may also contain Location so that
the callee can send the BYE directly.
o OPTIONS allowed to return current status such as Busy or
Decline.
o Unicast example clarified.
o Added section on SDP usage for unicast. Currently, require
"lining up" media types.
o Tentatively added CANCEL request to terminate searches.
o Status 181: Call Is Being Forwarded. Since version -05, the following changes have been made.
o Content-Encoding for compressed payloads. o Clarified definition of transaction and relation to ACK (since
ACK is not really part of the transaction, even though it has
the same CSeq and Call-ID).
o Retry-After may be used for REGISTER. o Postscript version had old proxy and redirect drawing.
o ETag, If-Match, If-None-Match o Vestiges of URL short form removed.
o Added method to CSeq response header. o Clarified that clients of all sorts (user agent, proxy) MAY
issue CANCEL.
o Folded in Yaron Goland's "nit" comments: URL phone now o CSeq reduced to 32 bits for implementation convenience.
conforms to "URLs for Telephony" I-D; production of password;
port number; short SIP URLs removed [controversial?].
o Cleaned up From, To, Request-URI throughout spec to always o Bug fixes in process_request code.
include full SIP URL. (Otherwise, there is an ambiguity with
users named "sip", since the user name can contain a colon.
Search Four11 if you don't believe that the name exists...)
o Warning header syntax fixed to allow 606.3. o Moved "Queued" response to main spec, since the decision to
queue can (will typically) also be taken by the callee, rather
than just the caller. This does not complicate the client or
server behavior.
o signed-by can be general URI. However, not clear yet whether o ETag removed in favor of the tag parameter in the URI.
URI schemes are the most appropriate mechanism to denote a
principal. In X.509 certificates, email addresses are used.
E Open Issues E Open Issues
E.1 H.323 E.1 H.323
Problem: Detailed interaction with H.323 and H.245. Problem: Detailed interaction with H.323 and H.245.
Solution: Leave to separate document. Solution: Leave to separate document.
Status: Closed. Status: Closed.
skipping to change at page 110, line 4 skipping to change at page 99, line 52
user agent is supposed to listen on. The server might also want user agent is supposed to listen on. The server might also want
to indicate whether all outgoing calls should be proxied through to indicate whether all outgoing calls should be proxied through
the server. Use of message bodies for REGISTER requests. the server. Use of message bodies for REGISTER requests.
Solution: Leave for follow-on work. Possible to use Location with 200 Solution: Leave for follow-on work. Possible to use Location with 200
response, but already otherwise used to indicate registrations. response, but already otherwise used to indicate registrations.
Status: Closed. Status: Closed.
E.3 Max-Forwards E.3 Max-Forwards
Problem: Extend Max-Forwards with a max fan out field. [Not really Problem: Extend Max-Forwards with a max fan out field. [Not really
related.] How do you limit fanout for multicast? What's the related.] How do you limit fanout for multicast? What's the
advantage of doing this? advantage of doing this?
Solution: Await operational experience as to whether users can
actually set this value to anything meaningful. actually set this value to anything meaningful.
Status: Closed. Status: Closed.
E.4 Cancellation and BYE E.4 Cancellation and BYE
Problem: Determine how to cancel Problem: Determine how to cancel
- searches - searches
skipping to change at page 110, line 41 skipping to change at page 100, line 36
Problem: Numeric IPv6 addresses in URLs. Problem: Numeric IPv6 addresses in URLs.
Solution: None; wait for others to take the lead. Note that this Solution: None; wait for others to take the lead. Note that this
affects only numeric addresses, which should be rarely used. affects only numeric addresses, which should be rarely used.
Status: Defered. Status: Defered.
F Acknowledgments F Acknowledgments
We wish to thank the members of the IETF MMUSIC WG for their comments We wish to thank the members of the IETF MMUSIC WG for their comments
and suggestions. Detailed comments were provided by Yaron Goland, and suggestions. Detailed comments were provided by Dave Devanathan,
Christian Huitema, Jonathan Lennox, Jonathan Rosenberg, and Moshe J. Yaron Goland, Christian Huitema, Jonathan Lennox, Jonathan Rosenberg,
Sambol. Moshe J. Sambol, and Eric Tremblay.
This work is based, inter alia, on [34,35]. This work is based, inter alia, on [34,35].
G Authors' Addresses G Authors' Addresses
Mark Handley Mark Handley
USC Information Sciences Institute USC Information Sciences Institute
c/o MIT Laboratory for Computer Science c/o MIT Laboratory for Computer Science
545 Technology Square 545 Technology Square
Cambridge, MA 02139 Cambridge, MA 02139
USA USA
electronic mail: mjh@isi.edu electronic mail: mjh@isi.edu
Henning Schulzrinne Henning Schulzrinne
Dept. of Computer Science Dept. of Computer Science
Columbia University Columbia University
1214 Amsterdam Avenue
New York, NY 10027
USA USA
electronic mail: schulzrinne@cs.columbia.edu electronic mail: schulzrinne@cs.columbia.edu
Eve Schooler Eve Schooler
Computer Science Department 256-80 Computer Science Department 256-80
California Institute of Technology California Institute of Technology
Pasadena, CA 91125 Pasadena, CA 91125
USA USA
electronic mail: schooler@cs.caltech.edu electronic mail: schooler@cs.caltech.edu
skipping to change at page 112, line 17 skipping to change at page 102, line 5
levels," RFC 2119, Internet Engineering Task Force, Mar. 1997. levels," RFC 2119, Internet Engineering Task Force, Mar. 1997.
[10] R. Fielding, J. Gettys, J. Mogul, H. Nielsen, and T. Berners- [10] R. Fielding, J. Gettys, J. Mogul, H. Nielsen, and T. Berners-
Lee, "Hypertext transfer protocol -- HTTP/1.1," RFC 2068, Internet Lee, "Hypertext transfer protocol -- HTTP/1.1," RFC 2068, Internet
Engineering Task Force, Jan. 1997. Engineering Task Force, Jan. 1997.
[11] T. Berners-Lee, L. Masinter, and M. McCahill, "Uniform resource [11] T. Berners-Lee, L. Masinter, and M. McCahill, "Uniform resource
locators (URL)," RFC 1738, Internet Engineering Task Force, Dec. locators (URL)," RFC 1738, Internet Engineering Task Force, Dec.
1994. 1994.
[12] A. Gulbrandsen and P. Vixie, "A DNS RR for specifying the
location of services (DNS SRV)," RFC 2052, Internet Engineering Task
Force, Oct. 1996. Force, Oct. 1996.
[13] C. Partridge, "Mail routing and the domain system," RFC STD 14, [13] C. Partridge, "Mail routing and the domain system," RFC STD 14,
974, Internet Engineering Task Force, Jan. 1986. 974, Internet Engineering Task Force, Jan. 1986.
[14] P. Mockapetris, "Domain names - implementation and [14] P. Mockapetris, "Domain names - implementation and
specification," RFC STD 13, 1035, Internet Engineering Task Force, specification," RFC STD 13, 1035, Internet Engineering Task Force,
Nov. 1987. Nov. 1987.
[15] B. Braden, "Requirements for internet hosts - application and [15] B. Braden, "Requirements for internet hosts - application and
skipping to change at page 113, line 23 skipping to change at page 103, line 5
[24] D. Crocker and P. Overell, "Augmented BNF for syntax [24] D. Crocker and P. Overell, "Augmented BNF for syntax
specifications: ABNF," RFC 2234, Internet Engineering Task Force, specifications: ABNF," RFC 2234, Internet Engineering Task Force,
Nov. 1997. Nov. 1997.
[25] W. R. Stevens, TCP/IP illustrated: the protocols , vol. 1. [25] W. R. Stevens, TCP/IP illustrated: the protocols , vol. 1.
Reading, Massachusetts: Addison-Wesley, 1994. Reading, Massachusetts: Addison-Wesley, 1994.
[26] J. Mogul and S. Deering, "Path MTU discovery," RFC 1191, [26] J. Mogul and S. Deering, "Path MTU discovery," RFC 1191,
Internet Engineering Task Force, Nov. 1990. Internet Engineering Task Force, Nov. 1990.
[27] D. Crocker, "Standard for the format of ARPA internet text
messages," RFC STD 11, 822, Internet Engineering Task Force, Aug. messages," RFC STD 11, 822, Internet Engineering Task Force, Aug.
1982. 1982.
[28] E. M. Schooler, "A multicast user directory service for [28] E. M. Schooler, "A multicast user directory service for
synchronous rendezvous," Master's Thesis CS-TR-96-18, Department of synchronous rendezvous," Master's Thesis CS-TR-96-18, Department of
Computer Science, California Institute of Technology, Pasadena, Computer Science, California Institute of Technology, Pasadena,
California, Aug. 1996. California, Aug. 1996.
[29] P. Resnick, "Internet message format standard," Internet Draft, [29] P. Resnick, "Internet message format standard," Internet Draft,
Internet Engineering Task Force, Mar. 1998. Work in progress. Internet Engineering Task Force, Mar. 1998. Work in progress.
skipping to change at page 114, line 26 skipping to change at page 104, line 4
This document and translations of it may be copied and furnished to This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English. English.
The limited permissions granted above are perpetual and will not be The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns. revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Table of Contents Table of Contents
1 Introduction ........................................ 2 1 Introduction ........................................ 2
1.1 Overview of SIP Functionality ....................... 2 1.1 Overview of SIP Functionality ....................... 2
1.2 Terminology ......................................... 3 1.2 Terminology ......................................... 3
1.3 Definitions ......................................... 4 1.3 Definitions ......................................... 4
1.4 Summary of SIP Operation ............................ 6 1.4 Summary of SIP Operation ............................ 7
1.4.1 SIP Addressing ...................................... 7 1.4.1 SIP Addressing ...................................... 7
1.4.2 Locating a SIP Server ............................... 8 1.4.2 Locating a SIP Server ............................... 8
1.4.3 SIP Transaction ..................................... 9 1.4.3 SIP Transaction ..................................... 9
1.4.4 SIP Invitation ...................................... 10 1.4.4 SIP Invitation ...................................... 10
1.4.5 Locating a User ..................................... 13 1.4.5 Locating a User ..................................... 13
1.4.6 Changing an Existing Session ........................ 13 1.4.6 Changing an Existing Session ........................ 13
1.4.7 Registration Services ............................... 14 1.4.7 Registration Services ............................... 14
1.5 Protocol Properties ................................. 14 1.5 Protocol Properties ................................. 14
1.5.1 Minimal State ....................................... 14 1.5.1 Minimal State ....................................... 14
1.5.2 Lower-Layer-Protocol Neutral ........................ 14 1.5.2 Lower-Layer-Protocol Neutral ........................ 14
1.5.3 Text-Based .......................................... 15 1.5.3 Text-Based .......................................... 15
2 SIP Uniform Resource Locators ....................... 15 2 SIP Uniform Resource Locators ....................... 15
3 SIP Message Overview ................................ 17 3 SIP Message Overview ................................ 17
4 Request ............................................. 19 4 Request ............................................. 19
4.1 Request-Line ........................................ 19 4.1 Request-Line ........................................ 20
4.2 Methods ............................................. 21 4.2 Methods ............................................. 20
4.2.1 INVITE ............................................. 21 4.2.1 INVITE ............................................. 20
4.2.2 ACK ................................................ 21 4.2.2 ACK ................................................ 21
4.2.3 OPTIONS ............................................ 22 4.2.3 OPTIONS ............................................ 21
4.2.4 BYE ................................................ 22 4.2.4 BYE ................................................ 21
4.2.5 CANCEL ............................................. 22 4.2.5 CANCEL ............................................. 22
4.2.6 REGISTER ........................................... 23 4.2.6 REGISTER ........................................... 22
4.3 Request-URI ......................................... 25 4.3 Request-URI ......................................... 24
4.3.1 SIP Version ......................................... 25 4.3.1 SIP Version ......................................... 24
4.4 Option Tags ......................................... 25 4.4 Option Tags ......................................... 24
4.4.1 Registering New Option Tags with IANA ............... 26 4.4.1 Registering New Option Tags with IANA ............... 25
5 Response ............................................ 26 5 Response ............................................ 25
5.1 Status-Line ......................................... 27 6 Header Field Definitions ............................ 28
5.1.1 Status Codes and Reason Phrases ..................... 27 6.1 General Header Fields ............................... 29
6 Header Field Definitions ............................ 30 6.2 Entity Header Fields ................................ 30
6.1 General Header Fields ............................... 31
6.2 Entity Header Fields ................................ 31
6.3 Request Header Fields ............................... 31 6.3 Request Header Fields ............................... 31
6.4 Response Header Fields .............................. 32 6.4 Response Header Fields .............................. 31
6.5 End-to-end and Hop-by-hop Headers ................... 32 6.5 End-to-end and Hop-by-hop Headers ................... 31
6.6 Header Field Format ................................. 32 6.6 Header Field Format ................................. 31
6.7 Accept ............................................. 34 6.7 Accept ............................................. 32
6.8 Accept-Encoding .................................... 34 6.8 Accept-Encoding .................................... 32
6.9 Accept-Language .................................... 34 6.9 Accept-Language .................................... 32
6.10 Allow .............................................. 34 6.10 Allow .............................................. 33
6.11 Authorization ...................................... 35 6.11 Authorization ...................................... 33
6.12 Call-ID ............................................ 35 6.12 Call-ID ............................................ 33
6.13 Content-Encoding ................................... 36 6.13 Content-Encoding ................................... 34
6.14 Content-Length ..................................... 36 6.14 Content-Length ..................................... 34
6.15 Content-Type ....................................... 37 6.15 Content-Type ....................................... 35
6.16 CSeq ............................................... 37 6.16 CSeq ............................................... 35
6.17 Date ............................................... 38 6.17 Date ............................................... 36
6.18 Encryption ......................................... 39 6.18 Encryption ......................................... 36
6.19 ETag ............................................... 40 6.19 Expires ............................................ 38
6.20 Expires ............................................ 41 6.20 From ............................................... 39
6.21 From ............................................... 42 6.21 Hide ............................................... 39
6.22 Hide ............................................... 42 6.22 Location ........................................... 40
6.23 If-Match ........................................... 43 6.23 Max-Forwards ....................................... 42
6.24 If-None-Match ...................................... 44 6.24 Organization ....................................... 43
6.25 Location ........................................... 44 6.25 Priority ........................................... 43
6.26 Max-Forwards ....................................... 46 6.26 Proxy-Authenticate ................................. 43
6.27 Organization ....................................... 47 6.27 Proxy-Authorization ................................ 44
6.28 Priority ........................................... 47 6.28 Proxy-Require ...................................... 44
6.29 Proxy-Authenticate ................................. 48 6.29 Require ............................................ 44
6.30 Proxy-Authorization ................................ 48 6.30 Record-Route ....................................... 45
6.31 Proxy-Require ...................................... 48 6.31 Response-Key ....................................... 46
6.32 Require ............................................ 49 6.32 Route .............................................. 46
6.33 Record-Route ....................................... 50 6.33 Retry-After ........................................ 47
6.34 Response-Key ....................................... 50 6.34 Server ............................................. 47
6.35 Route .............................................. 51 6.35 Subject ............................................ 47
6.36 Retry-After ........................................ 51 6.36 Timestamp .......................................... 48
6.37 Server ............................................. 52 6.37 To ................................................. 48
6.38 Subject ............................................ 52 6.38 Unsupported ........................................ 48
6.39 Timestamp .......................................... 52 6.39 User-Agent ......................................... 49
6.40 To ................................................. 53 6.40 Via ................................................ 49
6.41 Unsupported ........................................ 53 6.40.1 Requests ............................................ 49
6.42 User-Agent ......................................... 53 6.40.2 Receiver-tagged Via Fields ......................... 50
6.43 Via ................................................ 53 6.40.3 Responses ........................................... 50
6.43.1 Requests ............................................ 54 6.40.4 Syntax .............................................. 51
6.43.2 Receiver-tagged Via Fields .......................... 54 6.41 Warning ............................................ 51
6.43.3 Responses ........................................... 55 6.42 WWW-Authenticate ................................... 52
6.43.4 Syntax .............................................. 55 7 Status Code Definitions ............................. 53
6.44 Warning ............................................ 56 7.1 Informational 1xx ................................... 53
6.45 WWW-Authenticate ................................... 57 7.1.1 100 Trying .......................................... 53
7 Status Code Definitions ............................. 58 7.1.2 180 Ringing ......................................... 53
7.1 Informational 1xx ................................... 58 7.2 Successful 2xx ...................................... 54
7.1.1 100 Trying .......................................... 58 7.2.1 200 OK .............................................. 54
7.1.2 180 Ringing ......................................... 58 7.3 Redirection 3xx ..................................... 54
7.1.3 181 Call Is Being Forwarded ......................... 58 7.3.1 300 Multiple Choices ................................ 54
7.2 Successful 2xx ...................................... 59 7.3.2 301 Moved Permanently ............................... 55
7.2.1 200 OK .............................................. 59 7.3.3 302 Moved Temporarily ............................... 55
7.3 Redirection 3xx ..................................... 59 7.3.4 380 Alternative Service ............................. 55
7.3.1 300 Multiple Choices ................................ 59 7.3.5 381 Ambiguous ....................................... 55
7.3.2 301 Moved Permanently ............................... 60 7.4 Request Failure 4xx ................................. 56
7.3.3 302 Moved Temporarily ............................... 60 7.4.1 400 Bad Request ..................................... 56
7.3.4 380 Alternative Service ............................. 60 7.4.2 401 Unauthorized .................................... 56
7.3.5 381 Ambiguous ....................................... 60 7.4.3 402 Payment Required ................................ 56
7.4 Request Failure 4xx ................................. 61 7.4.4 403 Forbidden ....................................... 56
7.4.1 400 Bad Request ..................................... 61 7.4.5 404 Not Found ....................................... 56
7.4.2 401 Unauthorized .................................... 61 7.4.6 405 Method Not Allowed .............................. 56
7.4.3 402 Payment Required ................................ 61 7.4.7 407 Proxy Authentication Required ................... 56
7.4.4 403 Forbidden ....................................... 61 7.4.8 408 Request Timeout ................................. 57
7.4.5 404 Not Found ....................................... 61 7.4.9 420 Bad Extension ................................... 57
7.4.6 405 Method Not Allowed .............................. 61 7.4.10 480 Temporarily Unavailable ......................... 57
7.4.7 407 Proxy Authentication Required ................... 61 7.4.11 481 Invalid Call-ID ................................. 57
7.4.8 408 Request Timeout ................................. 62 7.4.12 482 Loop Detected ................................... 57
7.4.9 412 Precondition Failed ............................. 62 7.4.13 483 Too Many Hops ................................... 57
7.4.10 420 Bad Extension ................................... 62 7.4.14 484 Address Incomplete .............................. 57
7.4.11 480 Temporarily Unavailable ......................... 62 7.5 Server Failure 5xx .................................. 58
7.4.12 481 Invalid Call-ID ................................. 62 7.5.1 500 Server Internal Error ........................... 58
7.4.13 482 Loop Detected ................................... 62 7.5.2 501 Not Implemented ................................. 58
7.4.14 483 Too Many Hops ................................... 63 7.5.3 502 Bad Gateway ..................................... 58
7.4.15 484 Address Incomplete .............................. 63 7.5.4 503 Service Unavailable ............................. 58
7.5 Server Failure 5xx .................................. 63 7.5.5 504 Gateway Timeout ................................. 58
7.5.1 500 Server Internal Error ........................... 63 7.5.6 505 Version Not Supported ........................... 58
7.5.2 501 Not Implemented ................................. 63 7.6 Global Failures 6xx ................................. 59
7.5.3 502 Bad Gateway ..................................... 63 7.6.1 600 Busy ............................................ 59
7.5.4 503 Service Unavailable ............................. 63 7.6.2 603 Decline ......................................... 59
7.5.5 504 Gateway Timeout ................................. 64 7.6.3 604 Does Not Exist Anywhere ......................... 59
7.5.6 505 Version Not Supported ........................... 64 7.6.4 606 Not Acceptable .................................. 59
7.6 Global Failures 6xx ................................. 64 8 SIP Message Body .................................... 60
7.6.1 600 Busy ............................................ 64 8.1 Body Inclusion ...................................... 60
7.6.2 603 Decline ......................................... 64 8.2 Message Body Type ................................... 60
7.6.3 604 Does Not Exist Anywhere ......................... 64 8.3 Message Body Length ................................. 60
7.6.4 606 Not Acceptable .................................. 64 9 Compact Form ........................................ 61
8 SIP Message Body .................................... 65 10 SIP Transport ....................................... 62
8.1 Body Inclusion ...................................... 65 10.1 General Remarks ..................................... 62
8.2 Message Body Type ................................... 66 10.1.1 Requests ............................................ 62
8.3 Message Body Length ................................. 66 10.1.2 Responses ........................................... 62
9 Compact Form ........................................ 66 10.2 Unicast UDP ......................................... 63
10 SIP Transport ....................................... 67 10.3 Multicast UDP ....................................... 63
10.1 General Remarks ..................................... 67 10.4 BYE, CANCEL, OPTIONS ............................. 63
10.1.1 Requests ............................................ 67 10.5 REGISTER ........................................... 64
10.1.2 Responses ........................................... 68 10.6 ACK ................................................ 64
10.2 Unicast UDP ......................................... 68 10.7 INVITE ............................................. 64
10.3 Multicast UDP ....................................... 69 10.8 TCP Connections ..................................... 66
10.4 BYE, CANCEL, OPTIONS ............................. 69 11.2 User Agent Server ................................... 69
10.5 REGISTER ........................................... 69
10.6 ACK ................................................ 70
10.7 INVITE ............................................. 70
10.8 TCP Connections ..................................... 71
11 Behavior of SIP Servers ............................. 74
11.1 Redirect Server ..................................... 74
11.2 User Agent Server ................................... 75
11.3 Stateless Proxy: Proxy Servers Issuing Single 11.3 Stateless Proxy: Proxy Servers Issuing Single
Unicast Requests ............................................... 75 Unicast Requests ............................................... 69
11.4 Proxy Server Issuing Several INVITE Requests ....... 75 11.4 Proxy Server Issuing Several INVITE Requests ....... 69
11.5 Proxy Server Issuing Several ACK and BYE 11.5 Proxy Server Issuing Several ACK and BYE
Requests ....................................................... 79 Requests ....................................................... 73
12 Security Considerations ............................. 80 12 Security Considerations ............................. 73
12.1 Confidentiality and Privacy: Encryption ............. 80 12.1 Confidentiality and Privacy: Encryption ............. 73
12.1.1 SIP Transactions .................................... 80 12.1.1 SIP Requests and Responses .......................... 73
12.2 End-to-End Encryption ............................... 81 12.2 End-to-End Encryption ............................... 74
12.2.1 Privacy of SIP Responses ............................ 83 12.2.1 Privacy of SIP Responses ............................ 76
12.2.2 Encryption by Proxies ............................... 83 12.2.2 Encryption by Proxies ............................... 76
12.2.3 Hop-by-Hop Encryption ............................... 83 12.2.3 Hop-by-Hop Encryption ............................... 77
12.2.4 Via field encryption ................................ 83 12.2.4 Via field encryption ................................ 77
12.3 Message Integrity and Access Control: 12.3 Message Integrity and Access Control:
Authentication ................................................. 84 Authentication ................................................. 77
12.3.1 Trusting responses .................................. 86 12.3.1 Trusting responses .................................. 79
12.4 Callee Privacy ...................................... 87 12.4 Callee Privacy ...................................... 80
12.5 Known Security Problems ............................. 87 12.5 Known Security Problems ............................. 80
13 SIP Security Using PGP .............................. 88 13 SIP Security Using PGP .............................. 80
13.1 PGP Authentication Scheme ........................... 88 13.1 PGP Authentication Scheme ........................... 80
13.1.1 The WWW-Authenticate Response Header ............... 88 13.1.1 The WWW-Authenticate Response Header ............... 81
13.1.2 The Authorization Request Header ................... 89 13.1.2 The Authorization Request Header ................... 81
13.2 PGP Encryption Scheme ............................... 90 13.2 PGP Encryption Scheme ............................... 82
13.3 Response-Key Header Field for PGP .................. 90 13.3 Response-Key Header Field for PGP .................. 83
14 Examples ............................................ 91 14 Examples ............................................ 83
14.1 Registration ........................................ 91 14.1 Registration ........................................ 83
14.2 Invitation to Multicast Conference .................. 92 14.2 Invitation to Multicast Conference .................. 84
14.2.1 Request ............................................. 92 14.2.1 Request ............................................. 85
14.2.2 Response ............................................ 93 14.2.2 Response ............................................ 85
14.3 Two-party Call ...................................... 94 14.3 Two-party Call ...................................... 86
14.4 Terminating a Call .................................. 95 14.4 Terminating a Call .................................. 88
14.5 Forking Proxy ....................................... 96 14.5 Forking Proxy ....................................... 88
14.6 Redirects ........................................... 100 14.6 Redirects ........................................... 92
14.7 Alternative Services ................................ 100 14.7 Alternative Services ................................ 93
14.8 Negotiation ......................................... 102 14.8 Negotiation ......................................... 94
14.9 OPTIONS Request .................................... 102 14.9 OPTIONS Request .................................... 94
A Minimal Implementation .............................. 103 A Minimal Implementation .............................. 95
A.1 Client .............................................. 103 A.1 Client .............................................. 95
A.2 Server .............................................. 104 A.2 Server .............................................. 96
A.3 Header Processing ................................... 104 A.3 Header Processing ................................... 96
B Usage of SDP ........................................ 104 B Usage of SDP ........................................ 96
C Summary of Augmented BNF ............................ 105 C Summary of Augmented BNF ............................ 96
D IANA Considerations ................................. 107 D IANA Considerations ................................. 97
E Open Issues ......................................... 109 E Open Issues ......................................... 99
E.1 H.323 ............................................... 109 E.1 H.323 ............................................... 99
E.2 REGISTER ............................................ 109 E.2 REGISTER ............................................ 99
E.3 Max-Forwards ........................................ 109 E.3 Max-Forwards ........................................ 99
E.4 Cancellation and BYE ................................ 110 E.4 Cancellation and BYE ................................ 100
E.5 IPv6 URLs ........................................... 110 E.5 IPv6 URLs ........................................... 100
F Acknowledgments ..................................... 110 F Acknowledgments ..................................... 100
G Authors' Addresses .................................. 110
H Bibliography ........................................ 111
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/