draft-ietf-sip-outbound-04.txt   draft-ietf-sip-outbound-05.txt 
Network Working Group C. Jennings, Ed. Network Working Group C. Jennings, Ed.
Internet-Draft Cisco Systems Internet-Draft Cisco Systems
Updates: 3261,3327 (if approved) R. Mahy, Ed. Updates: 3261,3327 (if approved) R. Mahy, Ed.
Expires: December 27, 2006 Plantronics Expires: April 25, 2007 Plantronics
June 25, 2006 October 22, 2006
Managing Client Initiated Connections in the Session Initiation Protocol Managing Client Initiated Connections in the Session Initiation Protocol
(SIP) (SIP)
draft-ietf-sip-outbound-04 draft-ietf-sip-outbound-05
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 36 skipping to change at page 1, line 36
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on December 27, 2006. This Internet-Draft will expire on April 25, 2007.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The Internet Society (2006).
Abstract Abstract
The Session Initiation Protocol (SIP) allows proxy servers to The Session Initiation Protocol (SIP) allows proxy servers to
initiate TCP connections and send asynchronous UDP datagrams to User initiate TCP connections and send asynchronous UDP datagrams to User
Agents in order to deliver requests. However, many practical Agents in order to deliver requests. However, many practical
skipping to change at page 2, line 13 skipping to change at page 2, line 13
Agents in this way. This specification defines behaviors for User Agents in this way. This specification defines behaviors for User
Agents, registrars and proxy servers that allow requests to be Agents, registrars and proxy servers that allow requests to be
delivered on existing connections established by the User Agent. It delivered on existing connections established by the User Agent. It
also defines keep alive behaviors needed to keep NAT bindings open also defines keep alive behaviors needed to keep NAT bindings open
and specifies the usage of multiple connections. and specifies the usage of multiple connections.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4
2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . 4
3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Summary of Mechanism . . . . . . . . . . . . . . . . . . . 5 3.1 Summary of Mechanism . . . . . . . . . . . . . . . . . . . 5
3.2. Single Registrar and UA . . . . . . . . . . . . . . . . . 6 3.2 Single Registrar and UA . . . . . . . . . . . . . . . . . 6
3.3. Multiple Connections from a User Agent . . . . . . . . . . 7 3.3 Multiple Connections from a User Agent . . . . . . . . . . 7
3.4. Edge Proxies . . . . . . . . . . . . . . . . . . . . . . . 9 3.4 Edge Proxies . . . . . . . . . . . . . . . . . . . . . . . 9
3.5. Keepalive Technique . . . . . . . . . . . . . . . . . . . 10 3.5 Keepalive Technique . . . . . . . . . . . . . . . . . . . 10
4. User Agent Mechanisms . . . . . . . . . . . . . . . . . . . . 11 4. User Agent Mechanisms . . . . . . . . . . . . . . . . . . . . 12
4.1. Instance ID Creation . . . . . . . . . . . . . . . . . . . 11 4.1 Instance ID Creation . . . . . . . . . . . . . . . . . . . 12
4.2. Initial Registrations . . . . . . . . . . . . . . . . . . 13 4.2 Initial Registrations . . . . . . . . . . . . . . . . . . 13
4.2.1. Registration by Other Instances . . . . . . . . . . . 14 4.2.1 Registration by Other Instances . . . . . . . . . . . 14
4.3. Sending Requests . . . . . . . . . . . . . . . . . . . . . 14 4.3 Sending Requests . . . . . . . . . . . . . . . . . . . . . 15
4.4. Detecting Flow Failure . . . . . . . . . . . . . . . . . . 14 4.4 Detecting Flow Failure . . . . . . . . . . . . . . . . . . 15
4.4.1. Keepalive with STUN . . . . . . . . . . . . . . . . . 15 4.4.1 Keepalive with TCP KEEPALIVE . . . . . . . . . . . . . 16
4.4.2. Flow Recovery . . . . . . . . . . . . . . . . . . . . 15 4.4.2 Keepalive with STUN . . . . . . . . . . . . . . . . . 16
5. Edge Proxy Mechanisms . . . . . . . . . . . . . . . . . . . . 16 4.4.3 Flow Recovery . . . . . . . . . . . . . . . . . . . . 16
5.1. Processing Register Requests . . . . . . . . . . . . . . . 16 5. Edge Proxy Mechanisms . . . . . . . . . . . . . . . . . . . . 17
5.2. Generating Flow Tokens . . . . . . . . . . . . . . . . . . 16 5.1 Processing Register Requests . . . . . . . . . . . . . . . 17
5.3. Forwarding Requests . . . . . . . . . . . . . . . . . . . 17 5.2 Generating Flow Tokens . . . . . . . . . . . . . . . . . . 18
6. Registrar and Location Server Mechanisms . . . . . . . . . . . 18 5.3 Forwarding Requests . . . . . . . . . . . . . . . . . . . 18
6.1. Processing REGISTER Requests . . . . . . . . . . . . . . . 18 5.4 Edge Proxy Keepalive Handling . . . . . . . . . . . . . . 19
6.2. Forwarding Requests . . . . . . . . . . . . . . . . . . . 19 6. Registrar Mechanisms: Processing REGISTER Requests . . . . . . 20
7. Mechanisms for All Servers (Proxys, Registars, UASs) . . . . . 20 7. Authoritative Proxy Mechansims: Forwarding Requests . . . . . 21
7.1. STUN Processing . . . . . . . . . . . . . . . . . . . . . 20 8. STUN Keepalive Processing . . . . . . . . . . . . . . . . . . 22
8. Example Message Flow . . . . . . . . . . . . . . . . . . . . . 21 8.1 Explicit Probes . . . . . . . . . . . . . . . . . . . . . 24
9. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 8.2 Use with Sigcomp . . . . . . . . . . . . . . . . . . . . . 24
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 9. Example Message Flow . . . . . . . . . . . . . . . . . . . . . 25
10.1. Contact Header Field . . . . . . . . . . . . . . . . . . . 25 10. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . 28
10.2. SIP/SIPS URI Parameters . . . . . . . . . . . . . . . . . 25 11. Definition of 430 Flow Failed response code . . . . . . . . 29
10.3. SIP Option Tag . . . . . . . . . . . . . . . . . . . . . . 26 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . 29
10.4. Media Feature Tag . . . . . . . . . . . . . . . . . . . . 26 12.1 Contact Header Field . . . . . . . . . . . . . . . . . . . 29
11. Security Considerations . . . . . . . . . . . . . . . . . . . 27 12.2 SIP/SIPS URI Parameters . . . . . . . . . . . . . . . . . 30
12. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 28 12.3 SIP Option Tag . . . . . . . . . . . . . . . . . . . . . . 30
13. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 12.4 Response Code . . . . . . . . . . . . . . . . . . . . . . 30
13.1. Changes from 03 Version . . . . . . . . . . . . . . . . . 28 12.5 Media Feature Tag . . . . . . . . . . . . . . . . . . . . 30
13.2. Changes from 02 Version . . . . . . . . . . . . . . . . . 29 13. Security Considerations . . . . . . . . . . . . . . . . . . 31
13.3. Changes from 01 Version . . . . . . . . . . . . . . . . . 29 14. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 32
13.4. Changes from 00 Version . . . . . . . . . . . . . . . . . 29 15. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 32
14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 29 15.1 Changes from 04 Version . . . . . . . . . . . . . . . . . 32
Appendix A. Default Flow Registration Backoff Times . . . . . . . 30 15.2 Changes from 03 Version . . . . . . . . . . . . . . . . . 33
15. References . . . . . . . . . . . . . . . . . . . . . . . . . . 30 15.3 Changes from 02 Version . . . . . . . . . . . . . . . . . 34
15.1. Normative References . . . . . . . . . . . . . . . . . . . 30 15.4 Changes from 01 Version . . . . . . . . . . . . . . . . . 34
15.2. Informative References . . . . . . . . . . . . . . . . . . 31 15.5 Changes from 00 Version . . . . . . . . . . . . . . . . . 35
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 33 16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 35
Intellectual Property and Copyright Statements . . . . . . . . . . 34 A. Default Flow Registration Backoff Times . . . . . . . . . . . 35
17. References . . . . . . . . . . . . . . . . . . . . . . . . . 36
17.1 Normative References . . . . . . . . . . . . . . . . . . . 36
17.2 Informative References . . . . . . . . . . . . . . . . . . 37
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 38
Intellectual Property and Copyright Statements . . . . . . . . 39
1. Introduction 1. Introduction
There are many environments for SIP [RFC3261] deployments in which There are many environments for SIP [RFC3261] deployments in which
the User Agent (UA) can form a connection to a Registrar or Proxy but the User Agent (UA) can form a connection to a Registrar or Proxy but
in which connections in the reverse direction to the UA are not in which connections in the reverse direction to the UA are not
possible. This can happen for several reasons. Connections to the possible. This can happen for several reasons. Connections to the
UA can be blocked by a firewall device between the UA and the proxy UA can be blocked by a firewall device between the UA and the proxy
or registrar, which will only allow new connections in the direction or registrar, which will only allow new connections in the direction
of the UA to the Proxy. Similarly there may be a NAT, which are only of the UA to the Proxy. Similarly there may be a NAT, which are only
skipping to change at page 4, line 49 skipping to change at page 4, line 49
multiple flows to the proxy or registrar. This mechanism also uses a multiple flows to the proxy or registrar. This mechanism also uses a
keep alive mechanism over each flow so that the UA can detect when a keep alive mechanism over each flow so that the UA can detect when a
flow has failed. flow has failed.
2. Conventions and Terminology 2. Conventions and Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
2.1. Definitions 2.1 Definitions
Authoritative Proxy: A proxy that handles non-REGISTER requests for a
specific Address-of-Record (AOR), performs the logical Location
Server lookup described in RFC 3261, and forwards those requests
to specific Contact URIs.
Edge Proxy: An Edge Proxy is any proxy that is located topologically Edge Proxy: An Edge Proxy is any proxy that is located topologically
between the registering User Agent and the registrar. between the registering User Agent and the Authoritative Proxy.
Flow: A Flow is a network protocol layer (layer 4) association Flow: A Flow is a network protocol layer (layer 4) association
between two hosts that is represented by the network address and between two hosts that is represented by the network address and
port number of both ends and by the protocol. For TCP, a flow is port number of both ends and by the protocol. For TCP, a flow is
equivalent to a TCP connection. For UDP a flow is a bidirectional equivalent to a TCP connection. For UDP a flow is a bidirectional
stream of datagrams between a single pair of IP addresses and stream of datagrams between a single pair of IP addresses and
ports of both peers. With TCP, a flow often has a one to one ports of both peers. With TCP, a flow often has a one to one
correspondence with a single file descriptor in the operating correspondence with a single file descriptor in the operating
system. system.
reg-id: This refers to the value of a new header field parameter reg-id: This refers to the value of a new header field parameter
value for the Contact header field. When a UA registers multiple value for the Contact header field. When a UA registers multiple
times, each simultaneous registration gets a unique reg-id value. times, each simultaneous registration gets a unique reg-id value.
instance-id: This specification uses the word instance-id to refer to instance-id: This specification uses the word instance-id to refer to
the value of the "sip.instance" media feature tag in the Contact the value of the "sip.instance" media feature tag in the Contact
header field. This is a Uniform Resource Name (URN) that uniquely header field. This is a Uniform Resource Name (URN) that uniquely
identifies this specific UA instance. identifies this specific UA instance.
outbound-proxy-set A set of SIP URIs (Uniform Resource Identifiers) outbound-proxy-set A set of SIP URIs (Uniform Resource Identifiers)
that represents each of the outbound proxies (often Edge Proxies) that represents each of the outbound proxies (often Edge Proxies)
with which the UA will attempt to maintain a direct flow. The with which the UA will attempt to maintain a direct flow. The
first URI in the set is often refereed to as the primary outbound first URI in the set is often referred to as the primary outbound
proxy and the second as the secondary outbound proxy. There is no proxy and the second as the secondary outbound proxy. There is no
difference between any of the URIs in this set, nor does the difference between any of the URIs in this set, nor does the
primary/secondary terminology imply that one is preferred over the primary/secondary terminology imply that one is preferred over the
other. other.
3. Overview 3. Overview
Several scenarios in which this technique is useful are discussed Several scenarios in which this technique is useful are discussed
below, including the simple co-located registrar and proxy, a User below, including the simple co-located registrar and proxy, a User
Agent desiring multiple connections to a resource (for redundancy, Agent desiring multiple connections to a resource (for redundancy,
for example), and a system that uses Edge Proxies. for example), and a system that uses Edge Proxies.
3.1. Summary of Mechanism 3.1 Summary of Mechanism
The overall approach is fairly simple. Each UA has a unique The overall approach is fairly simple. Each UA has a unique
instance-id that stays the same for this UA even if the UA reboots or instance-id that stays the same for this UA even if the UA reboots or
is power cycled. Each UA can register multiple times over different is power cycled. Each UA can register multiple times over different
connections for the same SIP Address of Record (AOR) to achieve high connections for the same SIP Address of Record (AOR) to achieve high
reliability. Each registration includes the instance-id for the UA reliability. Each registration includes the instance-id for the UA
and a reg-id label that is different for each flow. The registrar and a reg-id label that is different for each flow. The registrar
can use the instance-id to recognize that two different registrations can use the instance-id to recognize that two different registrations
both reach the same UA. The registrar can use the reg-id label to both reach the same UA. The registrar can use the reg-id label to
recognize that a UA is registering after a reboot or a network recognize that a UA is registering after a reboot or a network
skipping to change at page 6, line 15 skipping to change at page 6, line 18
registration has been completed. A failure on a particular flow can registration has been completed. A failure on a particular flow can
be tried again on an alternate flow. Proxies can determine which be tried again on an alternate flow. Proxies can determine which
flows go to the same UA by comparing the instance-id. Proxies can flows go to the same UA by comparing the instance-id. Proxies can
tell that a flow replaces a previously abandoned flow by looking at tell that a flow replaces a previously abandoned flow by looking at
the reg-id. the reg-id.
UAs use the STUN (Simple Traversal of UDP through NATs) protocol as UAs use the STUN (Simple Traversal of UDP through NATs) protocol as
the keepalive mechanism to keep their flow to the proxy or registrar the keepalive mechanism to keep their flow to the proxy or registrar
alive. alive.
3.2. Single Registrar and UA 3.2 Single Registrar and UA
In the topology shown below, a single server is acting as both a In the topology shown below, a single server is acting as both a
registrar and proxy. registrar and proxy.
+-----------+ +-----------+
| Registrar | | Registrar |
| Proxy | | Proxy |
+-----+-----+ +-----+-----+
| |
| |
+----+--+ +----+--+
| User | | User |
| Agent | | Agent |
+-------+ +-------+
User Agents which form only a single flow continue to register User Agents which form only a single flow continue to register
normally but include the instance-id as described in Section 4.1. normally but include the instance-id as described in Section 4.1.
The UA can also include a reg-id parameter which is used to allow the The UA can also include a reg-id parameter which is used to allow the
registrar to detect and avoid using invalid contacts when a UA registrar to detect and avoid keeping invalid contacts when a UA
reboots or reconnects after its old connection has failed for some reboots or reconnects after its old connection has failed for some
reason. reason.
For clarity, here is an example. Bob's UA creates a new TCP flow to For clarity, here is an example. Bob's UA creates a new TCP flow to
the registrar and sends the following REGISTER request. the registrar and sends the following REGISTER request.
REGISTER sip:example.com SIP/2.0 REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/TCP 192.0.2.1;branch=z9hG4bK-bad0ce-11-1036 Via: SIP/2.0/TCP 192.0.2.1;branch=z9hG4bK-bad0ce-11-1036
Max-Forwards: 70 Max-Forwards: 70
From: Bob <sip:bob@example.com>;tag=d879h76 From: Bob <sip:bob@example.com>;tag=d879h76
skipping to change at page 7, line 4 skipping to change at page 7, line 16
Via: SIP/2.0/TCP 192.0.2.1;branch=z9hG4bK-bad0ce-11-1036 Via: SIP/2.0/TCP 192.0.2.1;branch=z9hG4bK-bad0ce-11-1036
Max-Forwards: 70 Max-Forwards: 70
From: Bob <sip:bob@example.com>;tag=d879h76 From: Bob <sip:bob@example.com>;tag=d879h76
To: Bob <sip:bob@example.com> To: Bob <sip:bob@example.com>
Call-ID: 8921348ju72je840.204 Call-ID: 8921348ju72je840.204
CSeq: 1 REGISTER CSeq: 1 REGISTER
Supported: path Supported: path
Contact: <sip:line1@192.168.0.2>; reg-id=1; Contact: <sip:line1@192.168.0.2>; reg-id=1;
;+sip.instance="<urn:uuid:00000000-0000-0000-0000-000A95A0E128>" ;+sip.instance="<urn:uuid:00000000-0000-0000-0000-000A95A0E128>"
Content-Length: 0 Content-Length: 0
The registrar challenges this registration to authenticate Bob. When The registrar challenges this registration to authenticate Bob. When
the registrar adds an entry for this contact under the AOR for Bob, the registrar adds an entry for this contact under the AOR for Bob,
the registrar also keeps track of the connection over which it the registrar also keeps track of the connection over which it
received this registration. received this registration.
The registrar saves the instance-id The registrar saves the instance-id
("urn:uuid:00000000-0000-0000-0000-000A95A0E128") and reg-id ("1") ("urn:uuid:00000000-0000-0000-0000-000A95A0E128") and reg-id ("1")
along with the rest of the Contact header field. If the instance-id along with the rest of the Contact header field. If the instance-id
and reg-id are the same as a previous registration for the same AOR, and reg-id are the same as a previous registration for the same AOR,
the proxy uses the most recently created registration first. This the registrar replaces the old Contact URI and flow information.
allows a UA that has rebooted to replace its previous registration This allows a UA that has rebooted to replace its previous
for each flow with minimal impact on overall system load. registration for each flow with minimal impact on overall system
load.
When Alice sends a request to Bob, his proxy selects the target set. When Alice sends a request to Bob, his authoritative proxy selects
The proxy forwards the request to elements in the target set based on the target set. The proxy forwards the request to elements in the
the proxy's policy. The proxy looks at the target set and uses the target set based on the proxy's policy. The proxy looks at the
instance-id to understand that two targets both end up routing to the target set and uses the instance-id to understand if two targets both
same UA. When the proxy goes to forward a request to a given target, end up routing to the same UA. When the proxy goes to forward a
it looks and finds the flows over which it received the registration. request to a given target, it looks and finds the flows over which it
The proxy then forwards the request on that flow instead of trying to received the registration. The proxy then forwards the request on
form a new flow to that contact. This allows the proxy to forward a that flow instead of trying to form a new flow to that contact. This
request to a particular contact over the same flow that the UA used allows the proxy to forward a request to a particular contact over
to register this AOR. If the proxy has multiple flows that all go to the same flow that the UA used to register this AOR. If the proxy
this UA, it can choose any one of registration bindings for this AOR has multiple flows that all go to this UA, it can choose any one of
that has the same instance-id as the selected UA. In general, if two registration bindings for this AOR that has the same instance-id as
registrations have the same reg-id and instance-id, the proxy uses the selected UA.
the most recently registered flow. This is so that if a UA reboots,
the proxy uses the most recent flow that goes to this UA instead of
trying one of the old flows which would presumably fail.
3.3. Multiple Connections from a User Agent 3.3 Multiple Connections from a User Agent
There are various ways to deploy SIP to build a reliable and scalable There are various ways to deploy SIP to build a reliable and scalable
system. This section discusses one such design that is possible with system. This section discusses one such design that is possible with
the mechanisms in this specification. Other designs are also the mechanisms in this specification. Other designs are also
possible. possible.
In the example system below, the logical outbound proxy/registrar for In the example system below, the logical outbound proxy/registrar for
the domain is running on two hosts that share the appropriate state the domain is running on two hosts that share the appropriate state
and can both provide registrar and outbound proxy functionality for and can both provide registrar and outbound proxy functionality for
the domain. The UA will form connections to two of the physical the domain. The UA will form connections to two of the physical
hosts that can perform the outbound proxy/registrar function for the hosts that can perform the outbound proxy/registrar function for the
domain. Reliability is achieved by having the UA form two TCP domain. Reliability is achieved by having the UA form two TCP
connections to the domain. connections to the domain.
Scalability is achieved by using DNS SRV to load balance the primary Scalability is achieved by using DNS SRV to load balance the primary
connection across a set of machines that can service the primary connection across a set of machines that can service the primary
connection and also using DNS SRV to load balance across a separate connection, and also using DNS SRV to load balance across a separate
set of machines that can service the secondary connection. The set of machines that can service the secondary connection. The
deployment here requires that DNS is configured with one entry that deployment here requires that DNS is configured with one entry that
resolves to all the primary hosts and another entry that resolves to resolves to all the primary hosts and another entry that resolves to
all the secondary hosts. While this introduces additional DNS all the secondary hosts. While this introduces additional DNS
configuration, the approach works and requires no addition SIP configuration, the approach works and requires no addition SIP
extensions. extensions.
Note: Approaches which select multiple connections from a single Note: Approaches which select multiple connections from a single
DNS SRV set were also considered, but cannot prevent two DNS SRV set were also considered, but cannot prevent two
connections from accidentally resolving to the same host. The connections from accidentally resolving to the same host. The
skipping to change at page 9, line 13 skipping to change at page 9, line 23
The domain also needs to ensure that a request for the UA sent to The domain also needs to ensure that a request for the UA sent to
host1 or host2 is then sent across the appropriate flow to the UA. host1 or host2 is then sent across the appropriate flow to the UA.
The domain might choose to use the Path header approach (as described The domain might choose to use the Path header approach (as described
in the next section) to store this internal routing information on in the next section) to store this internal routing information on
host1 or host2. host1 or host2.
When a single server fails, all the UAs that have a flow through it When a single server fails, all the UAs that have a flow through it
will detect a flow failure and try to reconnect. This can cause will detect a flow failure and try to reconnect. This can cause
large loads on the server. When large numbers of hosts reconnect large loads on the server. When large numbers of hosts reconnect
nearly simultaneously, this is referred to as the avalanche restart nearly simultaneously, this is referred to as the avalanche restart
problem, and is further discussed in Section 4.4.2. The multiple problem, and is further discussed in Section 4.4.3. The multiple
flows to many servers help reduce the load caused by the avalanche flows to many servers help reduce the load caused by the avalanche
restart. If a UA has multiple flows, and one of the servers fails, restart. If a UA has multiple flows, and one of the servers fails,
the UA delays the specified time before trying to form a new the UA delays the specified time before trying to form a new
connection to replace the flow to the server that failed. By connection to replace the flow to the server that failed. By
spreading out the time used for all the UAs to reconnect to a server, spreading out the time used for all the UAs to reconnect to a server,
the load on the server farm is reduced. the load on the server farm is reduced.
When used in this fashion to achieve high reliability, the operator When used in this fashion to achieve high reliability, the operator
will need to configure DNS such that the various URIs in the outbound will need to configure DNS such that the various URIs in the outbound
proxy set do not resolve to the same host. proxy set do not resolve to the same host.
3.4. Edge Proxies 3.4 Edge Proxies
Some SIP deployments use edge proxies such that the UA sends the Some SIP deployments use edge proxies such that the UA sends the
REGISTER to an Edge Proxy that then forwards the REGISTER to the REGISTER to an Edge Proxy that then forwards the REGISTER to the
Registrar. The Edge Proxy includes a Path header [RFC3327] so that Registrar. The Edge Proxy includes a Path header [RFC3327] so that
when the registrar later forwards a request to this UA, the request when the registrar later forwards a request to this UA, the request
is routed through the Edge Proxy. There could be a NAT or firewall is routed through the Edge Proxy. There could be a NAT or firewall
between the UA and the Edge Proxy. between the UA and the Edge Proxy.
+---------+ +---------+
|Registrar| |Registrar|
|Proxy | |Proxy |
+---------+ +---------+
/ \ / \
/ \ / \
/ \ / \
+-----+ +-----+ +-----+ +-----+
|Edge1| |Edge2| |Edge1| |Edge2|
+-----+ +-----+ +-----+ +-----+
skipping to change at page 10, line 24 skipping to change at page 10, line 45
SHOULD be placed in the user portion of a loose route in the Path SHOULD be placed in the user portion of a loose route in the Path
header. If the registration succeeds, the Edge Proxy needs to map header. If the registration succeeds, the Edge Proxy needs to map
future requests that are routed to the identifier value from the Path future requests that are routed to the identifier value from the Path
header, to the associated flow. header, to the associated flow.
The term Edge Proxy is often used to refer to deployments where the The term Edge Proxy is often used to refer to deployments where the
Edge Proxy is in the same administrative domain as the Registrar. Edge Proxy is in the same administrative domain as the Registrar.
However, in this specification we use the term to refer to any proxy However, in this specification we use the term to refer to any proxy
between the UA and the Registrar. For example the Edge Proxy may be between the UA and the Registrar. For example the Edge Proxy may be
inside an enterprise that requires its use and the registrar could be inside an enterprise that requires its use and the registrar could be
a service provider with no relationship to the enterprise. from a service provider with no relationship to the enterprise.
Regardless if they are in the same administrative domain, this Regardless if they are in the same administrative domain, this
specification requires that Registrars and Edge proxies support the specification requires that Registrars and Edge proxies support the
Path header mechanism in RFC 3327 [RFC3327]. Path header mechanism in RFC 3327 [RFC3327].
3.5. Keepalive Technique 3.5 Keepalive Technique
A keepalive mechanism needs to detect failure of a connection and A keepalive mechanism needs to detect failure of a connection and
changes to the NAT public mapping, as well as keeping any NAT changes to the NAT public mapping, as well as keeping any NAT
bindings refreshed. This specification describes using STUN bindings refreshed. This specification describes using STUN
[I-D.ietf-behave-rfc3489bis] over the same flow as the SIP traffic to [I-D.ietf-behave-rfc3489bis] over the same flow as the SIP traffic to
perform the keepalive. For connection-oriented transports (e.g. TCP perform the keepalive. For connection-oriented transports (e.g. TCP
and TLS over TCP), the UAC MAY use TCP keepalives to detect flow and TLS over TCP), the UAC MAY use TCP keepalives to detect flow
failure if the UAC can send these keepalives and detect a keepalive failure if the UAC can send these keepalives and detect a keepalive
failure according to the time frames described in Section 4.4. failure according to the time frames described in Section 4.4.
skipping to change at page 11, line 34 skipping to change at page 12, line 7
consensus that the STUN approach was a better solution that these consensus that the STUN approach was a better solution that these
alternative designs. alternative designs.
When the UA detects that a flow has failed or that the flow When the UA detects that a flow has failed or that the flow
definition has changed, the UA needs to re-register and will use the definition has changed, the UA needs to re-register and will use the
back-off mechanism described in Section 4 to provide congestion back-off mechanism described in Section 4 to provide congestion
relief when a large number of agents simultaneously reboot. relief when a large number of agents simultaneously reboot.
4. User Agent Mechanisms 4. User Agent Mechanisms
4.1. Instance ID Creation 4.1 Instance ID Creation
Each UA MUST have an Instance Identifier URN that uniquely identifies Each UA MUST have an Instance Identifier URN that uniquely identifies
the device. Usage of a URN provides a persistent and unique name for the device. Usage of a URN provides a persistent and unique name for
the UA instance. It also provides an easy way to guarantee the UA instance. It also provides an easy way to guarantee
uniqueness within the AOR. This URN MUST be persistent across power uniqueness within the AOR. This URN MUST be persistent across power
cycles of the device. The Instance ID MUST NOT change as the device cycles of the device. The Instance ID MUST NOT change as the device
moves from one network to another. moves from one network to another.
A UA SHOULD use a UUID URN [RFC4122]. The UUID URN allows for non- A UA SHOULD use a UUID URN [RFC4122]. The UUID URN allows for non-
centralized computation of a URN based on time, unique names (such as centralized computation of a URN based on time, unique names (such as
skipping to change at page 13, line 7 skipping to change at page 13, line 30
2141 [RFC2141]. Lexical equality may result in two URNs being 2141 [RFC2141]. Lexical equality may result in two URNs being
considered unequal when they are actually equal. In this specific considered unequal when they are actually equal. In this specific
usage of URNs, the only element which provides the URN is the SIP usage of URNs, the only element which provides the URN is the SIP
UA instance identified by that URN. As a result, the UA instance UA instance identified by that URN. As a result, the UA instance
SHOULD provide lexically equivalent URNs in each registration it SHOULD provide lexically equivalent URNs in each registration it
generates. This is likely to be normal behavior in any case; generates. This is likely to be normal behavior in any case;
clients are not likely to modify the value of the instance ID so clients are not likely to modify the value of the instance ID so
that it remains functionally equivalent yet lexigraphically that it remains functionally equivalent yet lexigraphically
different from previous registrations. different from previous registrations.
4.2. Initial Registrations 4.2 Initial Registrations
UAs obtain at configuration time one or more SIP URIs representing UAs obtain at configuration time one or more SIP URIs representing
the default outbound-proxy-set. This specification assumes the set the default outbound-proxy-set. This specification assumes the set
is determined via any of a number of configuration mechanisms and is determined via any of a number of configuration mechanisms, and
future specifications may define additional mechanisms such as using future specifications may define additional mechanisms such as using
DNS to discover this set. How the UA is configured is outside the DNS to discover this set. How the UA is configured is outside the
scope of this specification. However, a UA MUST support sets with at scope of this specification. However, a UA MUST support sets with at
least two outbound proxy URIs and SHOULD support sets with up to four least two outbound proxy URIs and SHOULD support sets with up to four
URIs. For each outbound proxy URI in the set, the UA MUST send a URIs. For each outbound proxy URI in the set, the UA SHOULD send a
REGISTER in the normal way using this URI as the default outbound REGISTER in the normal way using this URI as the default outbound
proxy. Forming the route set for the request is outside the scope of proxy. Forming the route set for the request is outside the scope of
this document, but typically results in sending the REGISTER such this document, but typically results in sending the REGISTER such
that the topmost Route header field contains a loose route to the that the topmost Route header field contains a loose route to the
outbound proxy URI. Other issues related to outbound route outbound proxy URI. Other issues related to outbound route
construction are discussed in [I-D.rosenberg-sip-route-construct]. construction are discussed in [I-D.rosenberg-sip-route-construct].
Registration requests, other than those described in Section 4.2.1, Registration requests, other than those described in Section 4.2.1,
MUST include an instance-id media feature tag as specified in MUST include an instance-id media feature tag as specified in
Section 4.1. Section 4.1.
These ordinary registration requests MUST also add a distinct reg-id These ordinary registration requests MUST also add a distinct reg-id
parameter to the Contact header field. Each one of these parameter to the Contact header field. Each one of these
registrations will form a new flow from the UA to the proxy. The registrations will form a new flow from the UA to the proxy. The
reg-id sequence does not have to be sequential but MUST be exactly reg-id sequence does not have to be sequential but MUST be exactly
the same reg-id sequence each time the device power cycles or reboots the same reg-id sequence each time the device power cycles or reboots
so that the reg-id values will collide with the previously used so that the reg-id values will collide with the previously used
reg-id values. This is so the proxy can realize that the older reg-id values. This is so the registrar can replace the older
registrations are probably not useful. registration.
The UAC MUST indicate that it supports the Path header [RFC3327] The UAC MUST indicate that it supports the Path header [RFC3327]
mechanism, by including the 'path' option-tag in a Supported header mechanism, by including the 'path' option-tag in a Supported header
field value in its REGISTER requests. Other than optionally field value in its REGISTER requests. Other than optionally
examining the Path vector in the response, this is all that is examining the Path vector in the response, this is all that is
required of the UAC to support Path. required of the UAC to support Path.
The UAC MAY examine successful registrations for the presence of an The UAC MAY examine successful registrations for the presence of an
'outbound' option-tag in a Supported header field value. Presence of 'outbound' option-tag in a Supported header field value. Presence of
this option-tag indicates that the registrar is compliant with this this option-tag indicates that the registrar is compliant with this
specification. specification, and that any edge proxies which need to partcipate are
also compliant.
Note that the UA needs to honor 503 responses to registrations as Note that the UA needs to honor 503 responses to registrations as
described in RFC 3261 and RFC 3263 [RFC3263]. In particular, described in RFC 3261 and RFC 3263 [RFC3263]. In particular,
implementors should note that when receiving a 503 response with a implementors should note that when receiving a 503 response with a
Retry-After header field, the UA should wait the indicated amount of Retry-After header field, the UA should wait the indicated amount of
time and retry the registration. A Retry-After header field value of time and retry the registration. A Retry-After header field value of
0 is valid and indicates the UA should retry the REGISTER 0 is valid and indicates the UA should retry the REGISTER
immediately. Implementations need to ensure that when retrying the immediately. Implementations need to ensure that when retrying the
REGISTER they revisit the DNS resolution results such that the UA can REGISTER, they revisit the DNS resolution results such that the UA
select an alternate host from the one chosen the previous time the can select an alternate host from the one chosen the previous time
URI was resolved. the URI was resolved.
4.2.1. Registration by Other Instances Finally, re-registrations which merely refresh an existing valid
registration SHOULD be sent over the same flow as the original
registration.
4.2.1 Registration by Other Instances
A User Agent MUST NOT include a reg-id header parameter in the A User Agent MUST NOT include a reg-id header parameter in the
Contact header field of a registration if the registering UA is not Contact header field of a registration if the registering UA is not
the same instance as the UA referred to by the target Contact header the same instance as the UA referred to by the target Contact header
field. (This practice is occasionally used to install forwarding field. (This practice is occasionally used to install forwarding
policy into registrars.) policy into registrars.)
Note that a UAC also MUST NOT include an instance-id or reg-id Note that a UAC also MUST NOT include an instance-id or reg-id
parameter in a request to unregister all Contacts (a single Contact parameter in a request to unregister all Contacts (a single Contact
header field value with the value of "*"). header field value with the value of "*").
4.3. Sending Requests 4.3 Sending Requests
When a UA is about to send a request, it first performs normal When a UA is about to send a request, it first performs normal
processing to select the next hop URI. The UA can use a variety of processing to select the next hop URI. The UA can use a variety of
techniques to compute the route set and accordingly the next hop URI. techniques to compute the route set and accordingly the next hop URI.
Discussion of these techniques is outside the scope of this document Discussion of these techniques is outside the scope of this document
but could include mechanisms specified in RFC 3608 [RFC3608] (Service but could include mechanisms specified in RFC 3608 [RFC3608] (Service
Route) and [I-D.rosenberg-sip-route-construct]. Route) and [I-D.rosenberg-sip-route-construct].
The UA performs normal DNS resolution on the next hop URI (as The UA performs normal DNS resolution on the next hop URI (as
described in RFC 3263 [RFC3263]) to find a protocol, IP address, and described in RFC 3263 [RFC3263]) to find a protocol, IP address, and
port. For non-TLS protocols, if the UA has an existing flow to this port. For non-TLS protocols, if the UA has an existing flow to this
IP address, and port with the correct protocol, then the UA MUST use IP address, and port with the correct protocol, then the UA MUST use
the existing connection. For TLS protocols, there must also be a the existing connection. For TLS protocols, there must also be a
match between the host production in the next hop and one of the URIs match between the host production in the next hop and one of the URIs
contained in the subjectAltName in the peer certificate. If the UA contained in the subjectAltName in the peer certificate. If the UA
cannot use one of the existing flows, then it SHOULD form a new flow cannot use one of the existing flows, then it SHOULD form a new flow
by sending a datagram or opening a new connection to the next hop, as by sending a datagram or opening a new connection to the next hop, as
appropriate for the transport protocol. appropriate for the transport protocol.
4.4. Detecting Flow Failure 4.4 Detecting Flow Failure
The UA needs to detect when a specific flow fails. The UA actively The UA needs to detect when a specific flow fails. The UA actively
tries to detect failure by periodically sending keepalive messages tries to detect failure by periodically sending keepalive messages
using one of the techniques described in this section. If a flow has using one of the techniques described in this section. If a flow has
failed, the UA follows the procedures in Section 4.2 to form a new failed, the UA follows the procedures in Section 4.2 to form a new
flow to replace the failed one. flow to replace the failed one.
The time between keepalive requests when using UDP-based transports The time between keepalive requests when using UDP-based transports
SHOULD be a random number between 24 and 29 seconds while for TCP- SHOULD be a random number between 24 and 29 seconds while for TCP-
based transports it SHOULD be a random number between 95 and 120 based transports it SHOULD be a random number between 95 and 120
skipping to change at page 15, line 24 skipping to change at page 16, line 5
to evenly spread the load on the servers. For TCP, the 120 to evenly spread the load on the servers. For TCP, the 120
seconds upper bound was chosen based on the idea that for a good seconds upper bound was chosen based on the idea that for a good
user experience, failures should be detected in this amount of user experience, failures should be detected in this amount of
time and a new connection set up. Operators that wish to change time and a new connection set up. Operators that wish to change
the relationship between load on servers and the expected time the relationship between load on servers and the expected time
that a user may not receive inbound communications will probably that a user may not receive inbound communications will probably
adjust this time. The 95 seconds lower bound was chosen so that adjust this time. The 95 seconds lower bound was chosen so that
the jitter introduced will result in a relatively even load on the the jitter introduced will result in a relatively even load on the
servers after 30 minutes. servers after 30 minutes.
4.4.1. Keepalive with STUN 4.4.1 Keepalive with TCP KEEPALIVE
User Agents that form flows MUST check if the configured URI they are User Agents that are capable of generating per-connection TCP
connecting to has a 'keepalive' URI parameter (defined in Section 10) keepalives with timer values consistent with those in this section
with the value of 'stun'. If the parameter is present, the UA needs MAY use TCP keepalives instead of using STUN keepalives for TCP-based
to periodically perform keepalive checks by sending a STUN [I-D.ietf- flows.
behave-rfc3489bis] Binding Requests over the flow.
4.4.2 Keepalive with STUN
User Agents that form flows, check if the configured URI they are
connecting to has a 'keepalive' URI parameter (defined in Section 12)
with the value of 'stun'. If the parameter is present and the UA is
not already performing keepalives using another supported mechanism,
the UA needs to periodically perform keepalive checks by sending STUN
[I-D.ietf-behave-rfc3489bis] Binding Requests over the flow as
described in Section 8.
If the XOR-MAPPED-ADDRESS in the STUN Binding Response changes, the If the XOR-MAPPED-ADDRESS in the STUN Binding Response changes, the
UA MUST treat this event as a failure on the flow. UA MUST treat this event as a failure on the flow.
4.4.2. Flow Recovery 4.4.3 Flow Recovery
When a flow to a particular URI in the outbound-proxy-set fails, the When a flow to a particular URI in the outbound-proxy-set fails, the
UA needs to form a new flow to replace the old flow and replace any UA needs to form a new flow to replace the old flow and replace any
registrations that were previously sent over this flow. Each new registrations that were previously sent over this flow. Each new
registration MUST have the same reg-id as the registration it registration MUST have the same reg-id as the registration it
replaces. This is done in much the same way as forming a brand new replaces. This is done in much the same way as forming a brand new
flow as described in Section 4.2; however, if there is a failure in flow as described in Section 4.2; however, if there is a failure in
forming this flow, the UA needs to wait a certain amount of time forming this flow, the UA needs to wait a certain amount of time
before retrying to form a flow to this particular next hop. before retrying to form a flow to this particular next hop.
The time to wait is computed in the following way. If all of the The amount of time to wait depends if the previous attempt at
flows to every URI in the outbound proxy set have failed, the base establishing a flow was successful. For the purposes of this
time is set to 30 seconds; otherwise, in the case where at least one section, a flow is considered successful if outbound registration
of the flows has not failed, the base time is set to 90 seconds. The succeeded and keepalives have not timed out for min-regtime seconds
wait time is computed by taking two raised to the power of the number (default of 120 seconds) after a registration. For STUN-based
of consecutive registration failures for that URI, and multiplying keepalives, this means three successful STUN transactions over UDP or
this by the base time, up to a maximum of 1800 seconds. one successful STUN transaction over TCP. If a flow is established
and is alive after this amount of time, the number of consecutive
registration failures is set to zero. Each time a flow fails before
two minutes, the number of consecutive registration failures is
incremented by one. Note that a failure during the initial STUN
validation does not count against the number of consecutive
registration failures.
The number of seconds to wait is computed in the following way. If
all of the flows to every URI in the outbound proxy set have failed,
the base time is set to 30 seconds; otherwise, in the case where at
least one of the flows has not failed, the base time is set to 90
seconds. The wait time is computed by taking two raised to the power
of the number of consecutive registration failures for that URI, and
multiplying this by the base time, up to a maximum of 1800 seconds.
wait-time = min( max-time, (base-time * (2 ^ consecutive-failures))) wait-time = min( max-time, (base-time * (2 ^ consecutive-failures)))
These three times MAY be configurable in the UA. The three times These times MAY be configurable in the UA. The four times are:
are:
o max-time with a default of 1800 seconds o max-time with a default of 1800 seconds
o base-time-all-fail with a default of 30 seconds o base-time-all-fail with a default of 30 seconds
o base-time-not-failed with a default of 90 seconds o base-time-not-failed with a default of 90 seconds
For example, if the base time was 30 seconds, and there had been o min-regtime with a default of 120 seconds
three failures, then the wait time would be min(1800,30*(2^3)) or 240 For example, if the base time is 30 seconds, and there were three
seconds. The delay time is computed by selecting a uniform random failures, then the wait time is min(1800,30*(2^3)) or 240 seconds.
time between 50 and 100 percent of the wait time. The UA MUST wait The delay time is computed by selecting a uniform random time between
for the value of the delay time before trying another registration to 50 and 100 percent of the wait time. The UA MUST wait for the value
form a new flow for that URI. of the delay time before trying another registration to form a new
flow for that URI.
To be explicitly clear on the boundary conditions: when the UA boots To be explicitly clear on the boundary conditions: when the UA boots
it immediately tries to register. If this fails and no registration it immediately tries to register. If this fails and no registration
on other flows succeed, the first retry happens somewhere between 30 on other flows succeed, the first retry happens somewhere between 30
and 60 seconds after the failure of the first registration request. and 60 seconds after the failure of the first registration request.
If the number of consecutive-failures is large enough that the If the number of consecutive-failures is large enough that the
maximum of 1800 seconds is reached, the UA will keep trying forever maximum of 1800 seconds is reached, the UA will keep trying
with a random time between 900 and 1800 seconds between the attempts. indefinitely with a random time of 15 to 30 minutes (900 to 1800
seconds) between each attempt.
5. Edge Proxy Mechanisms 5. Edge Proxy Mechanisms
5.1. Processing Register Requests 5.1 Processing Register Requests
When an Edge Proxy receives a registration request with a reg-id When an Edge Proxy receives a registration request with a reg-id
header parameter in the Contact header field, it MUST form a flow header parameter in the Contact header field, it typically needs to
identifier token that is unique to this network flow. The Edge Proxy store a "flow token", containing information about the flow from the
MUST insert this token into a URI referring to this proxy and place previous hop, in a Path header field value as described in RFC 3327
this URI into a Path header field as described in RFC 3327 [RFC3327]. [RFC3327]. The token MAY be placed in the userpart of the URI. If
The token MAY be placed in the userpart of the URI. the edge proxy is the first SIP node after the UAC, it either MUST
store a flow token in a Path header, or reject the request. In
addition, the first node MUST include an 'ob' URI parameter in its
Path header field value.
5.2. Generating Flow Tokens Each subsequent edge proxy examines the first Path header field
value. If this URI does not contain an 'ob' parameter, the edge
proxy MUST ignore the reg-id parameter and MUST NOT include an 'ob'
parameter if it adds a Path header field value. If the first Path
header field value contains an 'ob' parameter, this indicates that
the first edge proxy performed outbound processing. In this case the
edge proxy MUST store a flow token in a Path header, unless it has
positive knowledge that the URI in previous Path header is reachable
from any node on the public Internet, and that the next hop SIP node
can reach any node on the public Internet. This insures that there
is a reachable path from the authoritative proxy back to the User
Agent. Regardless if the proxy includes a flow token, if it adds a
Path header field value, it MUST include the 'ob' parameter in its
Path URI.
5.2 Generating Flow Tokens
A trivial but impractical way to satisfy the flow token requirement A trivial but impractical way to satisfy the flow token requirement
in Section 5.1 involves storing a mapping between an incrementing in Section 5.1 involves storing a mapping between an incrementing
counter and the connection information; however this would require counter and the connection information; however this would require
the Edge Proxy to keep an impractical amount of state. It is unclear the Edge Proxy to keep an impractical amount of state. It is unclear
when this state could be removed and the approach would have problems when this state could be removed and the approach would have problems
if the proxy crashed and lost the value of the counter. Two if the proxy crashed and lost the value of the counter. Two
stateless examples are provided below. A proxy can use any algorithm stateless examples are provided below. A proxy can use any algorithm
it wants as long as the flow token is unique to a flow, the flow can it wants as long as the flow token is unique to a flow, the flow can
be recovered from the token, and the token can not be modified by be recovered from the token, and the token can not be modified by
skipping to change at page 17, line 27 skipping to change at page 18, line 48
key called K that only the Edge Proxy knows. A byte array, called key called K that only the Edge Proxy knows. A byte array, called
S, is formed that contains the following information about the S, is formed that contains the following information about the
flow the request was received on: an enumeration indicating the flow the request was received on: an enumeration indicating the
protocol, the local IP address and port, the remote IP address and protocol, the local IP address and port, the remote IP address and
port. The HMAC of S is computed using the key K and the HMAC- port. The HMAC of S is computed using the key K and the HMAC-
SHA1-80 algorithm, as defined in [RFC2104]. The concatenation of SHA1-80 algorithm, as defined in [RFC2104]. The concatenation of
the HMAC and S are base64 encoded, as defined in [RFC3548], and the HMAC and S are base64 encoded, as defined in [RFC3548], and
used as the flow identifier. When using IPv4 addresses, this will used as the flow identifier. When using IPv4 addresses, this will
result in a 32-octet identifier. result in a 32-octet identifier.
5.3. Forwarding Requests 5.3 Forwarding Requests
When the Edge Proxy receives a request, it applies normal routing When an Edge Proxy receives a request, it applies normal routing
procedures with the following addition. If the Edge Proxy receives a procedures with the following addition. If the Edge Proxy receives a
request over a flow already represented in a flow token in the top- request where the edge proxy is the host in the topmost Route header
most Route header field value, the Edge Proxy pops the Route header field value, and the Route header contains a flow token, the proxy
and continues processing the request. Otherwise, if the top-most compares the flow in the flow token with the source of the request.
Route header refers to the Edge Proxy and contains a valid flow If these refer to the same flow, the Edge Proxy removes the Route
identifier token created by this proxy, the proxy MUST forward the header and continues processing the request. Otherwise, if the top-
request over the flow that received the REGISTER request that caused most Route header refers to the Edge Proxy and contains a valid flow
the flow identifier token to be created. For connection-oriented identifier token created by this proxy, the proxy MUST remove the the
transports, if the flow no longer exists the proxy SHOULD send a 410 Route header and forward the request over the flow that received the
response to the request. REGISTER request that caused the flow identifier token to be created.
For connection-oriented transports, if the flow no longer exists the
proxy SHOULD send a 430 Flow Failed response to the request.
The advantage to a stateless approach to managing the flow The advantage to a stateless approach to managing the flow
information is that there is no state on the Edge Proxy that information is that there is no state on the Edge Proxy that
requires clean up or that has to be synchronized with the requires clean up or that has to be synchronized with the
registrar. registrar.
Proxies which used one of the two algorithms described in this Proxies which used one of the two algorithms described in this
document to form a flow token follow the procedures below to document to form a flow token follow the procedures below to
determine the correct flow. determine the correct flow.
skipping to change at page 18, line 19 skipping to change at page 19, line 39
the proxy forwards the request over that connection. For a UDP- the proxy forwards the request over that connection. For a UDP-
based transport, the proxy forwards the request from the encoded based transport, the proxy forwards the request from the encoded
file descriptor to the source IP address and port. file descriptor to the source IP address and port.
Algorithm 2: To decode the flow token, take the flow identifier in Algorithm 2: To decode the flow token, take the flow identifier in
the user portion of the URI and base64 decode it, then verify the the user portion of the URI and base64 decode it, then verify the
HMAC is correct by recomputing the HMAC and checking it matches. HMAC is correct by recomputing the HMAC and checking it matches.
If the HMAC is not correct, the proxy SHOULD send a 403 response. If the HMAC is not correct, the proxy SHOULD send a 403 response.
If the HMAC is correct then the proxy SHOULD forward the request If the HMAC is correct then the proxy SHOULD forward the request
on the flow that was specified by the information in the flow on the flow that was specified by the information in the flow
identifier. If this flow no longer exists, the proxy SHOULD send identifier. If this flow no longer exists, the proxy SHOULD send
a 410 response to the request. a 430 Flow Failed response to the request.
Note that this specification needs mid-dialog requests to be routed Note that this specification needs mid-dialog requests to be routed
over the same flow but techniques to ensure that mid-dialog requests over the same flows as those stored in the Path vector from the
are routed over an existing flow are not part of this specification. initial registration, but techniques to ensure that mid-dialog
However, an approach such as having the Edge Proxy Record-Route with requests are routed over an existing flow are not part of this
a flow token is one way to ensure that mid-dialog requests are routed specification. However, an approach such as having the Edge Proxy
over the correct flow. Record-Route with a flow token is one way to ensure that mid-dialog
requests are routed over the correct flow.
6. Registrar and Location Server Mechanisms 5.4 Edge Proxy Keepalive Handling
6.1. Processing REGISTER Requests All edge proxies compliant with this specification MUST implement
support for the STUN NAT Keepalive usage on its SIP ports as
described in Section 8.
6. Registrar Mechanisms: Processing REGISTER Requests
This specification updates the definition of a binding in RFC 3261 This specification updates the definition of a binding in RFC 3261
[RFC3261] Section 10 and RFC 3327 [RFC3327] Section 5.3. [RFC3261] Section 10 and RFC 3327 [RFC3327] Section 5.3.
When no reg-id header parameter is present in a Contact header field When no +sip.instance media feature parameter is present in a Contact
value in a REGISTER request, the corresponding binding is still header field value in a REGISTER request, the corresponding binding
between an AOR and the URI from that Contact header field value. is still between an AOR and the URI from that Contact header field
When a reg-id header parameter is present in a Contact header field value. When a +sip.instance media feature parameter is present in a
value in a REGISTER request, the corresponding binding is between an Contact header field value in a REGISTER request, the corresponding
AOR and the combination of instance-id and reg-id. For a binding binding is between an AOR and the combination of the instance-id
with an instance-id, the registrar still stores the Contact header (from the +sip.instance media feature parameter) and the value of
field value URI with the binding, but does not consider the Contact reg-id parameter if it is present. For a binding with an
URI for comparison purposes. The registrar MUST be prepared to instance-id, the registrar still stores the Contact header field
receive, simultaneously for the same AOR, some registrations that use value URI with the binding, but does not consider the Contact URI for
comparison purposes. A Contact header field value with an
instance-id but no reg-id is valid, but one with a reg-id but no
instance-id is not. If the registrar processes a Contact header
field value with a reg-id but no instance-id, it simply ignores the
reg-id parameter. The registrar MUST be prepared to receive,
simultaneously for the same AOR, some registrations that use
instance-id and reg-id and some registrations that do not. instance-id and reg-id and some registrations that do not.
Registrars which implement this specification MUST support the Path Registrars which implement this specification MUST support the Path
header mechanism [RFC3327]. header mechanism [RFC3327].
In addition to the normal information stored in the binding record, In addition to the normal information stored in the binding record,
some additional information MUST be stored for any registration that some additional information needs to be stored for any registration
contains a reg-id header parameter in the Contact header field value. that contains a reg-id header parameter in the Contact header field
The registrar MUST store enough information to uniquely identify the value. First the registrar examines all Path header field values, if
network flow over which the request arrived. For common operating any. If any of these does not have an 'ob' URI parameter, the
systems with TCP, this would typically just be the file descriptor. registrar MUST ignore the reg-id parameter and continue processing
For common operating systems with UDP this would typically be the the request as if it did not support this specification. Likewise if
file descriptor for the local socket that received the request, the the REGISTER request visited an edge proxy, but no Path header field
local interface, and the IP address and port number of the remote values are present, the registrar MUST ignore the reg-id parameter.
side that sent the request. Specifically, the registrar MUST use RFC 3261 Contact binding rules,
and MUST NOT include the 'outbound' option-tag in its Supported
header field.
If the UAC has a direct flow with the registrar, the registrar MUST
store enough information to uniquely identify the network flow over
which the request arrived. For common operating systems with TCP,
this would typically just be the file descriptor and the time the
file descriptor was opened. For common operating systems with UDP
this would typically be the file descriptor for the local socket that
received the request, the local interface, and the IP address and
port number of the remote side that sent the request.
In addition, unless the registrar has positive knowledge that the
topmost Path header URI is reachable from the authoritative proxy, it
must store the flow information for the previous hop. The registrar
MAY store this information by adding itself to the Path header field
with an appropriate flow token.
The registrar MUST also store all the Contact header field The registrar MUST also store all the Contact header field
information including the reg-id and instance-id parameters and information including the reg-id and instance-id parameters and
SHOULD also store the time at which the binding was last updated. If SHOULD also store the time at which the binding was last updated. If
a Path header field is present, RFC 3327 [RFC3327] requires the a Path header field is present, RFC 3327 [RFC3327] requires the
registrar to store this information as well. If the registrar registrar to store this information as well. If the registrar
receives a re-registration, it MUST update the information that receives a re-registration, it MUST update any information that
uniquely identifies the network flow over which the request arrived uniquely identifies the network flow over which the request arrived
and SHOULD update the time the binding was last updated. if that information has changed, and SHOULD update the time the
binding was last updated.
The Registrar MUST include the 'outbound' option-tag (defined in The Registrar MUST include the 'outbound' option-tag (defined in
Section (Section 10.1)) in a Supported header field value in its Section (Section 12.1)) in a Supported header field value in its
responses to REGISTER requests. The Registrar MAY be configured with responses to REGISTER requests for which it has performed outbound
local policy to reject any registrations that do not include the processing. The Registrar MAY be configured with local policy to
instance-id and reg-id. Note that the requirements in this section reject any registrations that do not include the instance-id and
applies to both REGISTER requests received from an Edge Proxy as well reg-id. Note that the requirements in this section applies to both
as requests received directly from the UAC. REGISTER requests received from an Edge Proxy as well as requests
received directly from the UAC.
6.2. Forwarding Requests To be compliant with this specification, registrars which can receive
SIP requests directly from a UAC without intervening edge proxies
MUST implement support the STUN NAT Keepalive usage on its SIP ports
as described in Section 8.
7. Authoritative Proxy Mechansims: Forwarding Requests
When a proxy uses the location service to look up a registration When a proxy uses the location service to look up a registration
binding and then proxies a request to a particular contact, it binding and then proxies a request to a particular contact, it
selects a contact to use normally, with a few additional rules: selects a contact to use normally, with a few additional rules:
o The proxy MUST NOT populate the target set with more than one o The proxy MUST NOT populate the target set with more than one
contact with the same AOR and instance-id at a time. If a request contact with the same AOR and instance-id at a time. If a request
for a particular AOR and instance-id fails with a 410 response, for a particular AOR and instance-id fails with a 430 Flow Failed
the proxy SHOULD replace the failed branch with another target (if response, the proxy SHOULD replace the failed branch with another
one is available) with the same AOR and instance-id, but a target (if one is available) with the same AOR and instance-id,
different reg-id. but a different reg-id.
o If two bindings have the same instance-id and reg-id, the proxy o If the proxy receives a final response from a branch other than a
SHOULD prefer the contact that was most recently updated. 408 or a 430 response, the proxy MUST NOT forward the same request
to another target representing the same AOR and instance-id. The
targetted instance has already provided its response.
The proxy uses normal forwarding rules looking at the next-hop target The proxy uses normal forwarding rules looking at the next-hop target
of the message and the value of any stored Path header field vector of the message and the value of any stored Path header field vector
in the registration binding to decide how to forward the request and in the registration binding to decide how to forward the request and
populate the Route header in the request. Additionally, when the populate the Route header in the request. Additionally, when the
proxy forwards a request to a binding that contains a reg-id, the proxy forwards a request to a binding that contains a reg-id, if the
proxy MUST send the request over the same network flow that was saved binding has a previous hop flow associated with it, the proxy MUST
with the binding. This means that for TCP, the request MUST be sent send the request over the same network flow that was saved with the
on the same TCP socket that received the REGISTER request. For UDP, binding. This means that for TCP, the request MUST be sent on the
the request MUST be sent from the same local IP address and port over same TCP socket that received the REGISTER request. For UDP, the
request MUST be sent from the same local IP address and port over
which the registration was received, to the same IP address and port which the registration was received, to the same IP address and port
from which the REGISTER was received. from which the REGISTER was received.
If a proxy or registrar receives information from the network that If a proxy or registrar receives information from the network that
indicates that no future messages will be delivered on a specific indicates that no future messages will be delivered on a specific
flow, then the proxy MUST invalidate all the bindings that use that flow, then the proxy MUST invalidate all the bindings in the target
flow (regardless of AOR). Examples of this are a TCP socket closing set that use that flow (regardless of AOR). Examples of this are a
or receiving a destination unreachable ICMP error on a UDP flow. TCP socket closing or receiving a destination unreachable ICMP error
Similarly, if a proxy closes a file descriptor, it MUST invalidate on a UDP flow. Similarly, if a proxy closes a file descriptor, it
all the bindings with flows that use that file descriptor. MUST invalidate all the bindings in the target set with flows that
use that file descriptor.
7. Mechanisms for All Servers (Proxys, Registars, UASs)
Any SIP device that receives SIP messages directly from a UA needs to 8. STUN Keepalive Processing
behave as specified in this section. Such devices would generally
include a Registrar and an Edge Proxy, as they both receive REGISTER
requests directly from a UA.
7.1. STUN Processing This section describes changes to the SIP transport layer that allow
SIP and the STUN [I-D.ietf-behave-rfc3489bis] NAT Keepalive usage to
be mixed over the same flow. The STUN messages are used to verify
connectivity is still available over a flow and to provide periodic
keepalives. Note that these STUN keepalives are always sent to the
next SIP hop. STUN messages are not delivered end-to-end.
This document defines a new STUN usage for connectivity checks. The The only STUN messages required by this usage are Binding Requests,
only STUN messages required by this usage are Binding Requests,
Binding Responses, and Error Responses. The UAC sends Binding Binding Responses, and Error Responses. The UAC sends Binding
Requests over the same UDP flow, TCP connection, or TLS channel used Requests over the same UDP flow, TCP connection, or TLS channel used
for sending SIP messages, once a SIP registration has been for sending SIP messages. These Binding Requests do not require any
successfully processed on that flow. These Binding Requests do not STUN attributes. The UAS responds to a valid Binding Request with a
require any STUN attributes. The UAS responds to a valid Binding Binding Response which MUST include the XOR-MAPPED-ADDRESS attribute.
Request with a Binding Response which MUST include the XOR-MAPPED- After a successful STUN response is received over TCP or TLS over
ADDRESS attribute. After a successful STUN response is received over TCP, the underlying TCP connection is left in the active state.
TCP or TLS over TCP, the underlying TCP connection is left in the
active state.
If the server receives SIP requests on a given interface and port, it If a server compliant to this section receives SIP requests on a
MUST also provide a limited version of a STUN server on the same given interface and port, it MUST also provide a limited version of a
interface and port. Specifically it MUST be capable of receiving and STUN server on the same interface and port as described in Section
responding to STUN Binding Requests. 12.3 of [I-D.ietf-behave-rfc3489bis]. When STUN messages are sent
with a SIP over TLS over TCP flow, the STUN messages are sent inside
the TLS-protected channel.
It is easy to distinguish STUN and SIP packets because the first It is easy to distinguish STUN and SIP packets sent over UDP,
octet of a STUN packet has a value of 0 or 1 while the first octet because the first octet of a STUN packet has a value of 0 or 1
of a SIP message is never a 0 or 1. while the first octet of a SIP message is never a 0 or 1. For TCP
or TLS over TCP flows, determining if the first octet of the next
message in a stream is SIP or STUN is still straightforward,
however implementations need to be preared to receive STUN
messages which cross a stream buffer boundary, and SIP and STUN
messages which share the same stream buffer.
Because sending and receiving binary STUN data on the same ports used
for SIP is a significant and non-backwards compatible change to RFC
3261, this section requires a number of checks before sending STUN
messages to a SIP node. If a SIP node sends STUN requests (for
example due to misconfiguration) despite these warnings, the node may
be blacklisted for UDP traffic, or cause its TCP server to loose
framing over its connection. For each target node (as determined by
IP address, address family, and port number), the sender needs to
determine if that destination is validated to support STUN, that it
does not support STUN, or that it needs to be validated.
When a URI is created that refers to a SIP device that supports STUN When a URI is created that refers to a SIP device that supports STUN
as described in this section, the 'keepalive' URI parameter, as as described in this section, the 'keepalive' URI parameter, as
defined in Section 10 MUST be added to the URI, with a value of defined in Section 12 SHOULD be added to the URI, with a value of
'stun'. This allows a UA to inspect the URI to decide if it should 'stun'. This allows a UA to inspect the URI to decide if it should
attempt to send STUN requests to this location. The 'keepalive' tag attempt to send STUN requests to this location.
typically would be present in the URI in the Route header field value
of a REGISTER request and not be in the Request URI.
8. Example Message Flow A SIP node MUST NOT send STUN requests over a flow unless it has an
explicit indication that the target next hop SIP server claims to
support STUN. For example, automatic or manual configuration of an
outbound-proxy-set which contains the keepalive=stun parameter is
considered sufficient explicit indication. Note that UACs MUST NOT
use an ambiguous configuration option such as "Work through NATs?" or
"Do Keepalives?" to imply next hop STUN support. A SIP node MAY also
probe the next hop using a SIP OPTIONS request to check for support
of the 'sip-stun' option tag in a Supported header field.
Futhermore, even with explicit indication of next hop STUN support, a
SIP node needs to validate support for STUN the first time it sends
traffic to a specific unvalidated target destination. If an explicit
probe indicates support for the 'sip-stun' option-tag, that
destination is validated for STUN support. If an explicit probe does
not indicate support for the 'sip-stun' option-tag, the target
destination does not support STUN request, and the UAC MUST NOT send
further STUN requests to this destination. A SIP node MAY send one
STUN request and its retransmissions to an unvalidated destination.
If a STUN request ever succeeds to a destination, that destination is
thereafter validated for STUN support. If this initial STUN request
does not result in a STUN response, the SIP node MUST NOT send
additional STUN requests over this flow, unless and until a next-hop
probe later validates the destination. In addition, the SIP node
SHOULD remember unvalidated destination nodes that have been used
within one hour and SHOULD NOT send additional STUN messages to any
of these destinations. Note that until STUN support has been
verified, an initial STUN failure over UDP is not considered a flow
failure. For UDP flows, an unvalidated flow can still be reused for
SIP traffic, however for unvalidated TCP or TLS over TCP flows, the
connection over which STUN requests were sent MUST be closed.
Typically, a SIP node first sends a SIP request and waits to
receive a final response (other than a 408 response) over a flow
to a new target destination, before sending any STUN messages.
When scheduled for the next NAT refresh, the SIP node sends a STUN
request to the target. If none of the STUN requests succeed
(result in a STUN success response), and the UAC has not already
done so, the UAC sends an OPTIONS request to the next hop to
verify support for the 'sip-stun' option-tag.
Once a destination is validated to support STUN messages, failure of
a STUN request (including its retransmissions) is considered a
failure of the underlying flow. For SIP over UDP flows, if the XOR-
MAPPED-ADDRESS returned over the flow changes, this indicates that
the underlying connectivity has changed, and is considered a flow
failure. A 408 response to a next-hop OPTIONS probe is also
considered a flow failure.
8.1 Explicit Probes
This section defines a new SIP option-tag called 'sip-stun'.
Advertising this option-tag indicates that the server can receive SIP
messages and STUN messages as part of the NAT Keepalive usage on the
same port. Clients that want to probe a SIP server to determine
support for STUN, can send an OPTIONS request to the next hop by
setting the Max-Forwards header field to 0. The OPTIONS response
will contain a Supported header field with a list of the server's
supported option-tags.
A UAC SHOULD NOT include the 'sip-stun' option-tag in a Proxy-
Require header. This is because a request with this header will
fail in some topologies where the first proxy support sip-stun,
but a subsequent proxy does not. Note that RFC 3261 does not
allow proxies to remove option-tags from a Proxy-Require header
field.
8.2 Use with Sigcomp
When STUN is used together with SigComp [RFC3320] compressed SIP
messages over the same flow, how the STUN messages are sent depends
on the transport protocol. For UDP flows, the STUN messages are
simply sent uncompressed, "outside" of SigComp. This is supported by
multiplexing STUN messages with SigComp messages by checking the two
topmost bits of the message. These bits are always one for SigComp,
or zero for STUN.
All SigComp messages contain a prefix (the five most-significant
bits of the first byte are set to one) that does not occur in
UTF-8 encoded text messages [RFC-2279], so for applications which
use this encoding (or ASCII encoding) it is possible to multiplex
uncompressed application messages and SigComp messages on the same
UDP port.
The most significant two bits of every STUN message are both
zeroes. This, combined with the magic cookie, aids in
differentiating STUN packets from other protocols when STUN is
multiplexed with other protocols on the same port.
For TCP-based flows, SigComp requires that all messages are processed
by the SigComp compressor to facilitate framing. For these
transports, STUN messages are sent encapsulated in the SigComp "well-
known shim header" as described in Appendix A of RFC 3320 [RFC3320].
9. Example Message Flow
The following call flow shows a basic registration and an incoming The following call flow shows a basic registration and an incoming
call. At some point, the flow to the Primary proxy is lost. An call. At some point, the flow to the Primary proxy is lost. An
incoming INVITE tries to reach the Callee through the Primary flow, incoming INVITE tries to reach the Callee through the Primary flow,
but receives an ICMP Unreachable message. The Caller retries using but receives an ICMP Unreachable message. The Caller retries using
the Secondary Edge Proxy, which uses a separate flow. Later, after the Secondary Edge Proxy, which uses a separate flow. Later, after
the Primary reboots, The Callee discovers the flow failure and the Primary reboots, The Callee discovers the flow failure and
reestablishes a new flow to the Primary. reestablishes a new flow to the Primary.
[-----example.com domain -------------------] [-----example.com domain -------------------]
skipping to change at page 22, line 51 skipping to change at page 26, line 51
|---------------->| | | |---------------->| | |
| | (16) BYE | | | | (16) BYE | |
| |------------------------------------>| | |------------------------------------>|
| | | (17) 200 OK | | | | (17) 200 OK |
| |<------------------------------------| | |<------------------------------------|
| (18) 200 OK | | | | (18) 200 OK | | |
|<----------------| | | |<----------------| | |
| | | | | | | |
This call flow assumes that the Callee has been configured with a This call flow assumes that the Callee has been configured with a
proxy set that consists of "sip: proxy set that consists of "sip:pri.example.com;lr;keepalive=stun"
primary.example.com;lr;keepalive=stun" and "sip: and "sip:sec.example.com;lr;keepalive=stun". The Callee REGISTER in
secondary.example.com;lr;keepalive=stun". The Callee REGISTER in
message (1) looks like: message (1) looks like:
REGISTER sip:example.com SIP/2.0 REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnashds7 Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnashds7
Max-Forwards: 70 Max-Forwards: 70
From: Callee <sip:callee@example.com>;tag=7F94778B653B From: Callee <sip:callee@example.com>;tag=7F94778B653B
To: Callee <sip:callee@example.com> To: Callee <sip:callee@example.com>
Call-ID: 16CB75F21C70 Call-ID: 16CB75F21C70
CSeq: 1 REGISTER CSeq: 1 REGISTER
Supported: path Supported: path
Route: <sip:primary.example.com;lr;keepalive=stun> Route: <sip:pri.example.com;lr;keepalive=stun>
Contact: <sip:callee@192.0.2.1> Contact: <sip:callee@192.0.2.1>
;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>" ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
;reg-id=1 ;reg-id=1
Content-Length: 0 Content-Length: 0
In the message, note that the Route is set and the Contact header In the message, note that the Route is set and the Contact header
field value contains the instance-id and reg-id. The response to the field value contains the instance-id and reg-id. The response to the
REGISTER in message (2) would look like: REGISTER in message (2) would look like:
SIP/2.0 200 OK SIP/2.0 200 OK
skipping to change at page 24, line 13 skipping to change at page 28, line 13
secondary instead of the primary. They look like: secondary instead of the primary. They look like:
REGISTER sip:example.com SIP/2.0 REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnqr9bym Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnqr9bym
Max-Forwards: 70 Max-Forwards: 70
From: Callee <sip:callee@example.com>;tag=755285EABDE2 From: Callee <sip:callee@example.com>;tag=755285EABDE2
To: Callee <sip:callee@example.com> To: Callee <sip:callee@example.com>
Call-ID: E05133BD26DD Call-ID: E05133BD26DD
CSeq: 1 REGISTER CSeq: 1 REGISTER
Supported: path Supported: path
Route: <sip:secondary.example.com;lr;keepalive=stun> Route: <sip:sec.example.com;lr;keepalive=stun>
Contact: <sip:callee@192.0.2.1> Contact: <sip:callee@192.0.2.1>
;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>" ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
;reg-id=2 ;reg-id=2
Content-Length: 0 Content-Length: 0
SIP/2.0 200 OK SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnqr9bym Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnqr9bym
From: Callee <sip:callee@example.com>;tag=755285EABDE2 From: Callee <sip:callee@example.com>;tag=755285EABDE2
To: Callee <sip:callee@example.com>;tag=49A9AD0B3F6A To: Callee <sip:callee@example.com>;tag=49A9AD0B3F6A
Call-ID: E05133BD26DD Call-ID: E05133BD26DD
skipping to change at page 24, line 41 skipping to change at page 28, line 41
;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>" ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
;reg-id=2 ;reg-id=2
;expires=3600 ;expires=3600
Content-Length: 0 Content-Length: 0
The messages in the call flow are very normal. The only interesting The messages in the call flow are very normal. The only interesting
thing to note is that the INVITE in message 8 contains a Record-Route thing to note is that the INVITE in message 8 contains a Record-Route
header for the Secondary proxy, with its flow token. header for the Secondary proxy, with its flow token.
Record-Route: Record-Route:
<sip:PQPbqQE+Ynf+tzRPD27lU6uxkjQ8LLUG@secondary.example.com;lr> <sip:PQPbqQE+Ynf+tzRPD27lU6uxkjQ8LLUG@sec.example.com;lr;user=flow>
The registrations in message 13 and 14 are the same as message 1 and The registrations in message 13 and 14 are the same as message 1 and
2 other than the Call-ID and tags have changed. Because these 2 other than the Call-ID and tags have changed. Because these
messages will contain the same instance-id and reg-id as those in 1 messages will contain the same instance-id and reg-id as those in 1
and 2, this flow will partially supersede that for messages 1 and 2 and 2, this flow will partially supersede that for messages 1 and 2
and will be tried first by Primary. and will be tried first by Primary.
9. Grammar 10. Grammar
This specification defines new Contact header field parameters, This specification defines new Contact header field parameters,
reg-id and +sip.instance. The grammar includes the definitions from reg-id and +sip.instance. The grammar includes the definitions from
RFC 3261 [RFC3261] and includes the definition of uric from RFC 2396 RFC 3261 [RFC3261] and includes the definition of uric from RFC 2396
[RFC2396]. [RFC2396].
Note: The "=/" syntax used in this ABNF indicates an extension of Note: The "=/" syntax used in this ABNF indicates an extension of
the production on the left hand side. the production on the left hand side.
The ABNF[RFC4234] is: The ABNF[RFC4234] is:
skipping to change at page 25, line 25 skipping to change at page 29, line 24
c-p-reg = "reg-id" EQUAL 1*DIGIT ; 1 to 2**31 c-p-reg = "reg-id" EQUAL 1*DIGIT ; 1 to 2**31
c-p-instance = "+sip.instance" EQUAL c-p-instance = "+sip.instance" EQUAL
LDQUOT "<" instance-val ">" RDQUOT LDQUOT "<" instance-val ">" RDQUOT
instance-val = *uric ; defined in RFC 2396 instance-val = *uric ; defined in RFC 2396
The value of the reg-id MUST NOT be 0 and MUST be less than 2**31. The value of the reg-id MUST NOT be 0 and MUST be less than 2**31.
10. IANA Considerations 11. Definition of 430 Flow Failed response code
10.1. Contact Header Field This specification defines a new SIP response code '430 Flow Failed'.
This response code is used by an Edge Proxy to indicate to the
Authoritative Proxy that a specific flow to a UA instance has failed.
Other flows to the same instance may still succeed. The
Authoritative Proxy SHOULD attempt to forward to another target
(flow) with the same instance-id and AOR.
12. IANA Considerations
12.1 Contact Header Field
This specification defines a new Contact header field parameter This specification defines a new Contact header field parameter
called reg-id in the "Header Field Parameters and Parameter Values" called reg-id in the "Header Field Parameters and Parameter Values"
sub-registry as per the registry created by [RFC3968]. The required sub-registry as per the registry created by [RFC3968]. The required
information is: information is:
Header Field Parameter Name Predefined Reference Header Field Parameter Name Predefined Reference
Values Values
____________________________________________________________________ ____________________________________________________________________
Contact reg-id Yes [RFC AAAA] Contact reg-id Yes [RFC AAAA]
[NOTE TO RFC Editor: Please replace AAAA with [NOTE TO RFC Editor: Please replace AAAA with
the RFC number of this specification.] the RFC number of this specification.]
10.2. SIP/SIPS URI Parameters 12.2 SIP/SIPS URI Parameters
This specification arguments the "SIP/SIPS URI Parameters" sub- This specification arguments the "SIP/SIPS URI Parameters" sub-
registry as per the registry created by [RFC3969]. The required registry as per the registry created by [RFC3969]. The required
information is: information is:
Parameter Name Predefined Values Reference Parameter Name Predefined Values Reference
____________________________________________ ____________________________________________
keepalive stun [RFC AAAA] keepalive stun [RFC AAAA]
ob [RFC AAAA]
[NOTE TO RFC Editor: Please replace AAAA with [NOTE TO RFC Editor: Please replace AAAA with
the RFC number of this specification.] the RFC number of this specification.]
10.3. SIP Option Tag 12.3 SIP Option Tag
This specification registers a new SIP option tag, as per the This specification registers two new SIP option tags, as per the
guidelines in Section 27.1 of RFC 3261. guidelines in Section 27.1 of RFC 3261.
Name: outbound Name: outbound
Description: This option-tag is used to identify Registrars which Description: This option-tag is used to identify Registrars which
support extensions for Client Initiated Connections. A Registrar support extensions for Client Initiated Connections. A Registrar
places this option-tag in a Supported header to communicate the places this option-tag in a Supported header to communicate the
Registrar's support for this extension to the registering User Registrar's support for this extension to the registering User
Agent. Agent.
Name: sip-stun
Description: This option-tag is used to identify SIP servers which
can receive STUN requests described in the STUN NAT Keepalive
usage on the same ports they use to receive SIP messages.
10.4. Media Feature Tag 12.4 Response Code
This section registers a new SIP Response Code, as per the guidelines
in Section 27.1 of RFC 3261.
Code: 430
Default Reason Phrase: Flow Failed
Reference: This document
12.5 Media Feature Tag
This section registers a new media feature tag, per the procedures This section registers a new media feature tag, per the procedures
defined in RFC 2506 [RFC2506]. The tag is placed into the sip tree, defined in RFC 2506 [RFC2506]. The tag is placed into the sip tree,
which is defined in RFC 3840 [RFC3840]. which is defined in RFC 3840 [RFC3840].
Media feature tag name: sip.instance Media feature tag name: sip.instance
ASN.1 Identifier: New assignment by IANA. ASN.1 Identifier: New assignment by IANA.
Summary of the media feature indicated by this tag: This feature tag Summary of the media feature indicated by this tag: This feature tag
contains a string containing a URN that indicates a unique identifier contains a string containing a URN that indicates a unique identifier
associated with the UA instance registering the Contact. associated with the UA instance registering the Contact.
Values appropriate for use with this feature tag: String. Values appropriate for use with this feature tag: String.
The feature tag is intended primarily for use in the following The feature tag is intended primarily for use in the following
applications, protocols, services, or negotiation mechanisms: This applications, protocols, services, or negotiation mechanisms: This
skipping to change at page 27, line 15 skipping to change at page 31, line 36
preferences extension [RFC3841] allows for call routing decisions to preferences extension [RFC3841] allows for call routing decisions to
be based on the values of these parameters. Therefore, if an be based on the values of these parameters. Therefore, if an
attacker can modify the values of this tag, they may be able to attacker can modify the values of this tag, they may be able to
affect the behavior of applications. As a result, applications which affect the behavior of applications. As a result, applications which
utilize this media feature tag SHOULD provide a means for ensuring utilize this media feature tag SHOULD provide a means for ensuring
its integrity. Similarly, this feature tag should only be trusted as its integrity. Similarly, this feature tag should only be trusted as
valid when it comes from the user or user agent described by the tag. valid when it comes from the user or user agent described by the tag.
As a result, protocols for conveying this feature tag SHOULD provide As a result, protocols for conveying this feature tag SHOULD provide
a mechanism for guaranteeing authenticity. a mechanism for guaranteeing authenticity.
11. Security Considerations 13. Security Considerations
One of the key security concerns in this work is making sure that an One of the key security concerns in this work is making sure that an
attacker cannot hijack the sessions of a valid user and cause all attacker cannot hijack the sessions of a valid user and cause all
calls destined to that user to be sent to the attacker. calls destined to that user to be sent to the attacker.
The simple case is when there are no edge proxies. In this case, the The simple case is when there are no edge proxies. In this case, the
only time an entry can be added to the routing for a given AOR is only time an entry can be added to the routing for a given AOR is
when the registration succeeds. SIP already protects against when the registration succeeds. SIP already protects against
attackers being able to successfully register, and this scheme relies attackers being able to successfully register, and this scheme relies
on that security. Some implementers have considered the idea of just on that security. Some implementers have considered the idea of just
skipping to change at page 28, line 5 skipping to change at page 32, line 25
gotten this information from the registrar. The registrar will only gotten this information from the registrar. The registrar will only
save this information for a given AOR if the registration for the AOR save this information for a given AOR if the registration for the AOR
has been successful; and the registration will only be successful if has been successful; and the registration will only be successful if
the UA can correctly authenticate. Even if an attacker has spoofed the UA can correctly authenticate. Even if an attacker has spoofed
some bad information in the Path header sent to the registrar, the some bad information in the Path header sent to the registrar, the
attacker will not be able to get the registrar to accept this attacker will not be able to get the registrar to accept this
information for an AOR that does not belong to the attacker. The information for an AOR that does not belong to the attacker. The
registrar will not hand out this bad information to others, and registrar will not hand out this bad information to others, and
others will not be misled into contacting the attacker. others will not be misled into contacting the attacker.
12. Requirements 14. Requirements
This specification was developed to meet the following requirements: This specification was developed to meet the following requirements:
1. Must be able to detect that a UA supports these mechanisms. 1. Must be able to detect that a UA supports these mechanisms.
2. Support UAs behind NATs. 2. Support UAs behind NATs.
3. Support TLS to a UA without a stable DNS name or IP address. 3. Support TLS to a UA without a stable DNS name or IP address.
4. Detect failure of a connection and be able to correct for this. 4. Detect failure of a connection and be able to correct for this.
5. Support many UAs simultaneously rebooting. 5. Support many UAs simultaneously rebooting.
6. Support a NAT rebooting or resetting. 6. Support a NAT rebooting or resetting.
7. Minimize initial startup load on a proxy. 7. Minimize initial startup load on a proxy.
8. Support architectures with edge proxies. 8. Support architectures with edge proxies.
13. Changes 15. Changes
Note to RFC Editor: Please remove this whole section. Note to RFC Editor: Please remove this whole section.
13.1. Changes from 03 Version 15.1 Changes from 04 Version
Moved STUN to a separate section. Reference this section from within
the relevant sections in the rest of the document.
Add language clarifying that UA MUST NOT send STUN without an
explicit indication the server supports STUN.
Add language describing that UA MUST stop sending STUN if it appears
the server does not support it.
Defined a 'sip-stun' option tag. UAs can optionally probe servers
for it with OPTIONS. Clarified that UAs SHOULD NOT put this in a
Proxy-Require. Explain that the first-hop MUST support this option-
tag.
Clarify that SIP/STUN in TLS is on the "inside". STUN used with
Sigcomp-compressed SIP is "outside" the compression layer for UDP,
but wrapped inside the well-known shim header for TCP-based
transports.
Clarify how to decide what a consecutive registration timer is. Flow
must be up for some time (default 120 seconds) otherwise previous
registration is not considered successful.
Change UAC MUST-->SHOULD register a flow for each member of outbound-
proxy-set.
Reworded registrar and proxy in some places (introduce the term
"Authoritative Proxy").
Loosened restrictions on always storing a complete Path vector back
to the registrar/authoritative proxy if a previous hop in the path
vector is reachable.
Added comment about reregistration typically happening over same flow
as original registration.
Changed 410 Gone to new response code 430 Flow Failed. Was going to
change this to 480 Temporarily Unavailable. Unfortunately this would
mean that the authoritative proxy deletes all flows of phones who use
480 for Do Not Disturb. Oops!
Restored sanity by restoring text which explains that registrations
with the same reg-id replace the old registration.
Added text about the 'ob' parameter which is used in Path header
field URIs to make sure that the previous proxy that added a Path
understood outbound processing. The registrar doesn't include
Supported: outbound unless it could actually do outbound processing
(ex: any Path headers have to have the 'ob' parameter).
Added some text describing what a registration means when there is an
instance-id, but no reg-id.
15.2 Changes from 03 Version
Added non-normative text motivating STUN vs. SIP PING, OPTIONS, and Added non-normative text motivating STUN vs. SIP PING, OPTIONS, and
Double CRLF. Added discussion about why TCP Keepalives are not Double CRLF. Added discussion about why TCP Keepalives are not
always available. always available.
Explained more clearly that outbound-proxy-set can be "configured" Explained more clearly that outbound-proxy-set can be "configured"
using any current or future, manual or automatic configuration/ using any current or future, manual or automatic configuration/
discovery mechanism. discovery mechanism.
Added a sentence which prevents an Edge Proxy from forwarding back Added a sentence which prevents an Edge Proxy from forwarding back
skipping to change at page 29, line 7 skipping to change at page 34, line 32
by Bill Fenner. by Bill Fenner.
Added a table in an appendix expanding the default flow recovery Added a table in an appendix expanding the default flow recovery
timers. timers.
Incorporated numerous clarifications and rewordings for better Incorporated numerous clarifications and rewordings for better
comprehension. comprehension.
Fixed many typos and spelling misteaks. Fixed many typos and spelling misteaks.
13.2. Changes from 02 Version 15.3 Changes from 02 Version
Removed Double CRLF Keepalive Removed Double CRLF Keepalive
Changed ;sip-stun syntax to ;keepalive=stun Changed ;sip-stun syntax to ;keepalive=stun
Fixed incorrect text about TCP keepalives. Fixed incorrect text about TCP keepalives.
13.3. Changes from 01 Version 15.4 Changes from 01 Version
Moved definition of instance-id from GRUU[I-D.ietf-sip-gruu] draft to Moved definition of instance-id from GRUU[I-D.ietf-sip-gruu] draft to
this draft. this draft.
Added tentative text about Double CRLF Keepalive Added tentative text about Double CRLF Keepalive
Removed pin-route stuff Removed pin-route stuff
Changed the name of "flow-id" to "reg-id" Changed the name of "flow-id" to "reg-id"
skipping to change at page 29, line 27 skipping to change at page 35, line 4
Moved definition of instance-id from GRUU[I-D.ietf-sip-gruu] draft to Moved definition of instance-id from GRUU[I-D.ietf-sip-gruu] draft to
this draft. this draft.
Added tentative text about Double CRLF Keepalive Added tentative text about Double CRLF Keepalive
Removed pin-route stuff Removed pin-route stuff
Changed the name of "flow-id" to "reg-id" Changed the name of "flow-id" to "reg-id"
Reorganized document flow Reorganized document flow
Described the use of STUN as a proper STUN usage Described the use of STUN as a proper STUN usage
Added 'outbound' option-tag to detect if registrar supports outbound Added 'outbound' option-tag to detect if registrar supports outbound
13.4. Changes from 00 Version 15.5 Changes from 00 Version
Moved TCP keepalive to be STUN. Moved TCP keepalive to be STUN.
Allowed SUBSCRIBE to create flow mappings. Added pin-route option Allowed SUBSCRIBE to create flow mappings. Added pin-route option
tags to support this. tags to support this.
Added text about updating dialog state on each usage after a Added text about updating dialog state on each usage after a
connection failure. connection failure.
14. Acknowledgments 16. Acknowledgments
Jonathan Rosenberg provided many comments and useful text. Dave Oran Jonathan Rosenberg provided many comments and useful text. Dave Oran
came up with the idea of using the most recent registration first in came up with the idea of using the most recent registration first in
the proxy. Alan Hawrylyshen co-authored the draft that formed the the proxy. Alan Hawrylyshen co-authored the draft that formed the
initial text of this specification. Additionally, many of the initial text of this specification. Additionally, many of the
concepts here originated at a connection reuse meeting at IETF 60 concepts here originated at a connection reuse meeting at IETF 60
that included the authors, Jon Peterson, Jonathan Rosenberg, Alan that included the authors, Jon Peterson, Jonathan Rosenberg, Alan
Hawrylyshen, and Paul Kyzivat. The TCP design team consisting of Hawrylyshen, and Paul Kyzivat. The TCP design team consisting of
Chris Boulton, Scott Lawrence, Rajnish Jain, Vijay K. Gurbani, and Chris Boulton, Scott Lawrence, Rajnish Jain, Vijay K. Gurbani, and
Ganesh Jayadevan provided input and text. Nils Ohlmeier provided Ganesh Jayadevan provided input and text. Nils Ohlmeier provided
many fixes and initial implementation experience. In addition, many fixes and initial implementation experience. In addition,
thanks to the following folks for useful comments: Francois Audet, thanks to the following folks for useful comments: Francois Audet,
Flemming Andreasen, Mike Hammer, Dan Wing, Srivatsa Srinivasan, Dale Flemming Andreasen, Mike Hammer, Dan Wing, Srivatsa Srinivasan, Dale
Worely, Juha Heinanen, Eric Rescorla, and Lyndsay Campbell. Worely, Juha Heinanen, Eric Rescorla, Lyndsay Campbell, and Erkki
Koivusalo.
Appendix A. Default Flow Registration Backoff Times Appendix A. Default Flow Registration Backoff Times
The base-time used for the flow re-registration backoff times The base-time used for the flow re-registration backoff times
described in Section 4.4.2 are configurable. If the base-time-all- described in Section 4.4.3 are configurable. If the base-time-all-
fail value is set to the default of 30 seconds and the base-time-not- fail value is set to the default of 30 seconds and the base-time-not-
failed value is set to the default of 90 seconds, the following table failed value is set to the default of 90 seconds, the following table
shows the resulting delay values. shows the resulting delay values.
+-------------------+--------------------+--------------------+ +-------------------+--------------------+--------------------+
| # of reg failures | all flows unusable | >1 non-failed flow | | # of reg failures | all flows unusable | >1 non-failed flow |
+-------------------+--------------------+--------------------+ +-------------------+--------------------+--------------------+
| 0 | 0 secs | 0 secs | | 0 | 0 secs | 0 secs |
| 1 | 30-60 secs | 90-180 secs | | 1 | 30-60 secs | 90-180 secs |
| 2 | 1-2 mins | 3-6 mins | | 2 | 1-2 mins | 3-6 mins |
| 3 | 2-4 mins | 6-12 mins | | 3 | 2-4 mins | 6-12 mins |
| 4 | 4-8 mins | 12-24 mins | | 4 | 4-8 mins | 12-24 mins |
| 5 | 8-16 mins | 15-30 mins | | 5 | 8-16 mins | 15-30 mins |
| 6 or more | 15-30 mins | 15-30 mins | | 6 or more | 15-30 mins | 15-30 mins |
+-------------------+--------------------+--------------------+ +-------------------+--------------------+--------------------+
15. References 17. References
15.1. Normative References 17.1 Normative References
[I-D.ietf-behave-rfc3489bis] [I-D.ietf-behave-rfc3489bis]
Rosenberg, J., "Simple Traversal of UDP Through Network Rosenberg, J., "Simple Traversal of UDP Through Network
Address Translators (NAT) (STUN)", Address Translators (NAT) (STUN)",
draft-ietf-behave-rfc3489bis-02 (work in progress), draft-ietf-behave-rfc3489bis-02 (work in progress),
July 2005. July 2005.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
skipping to change at page 31, line 15 skipping to change at page 36, line 48
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E. A., Peterson, J., Sparks, R., Handley, M., and E.
Schooler, "SIP: Session Initiation Protocol", RFC 3261, Schooler, "SIP: Session Initiation Protocol", RFC 3261,
June 2002. June 2002.
[RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation
Protocol (SIP): Locating SIP Servers", RFC 3263, Protocol (SIP): Locating SIP Servers", RFC 3263,
June 2002. June 2002.
[RFC3320] Price, R., Bormann, C., Christoffersson, J., Hannu, H.,
Liu, Z., and J. Rosenberg, "Signaling Compression
(SigComp)", RFC 3320, January 2003.
[RFC3327] Willis, D. and B. Hoeneisen, "Session Initiation Protocol [RFC3327] Willis, D. and B. Hoeneisen, "Session Initiation Protocol
(SIP) Extension Header Field for Registering Non-Adjacent (SIP) Extension Header Field for Registering Non-Adjacent
Contacts", RFC 3327, December 2002. Contacts", RFC 3327, December 2002.
[RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, [RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat,
"Indicating User Agent Capabilities in the Session "Indicating User Agent Capabilities in the Session
Initiation Protocol (SIP)", RFC 3840, August 2004. Initiation Protocol (SIP)", RFC 3840, August 2004.
[RFC3841] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Caller [RFC3841] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Caller
Preferences for the Session Initiation Protocol (SIP)", Preferences for the Session Initiation Protocol (SIP)",
skipping to change at page 31, line 44 skipping to change at page 37, line 34
Registry for the Session Initiation Protocol (SIP)", Registry for the Session Initiation Protocol (SIP)",
BCP 99, RFC 3969, December 2004. BCP 99, RFC 3969, December 2004.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
Unique IDentifier (UUID) URN Namespace", RFC 4122, Unique IDentifier (UUID) URN Namespace", RFC 4122,
July 2005. July 2005.
[RFC4234] Crocker, D. and P. Overell, "Augmented BNF for Syntax [RFC4234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 4234, October 2005. Specifications: ABNF", RFC 4234, October 2005.
15.2. Informative References 17.2 Informative References
[I-D.ietf-sip-gruu] [I-D.ietf-sip-gruu]
Rosenberg, J., "Obtaining and Using Globally Routable User Rosenberg, J., "Obtaining and Using Globally Routable User
Agent (UA) URIs (GRUU) in the Session Initiation Protocol Agent (UA) URIs (GRUU) in the Session Initiation Protocol
(SIP)", draft-ietf-sip-gruu-04 (work in progress), (SIP)", draft-ietf-sip-gruu-04 (work in progress),
July 2005. July 2005.
[I-D.ietf-sipping-config-framework] [I-D.ietf-sipping-config-framework]
Petrie, D., "A Framework for Session Initiation Protocol Petrie, D., "A Framework for Session Initiation Protocol
User Agent Profile Delivery", User Agent Profile Delivery",
 End of changes. 95 change blocks. 
243 lines changed or deleted 526 lines changed or added

This html diff was produced by rfcdiff 1.33. The latest version is available from http://tools.ietf.org/tools/rfcdiff/