draft-ietf-sip-outbound-07.txt   draft-ietf-sip-outbound-08.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 R. Mahy, Ed.
Intended status: Standards Track Plantronics (if approved) Plantronics
Expires: July 11, 2007 January 7, 2007 Intended status: Standards Track March 4, 2007
Expires: September 5, 2007
Managing Client Initiated Connections in the Session Initiation Protocol Managing Client Initiated Connections in the Session Initiation Protocol
(SIP) (SIP)
draft-ietf-sip-outbound-07 draft-ietf-sip-outbound-08
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 37
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 July 11, 2007. This Internet-Draft will expire on September 5, 2007.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2007). Copyright (C) The IETF Trust (2007).
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
considerations, such as the existence of firewalls and Network considerations, such as the existence of firewalls and Network
Address Translators (NATs), prevent servers from connecting to User Address Translators (NATs), prevent servers from connecting to User
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
skipping to change at page 2, line 20 skipping to change at page 2, line 21
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4
2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5
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 . . . . . . . . . . . . . . . . . . . 11 3.5. Keepalive Technique . . . . . . . . . . . . . . . . . . . 11
3.5.1. CRLF Keepalive Technique . . . . . . . . . . . . . . . 11
3.5.2. TCP Keepalive Technique . . . . . . . . . . . . . . . 11
3.5.3. STUN Keepalive Technique . . . . . . . . . . . . . . . 12
4. User Agent Mechanisms . . . . . . . . . . . . . . . . . . . . 12 4. User Agent Mechanisms . . . . . . . . . . . . . . . . . . . . 12
4.1. Instance ID Creation . . . . . . . . . . . . . . . . . . . 12 4.1. Instance ID Creation . . . . . . . . . . . . . . . . . . . 12
4.2. Initial Registrations . . . . . . . . . . . . . . . . . . 13 4.2. Registrations . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1. Registration by Other Instances . . . . . . . . . . . 15 4.2.1. Registration by Other Instances . . . . . . . . . . . 15
4.3. Sending Requests . . . . . . . . . . . . . . . . . . . . . 15 4.3. Sending Requests . . . . . . . . . . . . . . . . . . . . . 16
4.4. Detecting Flow Failure . . . . . . . . . . . . . . . . . . 15 4.4. Detecting Flow Failure . . . . . . . . . . . . . . . . . . 16
4.4.1. Keepalive with TCP KEEPALIVE . . . . . . . . . . . . . 16 4.4.1. Keepalive with TCP KEEPALIVE . . . . . . . . . . . . . 17
4.4.2. Keepalive with STUN . . . . . . . . . . . . . . . . . 16 4.4.2. Keepalive with CRLF . . . . . . . . . . . . . . . . . 17
4.4.3. Flow Recovery . . . . . . . . . . . . . . . . . . . . 16 4.4.3. Keepalive with STUN . . . . . . . . . . . . . . . . . 18
5. Edge Proxy Mechanisms . . . . . . . . . . . . . . . . . . . . 18 4.5. Flow Recovery . . . . . . . . . . . . . . . . . . . . . . 18
5.1. Processing Register Requests . . . . . . . . . . . . . . . 18 5. Edge Proxy Mechanisms . . . . . . . . . . . . . . . . . . . . 19
5.2. Generating Flow Tokens . . . . . . . . . . . . . . . . . . 18 5.1. Processing Register Requests . . . . . . . . . . . . . . . 19
5.3. Forwarding Requests . . . . . . . . . . . . . . . . . . . 19 5.2. Generating Flow Tokens . . . . . . . . . . . . . . . . . . 20
5.4. Edge Proxy Keepalive Handling . . . . . . . . . . . . . . 20 5.3. Forwarding Requests . . . . . . . . . . . . . . . . . . . 21
6. Registrar Mechanisms: Processing REGISTER Requests . . . . . . 20 5.4. Edge Proxy Keepalive Handling . . . . . . . . . . . . . . 22
7. Authoritative Proxy Mechanisms: Forwarding Requests . . . . . 22 6. Registrar Mechanisms: Processing REGISTER Requests . . . . . . 22
8. STUN Keepalive Processing . . . . . . . . . . . . . . . . . . 23 7. Authoritative Proxy Mechanisms: Forwarding Requests . . . . . 24
8.1. Explicit Probes . . . . . . . . . . . . . . . . . . . . . 25 8. STUN Keepalive Processing . . . . . . . . . . . . . . . . . . 24
8.2. Use with Sigcomp . . . . . . . . . . . . . . . . . . . . . 25 8.1. Explicit Option Probes . . . . . . . . . . . . . . . . . . 27
9. Example Message Flow . . . . . . . . . . . . . . . . . . . . . 26 8.2. Use with Sigcomp . . . . . . . . . . . . . . . . . . . . . 27
10. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 9. Example Message Flow . . . . . . . . . . . . . . . . . . . . . 27
11. Definition of 430 Flow Failed response code . . . . . . . . . 30 10. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 11. Definition of 430 Flow Failed response code . . . . . . . . . 31
12.1. Contact Header Field . . . . . . . . . . . . . . . . . . . 30 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31
12.2. SIP/SIPS URI Parameters . . . . . . . . . . . . . . . . . 31 12.1. Contact Header Field . . . . . . . . . . . . . . . . . . . 31
12.3. SIP Option Tag . . . . . . . . . . . . . . . . . . . . . . 31 12.2. SIP/SIPS URI Parameters . . . . . . . . . . . . . . . . . 32
12.4. Response Code . . . . . . . . . . . . . . . . . . . . . . 31 12.3. SIP Option Tag . . . . . . . . . . . . . . . . . . . . . . 32
12.5. Media Feature Tag . . . . . . . . . . . . . . . . . . . . 31 12.4. Response Code . . . . . . . . . . . . . . . . . . . . . . 32
13. Security Considerations . . . . . . . . . . . . . . . . . . . 32 12.5. Media Feature Tag . . . . . . . . . . . . . . . . . . . . 32
14. Operational Notes on Transports . . . . . . . . . . . . . . . 33 13. Security Considerations . . . . . . . . . . . . . . . . . . . 33
15. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 34 14. Operational Notes on Transports . . . . . . . . . . . . . . . 34
16. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 15. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 35
16.1. Changes from 06 Version . . . . . . . . . . . . . . . . . 34 16. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 35
16.2. Changes from 05 Version . . . . . . . . . . . . . . . . . 34 17. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
16.3. Changes from 04 Version . . . . . . . . . . . . . . . . . 35 17.1. Changes from 07 Version . . . . . . . . . . . . . . . . . 35
16.4. Changes from 03 Version . . . . . . . . . . . . . . . . . 36 17.2. Changes from 06 Version . . . . . . . . . . . . . . . . . 35
16.5. Changes from 02 Version . . . . . . . . . . . . . . . . . 37 17.3. Changes from 05 Version . . . . . . . . . . . . . . . . . 36
16.6. Changes from 01 Version . . . . . . . . . . . . . . . . . 37 17.4. Changes from 04 Version . . . . . . . . . . . . . . . . . 36
16.7. Changes from 00 Version . . . . . . . . . . . . . . . . . 37 17.5. Changes from 03 Version . . . . . . . . . . . . . . . . . 37
17. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 37 17.6. Changes from 02 Version . . . . . . . . . . . . . . . . . 38
Appendix A. Default Flow Registration Backoff Times . . . . . . . 38 17.7. Changes from 01 Version . . . . . . . . . . . . . . . . . 38
18. References . . . . . . . . . . . . . . . . . . . . . . . . . . 38 17.8. Changes from 00 Version . . . . . . . . . . . . . . . . . 38
18.1. Normative References . . . . . . . . . . . . . . . . . . . 38 18. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 39
18.2. Informative References . . . . . . . . . . . . . . . . . . 39 Appendix A. Default Flow Registration Backoff Times . . . . . . . 39
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 40 19. References . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Intellectual Property and Copyright Statements . . . . . . . . . . 42 19.1. Normative References . . . . . . . . . . . . . . . . . . . 40
19.2. Informative References . . . . . . . . . . . . . . . . . . 41
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 41
Intellectual Property and Copyright Statements . . . . . . . . . . 43
1. Introduction 1. Introduction
There are many environments for SIP [1] deployments in which the User There are many environments for SIP [1] deployments in which the User
Agent (UA) can form a connection to a Registrar or Proxy but in which Agent (UA) can form a connection to a Registrar or Proxy but in which
connections in the reverse direction to the UA are not possible. connections in the reverse direction to the UA are not possible.
This can happen for several reasons. Connections to the UA can be This can happen for several reasons. Connections to the UA can be
blocked by a firewall device between the UA and the proxy or blocked by a firewall device between the UA and the proxy or
registrar, which will only allow new connections in the direction of registrar, which will only allow new connections in the direction of
the UA to the Proxy. Similarly there a NAT could be present, which the UA to the Proxy. Similarly a NAT could be present, which is only
is only capable of allowing new connections from the private address capable of allowing new connections from the private address side to
side to the public side. This specification allows SIP registration the public side. This specification allows SIP registration when the
when the UA is behind such a firewall or NAT. UA is behind such a firewall or NAT.
Most IP phones and personal computers get their network Most IP phones and personal computers get their network
configurations dynamically via a protocol such as DHCP (Dynamic Host configurations dynamically via a protocol such as DHCP (Dynamic Host
Configuration Protocol). These systems typically do not have a Configuration Protocol). These systems typically do not have a
useful name in the Domain Name System (DNS), and they almost never useful name in the Domain Name System (DNS), and they almost never
have a long-term, stable DNS name that is appropriate for use in the have a long-term, stable DNS name that is appropriate for use in the
subjectAltName of a certificate, as required by [1]. However, these subjectAltName of a certificate, as required by [1]. However, these
systems can still act as a TLS client and form connections to a proxy systems can still act as a TLS client and form connections to a proxy
or registrar which authenticates with a server certificate. The or registrar which authenticates with a server certificate. The
server can authenticate the UA using a shared secret in a digest server can authenticate the UA using a shared secret in a digest
skipping to change at page 4, line 40 skipping to change at page 4, line 40
request, the proxy can later use this same network "flow"--whether request, the proxy can later use this same network "flow"--whether
this is a bidirectional stream of UDP datagrams, a TCP connection, or this is a bidirectional stream of UDP datagrams, a TCP connection, or
an analogous concept of another transport protocol--to forward any an analogous concept of another transport protocol--to forward any
requests that need to go to this UA. For a UA to receive incoming requests that need to go to this UA. For a UA to receive incoming
requests, the UA has to connect to a server. Since the server can't requests, the UA has to connect to a server. Since the server can't
connect to the UA, the UA has to make sure that a flow is always connect to the UA, the UA has to make sure that a flow is always
active. This requires the UA to detect when a flow fails. Since active. This requires the UA to detect when a flow fails. Since
such detection takes time and leaves a window of opportunity for such detection takes time and leaves a window of opportunity for
missed incoming requests, this mechanism allows the UA to use missed incoming requests, this mechanism allows the UA to use
multiple flows to the proxy or registrar. This specification also multiple flows to the proxy or registrar. This specification also
defines how SIP implements the STUN keepalive usage. The keepalive defines multiple keepalive schemes. The keepalive mechanism is used
mechanism is used to keep NAT bindings fresh, and to allow the UA to to keep NAT bindings fresh, and to allow the UA to detect when a flow
detect when a flow has failed. 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 [2]. document are to be interpreted as described in RFC 2119 [2].
2.1. Definitions 2.1. Definitions
Authoritative Proxy: A proxy that handles non-REGISTER requests for Authoritative Proxy: A proxy that handles non-REGISTER requests for
skipping to change at page 6, line 17 skipping to change at page 6, line 17
failure. failure.
When a proxy goes to route a message to a UA for which it has a When a proxy goes to route a message to a UA for which it has a
binding, it can use any one of the flows on which a successful binding, it can use any one of the flows on which a successful
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 a simple periodic message as a keepalive mechanism to keep
the keepalive mechanism to keep their flow to the proxy or registrar their flow to the proxy or registrar alive. For connection oriented
alive. transports such as TCP this is based on CRLF or a transport specific
keepalive while for transports that are not connection oriented this
is accomplished by using a SIP specific usage of STUN.
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 |
+-----+-----+ +-----+-----+
skipping to change at page 8, line 49 skipping to change at page 8, line 49
\ / \ /
+------+ +------+
| User | | User |
| Agent| | Agent|
+------+ +------+
The UA is configured with multiple outbound proxy registration URIs. The UA is configured with multiple outbound proxy registration URIs.
These URIs are configured into the UA through whatever the normal These URIs are configured into the UA through whatever the normal
mechanism is to configure the proxy or registrar address in the UA. mechanism is to configure the proxy or registrar address in the UA.
If the AOR is Alice@example.com, the outbound-proxy-set might look If the AOR is Alice@example.com, the outbound-proxy-set might look
something like "sip:primary.example.com;keepalive=stun" and "sip: something like "sip:primary.example.com;keep-stun" and "sip:
secondary.example.com;keepalive=stun". The "keepalive=stun" tag secondary.example.com;keep-stun". The "keep-stun" tag indicates that
indicates that a SIP server supports STUN and SIP multiplexed over a SIP server supports STUN and SIP multiplexed over the same flow, as
the same flow, as described later in this specification. Note that described later in this specification. Note that each URI in the
each URI in the outbound-proxy-set could resolve to several different outbound-proxy-set could resolve to several different physical hosts.
physical hosts. The administrative domain that created these URIs The administrative domain that created these URIs should ensure that
should ensure that the two URIs resolve to separate hosts. These the two URIs resolve to separate hosts. These URIs are handled
URIs are handled according to normal SIP processing rules, so according to normal SIP processing rules, so mechanisms like SRV can
mechanisms like SRV can be used to do load balancing across a proxy be used to do load balancing across a proxy farm.
farm.
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.3. The multiple problem, and is further discussed in Section 4.5. The multiple flows
flows to many servers help reduce the load caused by the avalanche to many servers help reduce the load caused by the avalanche restart.
restart. If a UA has multiple flows, and one of the servers fails, If a UA has multiple flows, and one of the servers fails, the UA
the UA delays the specified time before trying to form a new delays the specified time before trying to form a new connection to
connection to replace the flow to the server that failed. By replace the flow to the server that failed. By spreading out the
spreading out the time used for all the UAs to reconnect to a server, time used for all the UAs to reconnect to a server, the load on the
the load on the server farm is reduced. 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.
Another motivation for maintaining multiple flows between the UA and Another motivation for maintaining multiple flows between the UA and
its registrar is related to multihomed UAs. Such UAs can benefit its registrar is related to multihomed UAs. Such UAs can benefit
from multiple connections from different interfaces to protect from multiple connections from different interfaces to protect
against the failure of an individual access link. against the failure of an individual access link.
skipping to change at page 11, line 7 skipping to change at page 11, line 7
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
from 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 [3]. Path header mechanism in RFC 3327 [3].
3.5. Keepalive Technique 3.5. Keepalive Technique
A keepalive mechanism needs to detect failure of a connection and This document describes three keepalive mechanisms. Each of these
changes to the NAT public mapping, as well as keeping any NAT mechanisms uses a client-to-server "ping" keepalive and a
bindings refreshed. This specification describes using STUN [4] over corresponding server-to-client "pong" message. This ping-pong
the same flow as the SIP traffic to perform the keepalive. For sequence allows the client, and optionally the server, to tell if its
connection-oriented transports (e.g. TCP and TLS over TCP), the UAC flow is still active and useful for SIP traffic. The server responds
MAY use TCP keepalives to detect flow failure if the UAC can send to pings by sending pongs. If the client does not receive a pong in
these keepalives and detect a keepalive failure according to the time response to its ping, it declares the flow dead and opens a new flow
frames described in Section 4.4. in its place. In some environments, the server can also keep track
of the time since a ping was received over a flow to guess the
likelihood that the flow is still useful for delivering SIP messages.
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
back-off mechanism described in Section 4 to provide congestion
relief when a large number of agents simultaneously reboot.
A keepalive mechanism needs to keep NAT bindings refreshed; for
connections, it also needs to detect failure of a connection; and for
connectionless transports, it needs to detect flow failures including
changes to the NAT public mapping. For connection oriented
transports such as TCP and SCTP, this specification describes a
keepalive approach based on sending CRLFs, and for TCP, a usage of
TCP transport-layer keepalives. For connectionless, such as UDP or
DCCP, this specification describes using STUN [4] over the same flow
as the SIP traffic to perform the keepalive.
3.5.1. CRLF Keepalive Technique
This approach can only be used with connection-oriented transports
such as TCP or SCTP. The client periodically sends a double-CRLF
(the "ping") then waits to receive a single CRLF (the "pong"). If
the server does not receive a "pong" within an appropriate amount of
time, it considers the flow failed.
3.5.2. TCP Keepalive Technique
This approach can only be used when the transport protocol is TCP.
User Agents that are capable of generating per-connection TCP
keepalives can use TCP keepalives. When using this approach the
values of the keepalive timer are left to the client. Servers cannot
make any assumption about what values are used. If this is not
acceptable in the deployment, then the outbound-proxy-set needs to be
configured without this option.
Note: when TCP is being used, it's natural to think of using TCP Note: when TCP is being used, it's natural to think of using TCP
KEEPALIVE. Unfortunately, many operating systems and programming KEEPALIVE. Unfortunately, many operating systems and programming
environments do not allow the keepalive time to be set on a per- environments do not allow the keepalive time to be set on a per-
connection basis. Thus, applications may not be able to set an connection basis. Thus, applications may not be able to set an
appropriate time. appropriate time.
3.5.3. STUN Keepalive Technique
This technique can only be used for transports that are not
connection oriented such as UDP and DCCP.
For connection-less transports, a flow definition could change For connection-less transports, a flow definition could change
because a NAT device in the network path reboots and the resulting because a NAT device in the network path reboots and the resulting
public IP address or port mapping for the UA changes. To detect public IP address or port mapping for the UA changes. To detect
this, requests are sent over the same flow that is being used for the this, STUN requests are sent over the same flow that is being used
SIP traffic. The proxy or registrar acts as a STUN server on the SIP for the SIP traffic. The proxy or registrar acts as a Simple
signaling port. Traversal Underneath NATs (STUN) [4] server on the SIP signaling
port.
Note: The STUN mechanism is very robust and allows the detection Note: The STUN mechanism is very robust and allows the detection
of a changed IP address. Many other options were considered, but of a changed IP address. Many other options were considered, but
the SIP Working Group selected the STUN-based approach, since it the SIP Working Group selected the STUN-based approach.
works over any transport. Approaches using SIP requests were Approaches using SIP requests were abandoned because to achieve
abandoned because to achieve the required performance, the server the required performance, the server needs to deviate from the SIP
needs to deviate from the SIP specification in significant ways. specification in significant ways. This would result in many
This would result in many undesirable and non-deterministic undesirable and non-deterministic behaviors in some environments.
behaviors in some environments.
Another approach considered to detect a changed flow was using Another approach considered to detect a changed flow was using
OPTIONS messages and the rport parameter. Although the OPTIONS OPTIONS messages and the rport parameter. Although the OPTIONS
approach has the advantage of being backwards compatible, it also approach has the advantage of being backwards compatible, it also
significantly increases the load on the proxy or registrar server. significantly increases the load on the proxy or registrar server.
Related to this idea was an idea of creating a new SIP PING method Related to this idea was an idea of creating a new SIP PING method
that was like OPTIONS but faster. It would be critical that this that was like OPTIONS but faster. It would be critical that this
PING method did not violate the processing requirements of a PING method did not violate the processing requirements of a
proxies and UAS so it was never clear how it would be proxies and UAS so it was never clear how it would be
significantly faster than OPTIONS given it would still have to significantly faster than OPTIONS given it would still have to
obey things like checking the Proxy-Require header. After obey things like checking the Proxy-Require header. After
considerable consideration the working group came to some considerable consideration the working group came to some
consensus that the STUN approach was a better solution that these consensus that the STUN approach was a better solution than these
alternative designs. alternative designs.
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
back-off mechanism described in Section 4 to provide congestion
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 [5] as its instance-id. The UUID URN A UA SHOULD use a UUID URN [5] as its instance-id unless it is an
allows for non-centralized computation of a URN based on time, unique anonymous call and there are privacy reason not to include the
names (such as a MAC address), or a random number generator. instance-id in this particular message.. The UUID URN allows for
non-centralized computation of a URN based on time, unique names
(such as a MAC address), or a random number generator.
A device like a soft-phone, when first installed, can generate a A device like a soft-phone, when first installed, can generate a
UUID [5] and then save this in persistent storage for all future UUID [5] and then save this in persistent storage for all future
use. For a device such as a hard phone, which will only ever have use. For a device such as a hard phone, which will only ever have
a single SIP UA present, the UUID can include the MAC address and a single SIP UA present, the UUID can include the MAC address and
be generated at any time because it is guaranteed that no other be generated at any time because it is guaranteed that no other
UUID is being generated at the same time on that physical device. UUID is being generated at the same time on that physical device.
This means the value of the time component of the UUID can be This means the value of the time component of the UUID can be
arbitrarily selected to be any time less than the time when the arbitrarily selected to be any time less than the time when the
device was manufactured. A time of 0 (as shown in the example in device was manufactured. A time of 0 (as shown in the example in
skipping to change at page 13, line 28 skipping to change at page 14, line 19
are specific to the scheme in the URN. If the element performing are specific to the scheme in the URN. If the element performing
the comparisons does not understand the URN scheme, it performs the comparisons does not understand the URN scheme, it performs
the comparisons using the lexical equality rules defined in RFC the comparisons using the lexical equality rules defined in RFC
2141 [7]. Lexical equality could result in two URNs being 2141 [7]. Lexical equality could 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 lexicographically
different from previous registrations. different from previous registrations.
4.2. Initial Registrations 4.2. Registrations
At configuration time UAs obtain one or more SIP URIs representing At configuration time UAs obtain 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 can define additional mechanisms such as using future specifications can 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 SHOULD 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
skipping to change at page 15, line 28 skipping to change at page 16, line 17
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 [21] (Service but could include mechanisms specified in RFC 3608 [21] (Service
Route) and [20]. Route) and [20].
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 [9]) to find a protocol, IP address, and port. described in RFC 3263 [9]) to find a protocol, IP address, and port.
For non-TLS protocols, if the UA has an existing flow to this IP For protocols that don't use TLS, if the UA has an existing flow to
address, and port with the correct protocol, then the UA MUST use the this IP address, and port with the correct protocol, then the UA MUST
existing connection. For TLS protocols, there MUST also be a match use the existing connection. For TLS protocols, there MUST also be a
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.
The contact is formed normally in that uses the IP address of the
device (even if the device is behind a NAT) and unless there are
privacy reason not to include an instance-id, the contact SHOULD
include the instance-id media feature tag as specified in
Section 4.1.
Note that if the UA wants its flow to work through NATs or Note that if the UA wants its flow to work through NATs or
firewalls it still needs to put the 'rport' parameter [10] in its firewalls it still needs to put the 'rport' parameter [10] in its
Via header field value, and send from the port it is prepared to Via header field value, and send from the port it is prepared to
receive on. More general information about NAT traversal in SIP receive on. More general information about NAT traversal in SIP
is described in [22]. is described in [22].
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 Section 4.4.1 or using one of the techniques described in Section 4.4.1,
Section 4.4.2. If a flow has failed, the UA follows the procedures Section 4.4.2, or Section 4.4.3. If a flow has failed, the UA
in Section 4.2 to form a new flow to replace the failed one. follows the procedures in Section 4.2 to form a new flow to replace
the failed one.
The time between keepalive requests when using UDP-based transports The time between each keepalive requests when using non connection
SHOULD be a random number between 24 and 29 seconds while for TCP- based transports such as UDP SHOULD be a random number between 24 and
based transports it SHOULD be a random number between 95 and 120 29 seconds while for connection based transports such as TCP it
seconds. These times MAY be configurable. Issues such as battery SHOULD be a random number between 95 and 120 seconds. These times
consumption might motivate longer keepalive intervals. MAY be configurable. To clarify, the random number will be different
for each request. Issues such as battery consumption might motivate
longer keepalive intervals.
Note on selection of time values: For UDP, the upper bound of 29 Note on selection of time values: For UDP, the upper bound of 29
seconds was selected so that multiple STUN packets could be sent seconds was selected so that multiple STUN packets could be sent
before 30 seconds based on information that many NATs have UDP before 30 seconds based on information that many NATs have UDP
timeouts as low as 30 seconds. The 24 second lower bound was timeouts as low as 30 seconds. The 24 second lower bound was
selected so that after 10 minutes the jitter introduced by selected so that after 10 minutes the jitter introduced by
different timers will make the keepalive requests unsynchronized different timers will make the keepalive requests unsynchronized
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 normally will be detected in this amount user experience, failures normally will be detected in this amount
of time and a new connection set up. Operators that wish to of time and a new connection set up. Operators that wish to
change the relationship between load on servers and the expected change the relationship between load on servers and the expected
time that a user might not receive inbound communications will time that a user might not receive inbound communications will
probably adjust this time. The 95 seconds lower bound was chosen probably adjust this time. The 95 seconds lower bound was chosen
so that the jitter introduced will result in a relatively even so that the jitter introduced will result in a relatively even
load on the servers after 30 minutes. load on the servers after 30 minutes.
The client needs to perform normal RFC 3263 [9] SIP DNS resolution on
the URI from the outbound-proxy-set to pick a transport. Once a
transport is selected, the UA selects a keepalive approach that is
allowed for that transport and that is allowed by the server based on
the tags in the URI from the outbound-proxy-set. If the transport is
TCP and the URI contains both the 'keep-tcp' tag and the 'keep-crlf'
tag, then the client MAY choose either of these approaches based on
the preference of the client.
4.4.1. Keepalive with TCP KEEPALIVE 4.4.1. Keepalive with TCP KEEPALIVE
User Agents that are capable of generating per-connection TCP This approach MUST only be used with TCP.
keepalives with timer values consistent with those in this section
MAY use TCP keepalives instead of using STUN keepalives for TCP-based
flows.
4.4.2. Keepalive with STUN User Agents that form flows check if the configured URI they are
connecting to has a 'keep-tcp' URI parameter (defined in Section 12).
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 using the TCP Keepalive
mechanism. Not all environments can use this approach and it is not
mandatory to implement. Deployments that use it should also include
keep-crlf so that clients that do not implement this option but are
using TCP have an alternative approach to use.
4.4.2. Keepalive with CRLF
This approach MUST only be used with connection oriented transports
such as TCP or SCTP.
User Agents that form flows check if the configured URI they are
connecting to has a 'keep-crlf' URI parameter (defined in
Section 12). If the parameter is present and the UA is not already
performing keepalives using another supported mechanism, the UA MUST
send keep alives as described in this section.
For this mechanism, the client "ping" is a double-CRLF sequence, and
the server "pong" is a single CRLF, as defined in the ABNF below:
CRLF = CR LF
double-CRLF = CR LF CR LF
CR = 0x0d
LF = 0x0a
The ping and pong need to be sent between SIP messages and cannot be
sent in the middle of a SIP message. If a pong is not received
within 10 seconds (TODO - is 10 seconds the right amount of time)
then the client MUST treat the flow as failed. Clients MUST support
this CRLF keepalive.
4.4.3. Keepalive with STUN
This approach MUST only be used with transports that are not
connection oriented such as UDP or DCCP.
User Agents that form flows, check if the configured URI they are User Agents that form flows, check if the configured URI they are
connecting to has a 'keepalive' URI parameter (defined in Section 12) connecting to has a 'keep-stun' URI parameter (defined in
with the value of 'stun'. If the parameter is present and the UA is Section 12). If the parameter is present and the UA is not already
not already performing keepalives using another supported mechanism, performing keepalives using another supported mechanism, the UA MUST
the UA needs to periodically perform keepalive checks by sending STUN periodically perform keepalive checks by sending STUN [4] Binding
[4] Binding Requests over the flow as described in Section 8. Requests over the flow as described in Section 8. Clients MUST
support STUN based keepalive.
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.3. Flow Recovery 4.5. 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 amount of time to wait depends if the previous attempt at The amount of time to wait depends if the previous attempt at
establishing a flow was successful. For the purposes of this establishing a flow was successful. For the purposes of this
section, a flow is considered successful if outbound registration section, a flow is considered successful if outbound registration
succeeded and keepalives have not timed out for min-regtime seconds succeeded and keepalives have not timed out for 120 seconds after a
(default of 120 seconds) after a registration. For STUN-based registration. For STUN-based keepalives, this typically means three
keepalives, this means three successful STUN transactions over UDP or successful STUN transactions over UDP or one successful STUN
one successful STUN transaction over TCP. If a flow is established transaction over TCP. If a flow is established and is alive after
and is alive after this amount of time, the number of consecutive this amount of time, the number of consecutive registration failures
registration failures is set to zero. Each time a flow fails before is set to zero. Each time a flow fails before two minutes, the
two minutes, the number of consecutive registration failures is number of consecutive registration failures is incremented by one.
incremented by one. Note that a failure during the initial STUN Note that a failure during the initial STUN validation does not count
validation does not count against the number of consecutive against the number of consecutive registration failures.
registration failures.
The number of seconds to wait is computed in the following way. If 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, 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 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 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 seconds. The wait time is computed by taking two raised to the power
of the number of consecutive registration failures for that URI, and of the number of consecutive registration failures for that URI, and
multiplying this by the base time, up to a maximum of 1800 seconds. 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 times MAY be configurable in the UA. The four times are: These times MAY be configurable in the UA. The three times 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
o min-regtime with a default of 120 seconds
For example, if the base time is 30 seconds, and there were three For example, if the base time is 30 seconds, and there were three
failures, then the wait time is min(1800,30*(2^3)) or 240 seconds. failures, then the wait time is min(1800,30*(2^3)) or 240 seconds.
The delay time is computed by selecting a uniform random time between The delay time is computed by selecting a uniform random time between
50 and 100 percent of the wait time. The UA MUST wait for the value 50 and 100 percent of the wait time. The UA MUST wait for the value
of the delay time before trying another registration to form a new of the delay time before trying another registration to form a new
flow for that URI. 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
skipping to change at page 20, line 29 skipping to change at page 22, line 15
specification. However, an approach such as having the Edge Proxy specification. However, an approach such as having the Edge Proxy
Record-Route with a flow token is one way to ensure that mid-dialog Record-Route with a flow token is one way to ensure that mid-dialog
requests are routed over the correct flow. requests are routed over the correct flow.
5.4. Edge Proxy Keepalive Handling 5.4. Edge Proxy Keepalive Handling
All edge proxies compliant with this specification MUST implement All edge proxies compliant with this specification MUST implement
support for the STUN NAT Keepalive usage on its SIP ports as support for the STUN NAT Keepalive usage on its SIP ports as
described in Section 8. described in Section 8.
When a server receives a double-CRLF sequence on a connection
oriented transport such as TCP or SCTP, it MUST immediately responds
with a single CRLF over the same connection.
6. Registrar Mechanisms: Processing REGISTER Requests 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
[1] Section 10 and RFC 3327 [3] Section 5.3. [1] Section 10 and RFC 3327 [3] Section 5.3.
When no +sip.instance media feature parameter is present in a Contact When no +sip.instance media feature parameter is present in a Contact
header field value in a REGISTER request, the corresponding binding header field value in a REGISTER request, the corresponding binding
is still between an AOR and the URI from that Contact header field is still between an AOR and the URI from that Contact header field
value. When a +sip.instance media feature parameter is present in a value. When a +sip.instance media feature parameter is present in a
Contact header field value in a REGISTER request, the corresponding Contact header field value in a REGISTER request, the corresponding
skipping to change at page 22, line 6 skipping to change at page 23, line 45
responses to REGISTER requests for which it has performed outbound responses to REGISTER requests for which it has performed outbound
processing. The Registrar MAY be configured with local policy to processing. The Registrar MAY be configured with local policy to
reject any registrations that do not include the instance-id and reject any registrations that do not include the instance-id and
reg-id. Note that the requirements in this section applies to both reg-id. Note that the requirements in this section applies to both
REGISTER requests received from an Edge Proxy as well as requests REGISTER requests received from an Edge Proxy as well as requests
received directly from the UAC. received directly from the UAC.
To be compliant with this specification, registrars which can receive To be compliant with this specification, registrars which can receive
SIP requests directly from a UAC without intervening edge proxies SIP requests directly from a UAC without intervening edge proxies
MUST implement the STUN NAT Keepalive usage on its SIP ports as MUST implement the STUN NAT Keepalive usage on its SIP ports as
described in Section 8. described in Section 8 and when it receives a double-CRLF sequence on
a connection oriented transport such as TCP or SCTP, it MUST
immediately respond with a single CRLF over the same connection.
7. Authoritative Proxy Mechanisms: Forwarding Requests 7. Authoritative Proxy Mechanisms: 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 430 (Flow for a particular AOR and instance-id fails with a 430 (Flow
skipping to change at page 23, line 9 skipping to change at page 24, line 51
set that use that flow (regardless of AOR). Examples of this are a set that use that flow (regardless of AOR). Examples of this are a
TCP socket closing or receiving a destination unreachable ICMP error TCP socket closing or receiving a destination unreachable ICMP error
on a UDP flow. Similarly, if a proxy closes a file descriptor, it on a UDP flow. Similarly, if a proxy closes a file descriptor, it
MUST invalidate all the bindings in the target set with flows that MUST invalidate all the bindings in the target set with flows that
use that file descriptor. use that file descriptor.
8. STUN Keepalive Processing 8. STUN Keepalive Processing
This section describes changes to the SIP transport layer that allow This section describes changes to the SIP transport layer that allow
SIP and the STUN [4] NAT Keepalive usage to be mixed over the same SIP and the STUN [4] NAT Keepalive usage to be mixed over the same
flow. The STUN messages are used to verify connectivity is still flow. The STUN messages are used to verify that connectivity is
available over a flow and to provide periodic keepalives. Note that still available over a UDP flow, and to provide periodic keepalives.
these STUN keepalives are always sent to the next SIP hop. STUN Note that these STUN keepalives are always sent to the next SIP hop.
messages are not delivered end-to-end. STUN messages are not delivered end-to-end.
The only STUN messages required by this usage are Binding Requests, The 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 that is used for sending SIP
for sending SIP messages. These Binding Requests do not require any messages. These Binding Requests do not require any STUN attributes.
STUN attributes. The UAS responds to a valid Binding Request with a The UAS responds to a valid Binding Request with a Binding Response
Binding Response which MUST include the XOR-MAPPED-ADDRESS attribute. which MUST include the XOR-MAPPED-ADDRESS attribute.
After a successful STUN response is received over TCP or TLS over
TCP, the underlying TCP connection is left in the active state.
If a server compliant to this section receives SIP requests on a If a server compliant to this section receives SIP requests on a
given interface and port, it MUST also provide a limited version of a given interface and port, it MUST also provide a limited version of a
STUN server on the same interface and port as described in Section STUN server on the same interface and port as described in Section
12.3 of [4]. When STUN messages are sent with a SIP over TLS over 12.3 of [4].
TCP flow, the STUN messages are sent inside the TLS-protected
channel.
It is easy to distinguish STUN and SIP packets sent over UDP, It is easy to distinguish STUN and SIP packets sent over UDP,
because the first octet of a STUN packet has a value of 0 or 1 because the first octet of a STUN packet has a value of 0 or 1
while the first octet of a SIP message is never a 0 or 1. For TCP while the first octet of a SIP message is never a 0 or 1.
or TLS over TCP flows, determining if the first octet of the next
message in a stream is SIP or STUN is still straightforward. As
with any stream-based protocol, implementations need to be
prepared 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 Because sending and receiving binary STUN data on the same ports used
for SIP is a significant and non-backwards compatible change to RFC for SIP is a significant and non-backwards compatible change to RFC
3261, this section requires a number of checks before sending STUN 3261, this section requires a number of checks before sending STUN
messages to a SIP node. If a SIP node sends STUN requests (for messages to a SIP node. If a SIP node sends STUN requests (for
example due to misconfiguration) despite these warnings, the node example due to incorrect configuration) despite these warnings, the
could be blacklisted for UDP traffic, or cause its TCP server to node could be blacklisted for UDP traffic. For each target node (as
loose framing over its connection. For each target node (as
determined by IP address, address family, and port number), the determined by IP address, address family, and port number), the
sender needs to determine if that destination is validated to support sender needs to determine if that destination is validated to support
STUN, that it does not support STUN, or that it needs to be STUN, that it does not support STUN, or that it needs to be
validated. validated.
When a URI is created that refers to a SIP node that supports STUN as When a URI is created that refers to a SIP node that supports STUN as
described in this section, the 'keepalive' URI parameter, as defined described in this section, the 'keep-stun' URI parameter, as defined
in Section 12 SHOULD be added to the URI, with a value of 'stun'. in Section 12 SHOULD be added to the URI. This allows a UA to
This allows a UA to inspect the URI to decide if it should attempt to inspect the URI to decide if it should attempt to send STUN requests
send STUN requests to this location. For example, an edge proxy to this location. For example, an edge proxy could insert this
could insert this parameter into its Path URI so that the registering parameter into its Path URI so that the registering UA can discover
UA can discover the edge proxy supports STUN keepalives. the edge proxy supports STUN keepalives.
A SIP node MUST NOT send STUN requests over a flow unless it has an 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 explicit indication that the target next hop SIP server claims to
support STUN. For example, automatic or manual configuration of an support STUN. For example, automatic or manual configuration of an
outbound-proxy-set which contains the keepalive=stun parameter is outbound-proxy-set which contains the 'keep-stun' parameter, or
received the parameter in the Path header of the edge proxy, is
considered sufficient explicit indication. Note that UACs MUST NOT considered sufficient explicit indication. Note that UACs MUST NOT
use an ambiguous configuration option such as "Work through NATs?" or use an ambiguous configuration option such as "Work through NATs?" or
"Do Keepalives?" to imply next hop STUN support. A SIP node MAY also "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 probe the next hop using a SIP OPTIONS request to check for support
of the 'sip-stun' option tag in a Supported header field. of the 'sip-stun' option tag in a Supported header field.
Furthermore, even with explicit indication of next hop STUN support, Furthermore, even with explicit indication of next hop STUN support,
a SIP node needs to validate support for STUN the first time it sends a SIP node needs to validate support for STUN the first time it sends
traffic to a specific invalidated target destination. A SIP node MAY STUN traffic to a specific invalidated target destination. A SIP
send one STUN request and its retransmissions to an invalidated node MAY send one STUN request and its retransmissions to an
destination. If a STUN request ever succeeds to a destination, that invalidated destination. If a STUN request ever succeeds to a
destination is thereafter validated for STUN support. If this destination, that destination is thereafter validated for STUN
initial STUN request does not result in a STUN response, the SIP node support. If this initial STUN request does not result in a STUN
MUST NOT send additional STUN requests over this flow, unless a next- response, the SIP node MUST NOT send additional STUN requests over
hop probe later validates the destination. In addition, the SIP node this flow, unless a next-hop probe later validates the destination.
SHOULD remember invalidated destination nodes that have been used In addition, the SIP node SHOULD remember invalidated destination
within one hour and SHOULD NOT send additional STUN messages to any nodes that have been used within one hour and SHOULD NOT send
of these destinations. additional STUN messages to any of these destinations.
If this initial STUN request does not result in a STUN response, the If this initial STUN request does not result in a STUN response, the
UA MAY send and explicit next-hop probe as described in Section 8.1. UA MAY send and explicit next-hop probe as described in Section 8.1.
If an explicit probe indicates support for the 'sip-stun' option-tag, If an explicit probe indicates support for the 'sip-stun' option-tag,
that destination is validated for STUN support. If an explicit probe that destination is validated for STUN support. If an explicit probe
does not indicate support for the 'sip-stun' option-tag, the target does not indicate support for the 'sip-stun' option-tag, the target
destination does not support STUN request, and the UAC MUST NOT send destination does not support STUN request, and the UAC MUST NOT send
further STUN requests to this destination. further STUN requests to this destination.
Note that until STUN support has been verified, an initial STUN Note that until STUN support has been verified, an initial STUN
failure over UDP is not considered a flow failure. For UDP flows, an failure over UDP is not considered a flow failure. For UDP flows, an
invalidated flow can still be reused for SIP traffic, however for invalidated flow can still be reused for SIP traffic.
invalidated 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 Typically, a SIP node first sends a SIP request and waits to
receive a final response (other than a 408 response) over a flow receive a final response (other than a 408 response) over a flow
to a new target destination, before sending any STUN messages. to a new target destination, before sending any STUN messages.
When scheduled for the next NAT refresh, the SIP node sends a STUN When scheduled for the next NAT refresh, the SIP node sends a STUN
request to the target. If none of the STUN requests succeed request to the target. If none of the STUN requests succeed
(result in a STUN success response), and the UAC has not already (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 done so, the UAC sends an OPTIONS request to the next hop to
verify support for the 'sip-stun' option-tag. verify support for the 'sip-stun' option-tag.
skipping to change at page 25, line 21 skipping to change at page 27, line 5
failure of the underlying flow. For SIP over UDP flows, if the XOR- failure of the underlying flow. For SIP over UDP flows, if the XOR-
MAPPED-ADDRESS returned over the flow changes, this indicates that MAPPED-ADDRESS returned over the flow changes, this indicates that
the underlying connectivity has changed, and is considered a flow the underlying connectivity has changed, and is considered a flow
failure. A 408 response to a next-hop OPTIONS probe is also failure. A 408 response to a next-hop OPTIONS probe is also
considered a flow failure. considered a flow failure.
Note that failure of a flow causes a new flow to be formed and that Note that failure of a flow causes a new flow to be formed and that
the STUN validation needs to be done for this new flow even if it is the STUN validation needs to be done for this new flow even if it is
to a destination that had previously been validated for STUN. to a destination that had previously been validated for STUN.
8.1. Explicit Probes 8.1. Explicit Option Probes
This section defines a new SIP option-tag called 'sip-stun'. This section defines a new SIP option-tag called 'sip-stun'.
Advertising this option-tag indicates that the server can receive SIP Advertising this option-tag indicates that the server can receive SIP
messages and STUN messages as part of the NAT Keepalive usage on the 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 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 support for STUN, can send an OPTIONS request to the next hop by
setting the Max-Forwards header field to zero or addressing the setting the Max-Forwards header field to zero or addressing the
request to that server. The OPTIONS response will contain a request to that server. The OPTIONS response will contain a
Supported header field with a list of the server's supported option- Supported header field with a list of the server's supported option-
tags. tags.
skipping to change at page 26, line 16 skipping to change at page 27, line 45
bits of the first byte are set to one) that does not occur in 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 UTF-8 encoded text messages [RFC-2279], so for applications which
use this encoding (or ASCII encoding) it is possible to multiplex use this encoding (or ASCII encoding) it is possible to multiplex
uncompressed application messages and SigComp messages on the same uncompressed application messages and SigComp messages on the same
UDP port. UDP port.
The most significant two bits of every STUN message are both The most significant two bits of every STUN message are both
zeroes. This, combined with the magic cookie, aids in zeroes. This, combined with the magic cookie, aids in
differentiating STUN packets from other protocols when STUN is differentiating STUN packets from other protocols when STUN is
multiplexed with other protocols on the same port. 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 Section 11 of [24].
Because the bytecodes expressed in the well-known shim header do
not store any state, correlation of such SigComp requests to a
compartment is not necessary. To avoid ambiguity, we add the
following requirement: any SigComp state that might result from a
message that, once decompressed, turns out to be a STUN message,
MUST be discarded.
9. Example Message Flow 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.
skipping to change at page 27, line 49 skipping to change at page 29, line 4
| | | | | | | |
|(15) BYE | | | |(15) BYE | | |
|---------------->| | | |---------------->| | |
| | (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:pri.example.com;lr;keepalive=stun" proxy set that consists of "sip:pri.example.com;lr;keep-stun" and
and "sip:sec.example.com;lr;keepalive=stun". The Callee REGISTER in "sip:sec.example.com;lr;keep-stun". The Callee REGISTER in message
message (1) looks like: (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:pri.example.com;lr;keepalive=stun> Route: <sip:pri.example.com;lr;keep-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 29, line 13 skipping to change at page 30, 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:sec.example.com;lr;keepalive=stun> Route: <sip:sec.example.com;lr;keep-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 31, line 14 skipping to change at page 32, line 14
the RFC number of this specification.] the RFC number of this specification.]
12.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 [16]. The required registry as per the registry created by [16]. The required
information is: information is:
Parameter Name Predefined Values Reference Parameter Name Predefined Values Reference
____________________________________________ ____________________________________________
keepalive stun [RFC AAAA] keep-stun [RFC AAAA]
keep-tcp [RFC AAAA]
keep-crlf [RFC AAAA]
ob [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.]
12.3. SIP Option Tag 12.3. SIP Option Tag
This specification registers two new SIP option tags, 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.
skipping to change at page 33, line 30 skipping to change at page 34, line 31
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.
14. Operational Notes on Transports 14. Operational Notes on Transports
RFC 3261 requires proxies, registrars, and UA to implement both TCP RFC 3261 requires proxies, registrars, and UA to implement both TCP
and UDP but deployments can chose which protocols they want to use. and UDP but deployments can chose which transport protocols they want
Deployments need to be careful in choosing what transports to use. to use. Deployments need to be careful in choosing what transports
Many SIP features and extensions, such as large presence to use. Many SIP features and extensions, such as large presence
subscriptions packages, result in SIP requests that can be too large subscriptions packages, result in SIP requests that can be too large
to be reasonably transported over UDP. RFC 3261 has an option of to be reasonably transported over UDP. RFC 3261 has an option of
when a request is too large for UDP, the device sending the request when a request is too large for UDP, the device sending the request
can attempt to switch over to TCP. No known deployments currently can attempt to switch over to TCP. No known deployments currently
use this but it is important to note that when using outbound, this use this but it is important to note that when using outbound, this
will only work if the UA has formed both a UDP and TCP outbound will only work if the UA has formed both a UDP and TCP outbound
connection. The specification allows the UA to do this but in most connection. The specification allows the UA to do this but in most
cases it will probably make more sense to only form TCP outbound cases it will probably make more sense to only form TCP outbound
connection than forming both UDP and TCP. One of the key reasons connection than forming both UDP and TCP. One of the key reasons
that many deployments choose not to use TCP has to do with the that many deployments choose not to use TCP has to do with the
skipping to change at page 34, line 18 skipping to change at page 35, line 18
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.
16. Changes 16. Open Issues
This draft documents what having CRLF keep alives would look like so
that the working group can decide if they want to do this or not.
Having multiple keep alive options that are only valid with some
transports, combined with SRV providing multiple transport options,
opens the possibility for configurations that make no sense and cause
the system to fail. For example, if the outbound proxy set is sip:
example.com;keep-tcp and the SRV only resolves to a UDP transports,
the system will not work.
17. Changes
Note to RFC Editor: Please remove this whole section. Note to RFC Editor: Please remove this whole section.
16.1. Changes from 06 Version 17.1. Changes from 07 Version
Add language to show the working group what adding CRLF keepalives
would look like.
Changed syntax of keep-alive=stun to keep-stun so that it was easier
to support multiple tags in the same URI.
17.2. Changes from 06 Version
Added the section on operational selection of transports. Added the section on operational selection of transports.
Fixed various editorial typos. Fixed various editorial typos.
Put back in requirement flow token needs to be unique to flow as it Put back in requirement flow token needs to be unique to flow as it
had accidentally been dropped in earlier version. This did not had accidentally been dropped in earlier version. This did not
change any of the flow token algorithms. change any of the flow token algorithms.
Reordered some of the text on STUN keepalive validation to make it Reordered some of the text on STUN keepalive validation to make it
clearer to implementors. Did not change the actual algorithm or clearer to implementors. Did not change the actual algorithm or
requirements. Added note to explain how if the proxy changes, the requirements. Added note to explain how if the proxy changes, the
revalidation will happen. revalidation will happen.
16.2. Changes from 05 Version 17.3. Changes from 05 Version
Mention the relevance of the 'rport' parameter. Mention the relevance of the 'rport' parameter.
Change registrar verification so that only first-hop proxy and the Change registrar verification so that only first-hop proxy and the
registrar need to support outbound. Other intermediaries in between registrar need to support outbound. Other intermediaries in between
do not any more. do not any more.
Relaxed flow-token language slightly. Instead of flow-token saving Relaxed flow-token language slightly. Instead of flow-token saving
specific UDP address/port tuples over which the request arrived, make specific UDP address/port tuples over which the request arrived, make
language fuzzy to save token which points to a 'logical flow' that is language fuzzy to save token which points to a 'logical flow' that is
known to deliver data to that specific UA instance. known to deliver data to that specific UA instance.
Added comment that keepalive=stun could be added to Path. Added comment that keep-stun could be added to Path.
Added comment that battery concerns could motivate longer TCP Added comment that battery concerns could motivate longer TCP
keepalive intervals than the defaults. keepalive intervals than the defaults.
Scrubbed document for avoidable lowercase mays, shoulds, and musts. Scrubbed document for avoidable lowercase may, should, and must.
Added text about how Edge Proxies could determine they are the first Added text about how Edge Proxies could determine they are the first
hop. hop.
16.3. Changes from 04 Version 17.4. Changes from 04 Version
Moved STUN to a separate section. Reference this section from within Moved STUN to a separate section. Reference this section from within
the relevant sections in the rest of the document. the relevant sections in the rest of the document.
Add language clarifying that UA MUST NOT send STUN without an Add language clarifying that UA MUST NOT send STUN without an
explicit indication the server supports STUN. explicit indication the server supports STUN.
Add language describing that UA MUST stop sending STUN if it appears Add language describing that UA MUST stop sending STUN if it appears
the server does not support it. the server does not support it.
skipping to change at page 35, line 48 skipping to change at page 37, line 19
Change UAC MUST-->SHOULD register a flow for each member of outbound- Change UAC MUST-->SHOULD register a flow for each member of outbound-
proxy-set. proxy-set.
Reworded registrar and proxy in some places (introduce the term Reworded registrar and proxy in some places (introduce the term
"Authoritative Proxy"). "Authoritative Proxy").
Loosened restrictions on always storing a complete Path vector back Loosened restrictions on always storing a complete Path vector back
to the registrar/authoritative proxy if a previous hop in the path to the registrar/authoritative proxy if a previous hop in the path
vector is reachable. vector is reachable.
Added comment about reregistration typically happening over same flow Added comment about re-registration typically happening over same
as original registration. flow as original registration.
Changed 410 Gone to new response code 430 Flow Failed. Was going to Changed 410 Gone to new response code 430 Flow Failed. Was going to
change this to 480 Temporarily Unavailable. Unfortunately this would change this to 480 Temporarily Unavailable. Unfortunately this would
mean that the authoritative proxy deletes all flows of phones who use mean that the authoritative proxy deletes all flows of phones who use
480 for Do Not Disturb. Oops! 480 for Do Not Disturb. Oops!
Restored sanity by restoring text which explains that registrations Restored sanity by restoring text which explains that registrations
with the same reg-id replace the old registration. with the same reg-id replace the old registration.
Added text about the 'ob' parameter which is used in Path header 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 field URIs to make sure that the previous proxy that added a Path
understood outbound processing. The registrar doesn't include understood outbound processing. The registrar doesn't include
Supported: outbound unless it could actually do outbound processing Supported: outbound unless it could actually do outbound processing
(ex: any Path headers have to have the 'ob' parameter). (ex: any Path headers have to have the 'ob' parameter).
Added some text describing what a registration means when there is an Added some text describing what a registration means when there is an
instance-id, but no reg-id. instance-id, but no reg-id.
16.4. Changes from 03 Version 17.5. 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
over the flow over which the request is received if the request over the flow over which the request is received if the request
happens to contain a flow token for that flow. This was an happens to contain a flow token for that flow. This was an
oversight. oversight.
Updated example message flow to show a failover example using a new Updated example message flow to show a fail-over example using a new
dialog-creating request instead of a mid-dialog request. The old dialog-creating request instead of a mid-dialog request. The old
scenario was leftover from before the outbound/gruu reorganization. scenario was leftover from before the outbound/gruu reorganization.
Fixed tags, Call-IDs, and branch parameters in the example messages. Fixed tags, Call-IDs, and branch parameters in the example messages.
Made the ABNF use the "=/" production extension mechanism recommended Made the ABNF use the "=/" production extension mechanism recommended
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 steaks. Fixed many typos and spelling steaks.
16.5. Changes from 02 Version 17.6. 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.
16.6. Changes from 01 Version 17.7. Changes from 01 Version
Moved definition of instance-id from GRUU[25] draft to this draft. Moved definition of instance-id from GRUU[24] draft to 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
16.7. Changes from 00 Version 17.8. 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.
17. Acknowledgments 18. 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, Lyndsay Campbell, and Erkki Worely, Juha Heinanen, Eric Rescorla, Lyndsay Campbell, Christer
Koivusalo. Holmberg, Kevin Johns, 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.3 are configurable. If the base-time-all- described in Section 4.5 are configurable. If the base-time-all-fail
fail value is set to the default of 30 seconds and the base-time-not- 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 |
+-------------------+--------------------+--------------------+ +-------------------+--------------------+--------------------+
18. References 19. References
18.1. Normative References 19.1. Normative References
[1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., [1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP:
Session Initiation Protocol", RFC 3261, June 2002. Session Initiation Protocol", RFC 3261, June 2002.
[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997. Levels", BCP 14, RFC 2119, March 1997.
[3] Willis, D. and B. Hoeneisen, "Session Initiation Protocol (SIP) [3] Willis, D. and B. Hoeneisen, "Session Initiation Protocol (SIP)
Extension Header Field for Registering Non-Adjacent Contacts", Extension Header Field for Registering Non-Adjacent Contacts",
skipping to change at page 39, line 47 skipping to change at page 41, line 18
Protocol (SIP)", BCP 98, RFC 3968, December 2004. Protocol (SIP)", BCP 98, RFC 3968, December 2004.
[16] Camarillo, G., "The Internet Assigned Number Authority (IANA) [16] Camarillo, G., "The Internet Assigned Number Authority (IANA)
Uniform Resource Identifier (URI) Parameter Registry for the Uniform Resource Identifier (URI) Parameter Registry for the
Session Initiation Protocol (SIP)", BCP 99, RFC 3969, Session Initiation Protocol (SIP)", BCP 99, RFC 3969,
December 2004. December 2004.
[17] Holtman, K., Mutz, A., and T. Hardie, "Media Feature Tag [17] Holtman, K., Mutz, A., and T. Hardie, "Media Feature Tag
Registration Procedure", BCP 31, RFC 2506, March 1999. Registration Procedure", BCP 31, RFC 2506, March 1999.
18.2. Informative References 19.2. Informative References
[18] Petrie, D., "A Framework for Session Initiation Protocol User [18] Petrie, D., "A Framework for Session Initiation Protocol User
Agent Profile Delivery", draft-ietf-sipping-config-framework-09 Agent Profile Delivery", draft-ietf-sipping-config-framework-09
(work in progress), October 2006. (work in progress), October 2006.
[19] Hakala, J., "Using National Bibliography Numbers as Uniform [19] Hakala, J., "Using National Bibliography Numbers as Uniform
Resource Names", RFC 3188, October 2001. Resource Names", RFC 3188, October 2001.
[20] Rosenberg, J., "Construction of the Route Header Field in the [20] Rosenberg, J., "Construction of the Route Header Field in the
Session Initiation Protocol (SIP)", Session Initiation Protocol (SIP)",
skipping to change at page 40, line 25 skipping to change at page 41, line 44
Registration", RFC 3608, October 2003. Registration", RFC 3608, October 2003.
[22] Boulton, C., "Best Current Practices for NAT Traversal for [22] Boulton, C., "Best Current Practices for NAT Traversal for
SIP", draft-ietf-sipping-nat-scenarios-05 (work in progress), SIP", draft-ietf-sipping-nat-scenarios-05 (work in progress),
June 2006. June 2006.
[23] Price, R., Bormann, C., Christoffersson, J., Hannu, H., Liu, [23] Price, R., Bormann, C., Christoffersson, J., Hannu, H., Liu,
Z., and J. Rosenberg, "Signaling Compression (SigComp)", Z., and J. Rosenberg, "Signaling Compression (SigComp)",
RFC 3320, January 2003. RFC 3320, January 2003.
[24] Surtees, A., "Implementer's Guide for SigComp", [24] Rosenberg, J., "Obtaining and Using Globally Routable User
draft-ietf-rohc-sigcomp-impl-guide-08 (work in progress),
October 2006.
[25] 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-11 (work in progress), (SIP)", draft-ietf-sip-gruu-11 (work in progress),
October 2006. October 2006.
Authors' Addresses Authors' Addresses
Cullen Jennings (editor) Cullen Jennings (editor)
Cisco Systems Cisco Systems
170 West Tasman Drive 170 West Tasman Drive
Mailstop SJC-21/2 Mailstop SJC-21/2
skipping to change at page 42, line 7 skipping to change at page 43, line 7
Rohan Mahy (editor) Rohan Mahy (editor)
Plantronics Plantronics
345 Encincal St 345 Encincal St
Santa Cruz, CA 95060 Santa Cruz, CA 95060
USA USA
Email: rohan@ekabal.com Email: rohan@ekabal.com
Full Copyright Statement Full Copyright Statement
Copyright (C) The Internet Society (2007). Copyright (C) The IETF Trust (2007).
This document is subject to the rights, licenses and restrictions This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors contained in BCP 78, and except as set forth therein, the authors
retain all their rights. retain all their rights.
This document and the information contained herein are provided on an This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property Intellectual Property
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
 End of changes. 74 change blocks. 
238 lines changed or deleted 335 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/