One document matched: draft-ietf-sip-outbound-11.xml


<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="no"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc colonspace='yes' ?>
<rfc category="std" docName="draft-ietf-sip-outbound-11" ipr="full3978"
     updates="3261,3327">
  <front>
    <title abbrev="Client Initiated Connections in SIP">Managing Client
    Initiated Connections in the Session Initiation Protocol (SIP)</title>

    <author fullname="Cullen Jennings" initials="C." role="editor"
            surname="Jennings">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>170 West Tasman Drive</street>

          <street>Mailstop SJC-21/2</street>

          <city>San Jose</city>

          <region>CA</region>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <phone>+1 408 902-3341</phone>

        <email>fluffy@cisco.com</email>
      </address>
    </author>

    <author fullname="Rohan Mahy" initials="R." role="editor" surname="Mahy">
      <organization>Plantronics</organization>

      <address>
        <postal>
          <street>345 Encincal St</street>

          <city>Santa Cruz</city>

          <region>CA</region>

          <code>95060</code>

          <country>USA</country>
        </postal>

        <email>rohan@ekabal.com</email>
      </address>
    </author>

    <date day="18" month="November" year="2007" />

    <abstract>
      <t>The Session Initiation Protocol (SIP) allows proxy servers to
      initiate TCP connections and send asynchronous UDP datagrams to User
      Agents in order to deliver requests. However, many practical
      considerations, such as the existence of firewalls and Network Address
      Translators (NATs), prevent servers from connecting to User Agents in
      this way. This specification defines behaviors for User Agents,
      registrars and proxy servers that allow requests to be delivered on
      existing connections established by the User Agent. It also defines keep
      alive behaviors needed to keep NAT bindings open and specifies the usage
      of multiple connections from the User Agent to its Registrar.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>There are many environments for <xref target="RFC3261">SIP</xref>
      deployments in which the User Agent (UA) can form a connection to a
      Registrar or Proxy but in which connections in the reverse direction to
      the UA are not possible. This can happen for several reasons.
      Connections to the UA can be blocked by a firewall device between the UA
      and the proxy or registrar, which will only allow new connections in the
      direction of the UA to the Proxy. Similarly a NAT could be present,
      which is only capable of allowing new connections from the private
      address side to the public side. This specification allows a SIP User Agent
      behind such a firewall or NAT to receive inbound traffic associated with
      registrations or dialogs that it initiates.</t>

      <t>Most IP phones and personal computers get their network
      configurations dynamically via a protocol such as DHCP (Dynamic Host
      Configuration Protocol). These systems typically do not have a 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
      subjectAltName of a certificate, as required by <xref
      target="RFC3261" />. However, these systems can still act as a 
      Transport Layer Security (TLS) <xref target="RFC4346"/>
      client and form connections to a proxy or registrar which authenticates
      with a server certificate. The server can authenticate the UA using a
      shared secret in a digest challenge (as defined in Section 22 of RFC 3261) 
      over that TLS connection.</t>

      <t>The key idea of this specification is that when a UA sends a REGISTER
      or a dialog-forming 
      request, the proxy can later use this same network "flow"--whether this
      is a bidirectional stream of UDP datagrams, a TCP connection, or an
      analogous concept of another transport protocol--to forward any incoming requests
      that need to go to this UA in the context of the registration or dialog.</t>
      
      <t>For a UA to receive incoming 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 active. This requires the
      UA to detect when a flow fails. Since such detection takes time and
      leaves a window of opportunity for missed incoming requests, this
      mechanism allows the UA to register over multiple flows at the same time.
      This specification also defines multiple keepalive schemes. The
      keepalive mechanism is used to keep NAT bindings fresh, and to allow the
      UA to detect when a flow has failed.</t>
    </section>

    <section title="Conventions and Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>

      <section title="Definitions">
        <t>
          <list style="hanging">
            <t hangText="Authoritative Proxy:">A proxy that handles
            non-REGISTER requests for a specific Address-of-Record (AOR),
            performs the logical Location Server lookup described in RFC 3261,
            and forwards those requests to specific Contact URIs.</t>

            <t hangText="Edge Proxy:">An Edge Proxy is any proxy that is
            located topologically between the registering User Agent and the
            Authoritative Proxy.</t>

            <t hangText="Flow:">A Flow is a network protocol layer (layer 4)
            association between two hosts that is represented by the network
            address and port number of both ends and by the protocol. For TCP,
            a flow is equivalent to a TCP connection. For UDP a flow is a
            bidirectional stream of datagrams between a single pair of IP
            addresses and ports of both peers. With TCP, a flow often has a
            one to one correspondence with a single file descriptor in the
            operating system.</t>

            <t hangText="reg-id:">This refers to the value of a new header
            field parameter value for the Contact header field. When a UA
            registers multiple times, each concurrent registration gets a
            unique reg-id value.</t>

            <t hangText="instance-id:">This specification uses the word
            instance-id to refer to the value of the "sip.instance" media
            feature tag in the Contact header field. This is a Uniform
            Resource Name (URN) that uniquely identifies this specific UA
            instance.</t>

            <t hangText="outbound-proxy-set:">A set of SIP URIs (Uniform
            Resource Identifiers) that represents each of the outbound proxies
            (often Edge Proxies) with which the UA will attempt to maintain a
            direct flow. The first URI in the set is often referred to as the
            primary outbound proxy and the second as the secondary outbound
            proxy. There is no difference between any of the URIs in this set,
            nor does the primary/secondary terminology imply that one is
            preferred over the other.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Overview">
      <t>The mechanisms defined in this document are useful in several scenarios
      discussed
      below, including the simple co-located registrar and proxy, a User Agent
      desiring multiple connections to a resource (for redundancy, for
      example), and a system that uses Edge Proxies.</t>

      <section title="Summary of Mechanism">
        <t>The overall approach is fairly simple. Each UA has a unique
        instance-id that stays the same for this UA even if the UA reboots or
        is power cycled. Each UA can register multiple times over different
        connections for the same SIP Address of Record (AOR) to achieve high
        reliability. Each registration includes the instance-id for the UA and
        a reg-id label that is different for each flow. The registrar can use
        the instance-id to recognize that two different registrations both
        reach the same UA. The registrar can use the reg-id label to recognize
        whether a UA is creatin a new flow or refreshing or replacing an old one,
        possibly after a reboot or a network failure.</t>

        <t>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
        registration has been completed. A failure to deliver a request on a 
        particular flow can be
        tried again on an alternate flow. Proxies can determine which 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 the
        reg-id.</t>

        <t>UAs can use a simple periodic message as a keepalive mechanism to
        keep their flow to the proxy or registrar alive. For connection
        oriented 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 profile of
        <xref target="I-D.ietf-behave-rfc3489bis">STUN (Session Traversal
        Utilities for NAT)</xref>.</t>
        
        <t>The UA can also ask its first hop proxy to use an specific flow for 
        subsequent messages when sending a dialog-forming request. This allows
        the UA to setup a subscription dialog for the 
        <xref target="I-D.ietf-sipping-config-framework">SIP configuration package</xref>
        before the UA registers.</t>
      </section>

      <section anchor="example-single" title="Single Registrar and UA">
        <t>In the topology shown below, a single server is acting as both a
        registrar and proxy.</t>

        <figure>
          <artwork><![CDATA[
   +-----------+    
   | Registrar |    
   | Proxy     |    
   +-----+-----+    
         |          
         |         
    +----+--+      
    | User  |      
    | Agent |      
    +-------+      
]]></artwork>
        </figure>

        <t>User Agents which form only a single flow continue to register
        normally but include the instance-id as described in <xref
        target="section-instance" />. The UA can also include a reg-id
        parameter which is used to allow the registrar to detect and avoid
        keeping invalid contacts when a UA reboots or reconnects after its old
        connection has failed for some reason.</t>

        <t>For clarity, here is an example. Bob's UA creates a new TCP flow to
        the registrar and sends the following REGISTER request.</t>

        <figure>
          <artwork><![CDATA[
REGISTER sip:example.com;keep SIP/2.0
Via: SIP/2.0/TCP 192.168.0.2;rport;branch=z9hG4bK-bad0ce-11-1036
Max-Forwards: 70
From: Bob <sip:bob@example.com>;tag=d879h76
To: Bob <sip:bob@example.com>
Call-ID: 8921348ju72je840.204
CSeq: 1 REGISTER
Supported: path, outbound
Contact: <sip:line1@192.168.0.2;transport=tcp>; reg-id=1;
 ;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000A95A0E128>"
Content-Length: 0
]]></artwork>
        </figure>

        <t>The registrar challenges this registration to authenticate Bob.
        When the registrar adds an entry for this contact under the AOR for
        Bob, the registrar also keeps track of the connection over which it
        received this registration.</t>

        <t>The registrar saves the instance-id
        ("urn:uuid:00000000-0000-1000-8000-000A95A0E128") and reg-id ("1")
        along with the rest of the Contact header field. If the instance-id
        and reg-id are the same as a previous registration for the same AOR,
        the registrar replaces the old Contact URI and flow information. This
        allows a UA that has rebooted to replace its previous registration for
        each flow with minimal impact on overall system load.</t>

        <t>When Alice sends a request to Bob, his authoritative proxy selects
        the target set. The proxy forwards the request to elements in the
        target set based on the proxy's policy. The proxy looks at the target
        set and uses the instance-id to understand if two targets both end up
        routing to the same UA. When the proxy goes to forward a request to a
        given target, it looks and finds the flows over which it received the
        registration. The proxy then forwards the request on that existing flow,
        instead of resolving the Contact URI using the procedures in <xref
        target="RFC3263">RFC 3263</xref> and trying to form a new flow to that
        contact.</t>
        
        <t>As described in the next section, if
        the proxy has multiple flows that all go to this UA, the proxy can choose any
        one of the registration bindings for this AOR that has the same
        instance-id as the selected UA.</t>
      </section>

      <section title="Multiple Connections from a User Agent">
        <t>There are various ways to deploy SIP to build a reliable and
        scalable system. This section discusses one such design that is
        possible with the mechanisms in this specification. Other designs are
        also possible.</t>

        <t>In the example system below, the logical outbound proxy/registrar
        for the domain is running on two hosts that share the appropriate
        state and can both provide registrar and outbound proxy functionality
        for the domain. The UA will form connections to two of the physical
        hosts that can perform the authoritative proxy/registrar function for the
        domain. Reliability is achieved by having the UA form two TCP
        connections to the domain.</t>

        <t>Scalability is achieved by using <xref target="RFC2782">DNS SRV</xref> 
        to load balance the
        primary connection across a set of machines that can service the
        primary connection, and also using DNS SRV to load balance across a
        separate set of machines that can service the secondary connection.
        The deployment here requires that DNS is configured with one entry
        that resolves to all the primary hosts and another entry that resolves
        to all the secondary hosts. While this introduces additional DNS
        configuration, the approach works and requires no additional SIP
        extensions.</t>

        <t>
          <list>
            <t>Note: Approaches which select multiple connections from a
            single DNS SRV set were also considered, but cannot prevent two
            connections from accidentally resolving to the same host. The
            approach in this document does not prevent future extensions, such
            as <xref target="I-D.ietf-sipping-config-framework">the SIP UA
            configuration framework</xref>, from adding other ways for a User
            Agent to discover its outbound-proxy-set.</t>
          </list>
        </t>

        <figure>
          <artwork><![CDATA[
    +-------------------+      
    | Domain            |      
    | Logical Proxy/Reg |      
    |                   |       
    |+-----+     +-----+|      
    ||Host1|     |Host2||      
    |+-----+     +-----+|      
    +---\------------/--+     
         \          /          
          \        /           
           \      /            
            \    /              
           +------+            
           | User |            
           | Agent|             
           +------+            
]]></artwork>
        </figure>

        <t>The UA is configured with multiple outbound proxy registration
        URIs. These URIs are configured into the UA through whatever the
        normal mechanism is to configure the proxy address and AOR in the
        UA. If the AOR is alice@example.com, the outbound-proxy-set might look
        something like "sip:primary.example.com;keep" and
        "sip:secondary.example.com;keep". The "keep" tag indicates
        that a SIP server will respond correctly to the mandatory to implement keepalive
        mechanisms described later in this specification.  Note that each URI in
        the outbound-proxy-set could resolve to several different physical
        hosts. The administrative domain that created these URIs should ensure
        that the two URIs resolve to separate hosts. These URIs are handled
        according to normal SIP processing rules, so mechanisms like SRV can
        be used to do load balancing across a proxy farm.</t>

        <t>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. The
        domain might choose to use the Path header approach (as described in
        the next section) to store this internal routing information on host1
        or host2.</t>

        <t>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 large
        loads on the server. When large numbers of hosts reconnect nearly
        simultaneously, this is referred to as the avalanche restart problem,
        and is further discussed in <xref target="recovery" />. The multiple
        flows to many servers help reduce the load caused by the avalanche
        restart. If a UA has multiple flows, and one of the servers fails, the
        UA delays the specified time before trying to form a new connection to
        replace the flow to the server that failed. By spreading out the time
        used for all the UAs to reconnect to a server, the load on the server
        farm is reduced.</t>

        <t>When used in this fashion to achieve high reliability, the operator
        will need to configure DNS such that the various URIs in the outbound
        proxy set do not resolve to the same host.</t>

        <t>Another motivation for maintaining multiple flows between the UA
        and its registrar is related to multihomed UAs. Such UAs can benefit
        from multiple connections from different interfaces to protect against
        the failure of an individual access link.</t>
      </section>

      <section title="Edge Proxies">
        <t>Some SIP deployments use edge proxies such that the UA sends the
        REGISTER to an Edge Proxy that then forwards the REGISTER to the
        Registrar. The Edge Proxy includes a <xref target="RFC3327">Path
        header</xref> so that when the registrar later forwards a request to
        this UA, the request is routed through the Edge Proxy. There could be
        a NAT or firewall between the UA and the Edge Proxy.</t>

        <figure>
          <artwork><![CDATA[             +---------+              
             |Registrar|              
             |Proxy    |              
             +---------+              
              /      \  
             /        \    
            /          \              
         +-----+     +-----+          
         |Edge1|     |Edge2|          
         +-----+     +-----+          
            \           /             
             \         / 
     ----------------------------NAT/FW            
               \     /                
                \   /                 
               +------+               
               |User  |               
               |Agent |               
               +------+               
]]></artwork>
        </figure>

        <t>These systems can use effectively the same mechanism as described
        in the previous sections but need to use the Path header. When the
        Edge Proxy receives a registration, it needs to create an identifier
        value that is unique to this flow (and not a subsequent flow with the
        same addresses) and put this identifier in the Path header URI. This
        identifier has two purposes. First, it allows the Edge Proxy to map
        future requests back to the correct flow. Second, because the
        identifier will only be returned if the user authenticates with the
        registrar successfully, it allows the Edge Proxy to indirectly check the
        user's authentication information via the registrar. The identifier is
        placed in the user portion of a loose route in the Path header. If the
        registration succeeds, the Edge Proxy needs to map future requests
        that are routed to the identifier value from the Path header, to the
        associated flow.</t>

        <t>The term Edge Proxy is often used to refer to deployments where the
        Edge Proxy is in the same administrative domain as the Registrar.
        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
        inside an enterprise that requires its use and the registrar could be
        from a service provider with no relationship to the enterprise.
        Regardless if they are in the same administrative domain, this
        specification requires that Registrars and Edge proxies support the
        Path header mechanism in <xref target="RFC3327">RFC 3327</xref>.</t>
      </section>

      <section title="Keepalive Technique">
        <t>This document describes three keepalive mechanisms. Each of these
        mechanisms uses a client-to-server "ping" keepalive and a
        corresponding server-to-client "pong" message. This ping-pong sequence
        allows the client, and optionally the server, to tell if its flow is
        still active and useful for SIP traffic. The server responds to pings
        by sending pongs. If the client does not receive a pong in response to
        its ping, it declares the flow dead and opens a new flow in its
        place.</t>

        <t>This document also suggests timer values for two of these client
        keepalive mechanisms. These timer values were chosen to keep most NAT
        and firewall bindings open, to detect unresponsive servers within 2
        minutes, and to prevent the avalanche restart problem. However, the
        client may choose different timer values to suit its needs, for
        example to optimize battery life. 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. In this case, the server provides an indicator (the
        'timed-keepalives' parameter) that the server requires the client to
        use the suggested timer values.</t>

        <t>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 <xref target="mech-ua" /> to provide
        congestion relief when a large number of agents simultaneously
        reboot.</t>

        <t>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 transport, such as UDP,
        this specification describes using <xref
        target="I-D.ietf-behave-rfc3489bis">STUN</xref> over the same flow as
        the SIP traffic to perform the keepalive.</t>

        <t>UAs are also free to use native transport keepalives, however the 
        UA application may not be able to set these timers on a per-connection 
        basis, and the server certainly cannot make any assumption about what
        values are used. Use of native transport keepalives is therefore
        outside the scope of this document.</t>

        <section title="CRLF Keepalive Technique">
          <t>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 client does not receive a "pong" within an
          appropriate amount of time, it considers the flow failed.</t>

        </section>

<!--        <section title="TCP Keepalive Technique">
          <t>This approach can only be used when the transport protocol is
          TCP.</t>

          <t>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.</t>

          <t>
            <list>
              <t>Note: when TCP is being used, it's natural to think of using
              TCP KEEPALIVE. Unfortunately, many operating systems and
              programming environments do not allow the keepalive time to be
              set on a per-connection basis. Thus, applications may not be
              able to set an appropriate time.</t>
            </list>
          </t>
        </section> -->

        <section title="STUN Keepalive Technique">
          <t>This technique can only be used for connection-less transports, 
          such as UDP.</t>

          <t>For connection-less transports, a flow definition could change
          because a NAT device in the network path reboots and the resulting
          public IP address or port mapping for the UA changes. To detect
          this, STUN requests are sent over the same flow that is being used
          for the SIP traffic. The proxy or registrar acts as a <xref
          target="I-D.ietf-behave-rfc3489bis">Session Traversal Utilities for
          NAT (STUN)</xref> server on the SIP signaling port.</t>

          <t>
            <list>
              <t>Note: The STUN mechanism is very robust and allows the
              detection of a changed IP address. Many other options were
              considered, but the SIP Working Group selected the STUN-based
              approach. Approaches using SIP requests were abandoned because
              many believed that good performance and full backwards compatibility
              using this method were mutually exclusive.</t>
            </list>
          </t>
        </section>
      </section>
    </section>

    <section anchor="mech-ua" title="User Agent Mechanisms">
      <section anchor="section-instance" title="Instance ID Creation">
        <t>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 UA instance. It also provides an easy way to guarantee
        uniqueness within the AOR. This URN MUST be persistent across power
        cycles of the device. The Instance ID MUST NOT change as the device
        moves from one network to another.</t>

        <t>A UA SHOULD create a UUID URN <xref target="RFC4122" /> as its
        instance-id. 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.</t>

        <t>
          <list style="empty">
            <t>A device like a soft-phone, when first installed, can generate
            a <xref target="RFC4122">UUID</xref> and then save this in
            persistent storage for all future 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 be generated at any time because
            it is guaranteed that no other 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 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 <xref target="example-single" />) is
            perfectly legal as long as the device knows no other UUIDs were
            generated at this time on this device.</t>
          </list>
        </t>

        <t>If a URN scheme other than UUID is used, the UA MUST only use URNs
        for which an IETF consensus RFC defines how the specific URN needs to
        be constructed and used in the sip.instance Contact parameter for
        outbound behavior.</t>
        
        <t>To convey its instance-id in both requests and responses, the UA
        includes a "sip.instance" media feature tag as a UA characteristic
        <xref target="RFC3840" /> . As described in <xref target="RFC3840" />,
        this media feature tag will be encoded in the Contact header field as
        the "+sip.instance" Contact header field parameter. The value of this
        parameter MUST be a URN <xref target="RFC2141" />. One case where a UA
        may not want to include the sip.instance media feature tag at all
        is when it is making an anonymous request or some other privacy
        concern requires that the UA not reveal its identity.</t>

        <t>
          <list style="empty">
            <t><xref target="RFC3840">RFC 3840</xref> defines equality rules
            for callee capabilities parameters, and according to that
            specification, the "sip.instance" media feature tag will be
            compared by case-sensitive string comparison. This means that the
            URN will be encapsulated by angle brackets ("<" and ">")
            when it is placed within the quoted string value of the
            +sip.instance Contact header field parameter. The case-sensitive
            matching rules apply only to the generic usages defined in <xref
            target="RFC3840">RFC 3840</xref> and in the caller preferences
            specification <xref target="RFC3841" />. When the instance ID is
            used in this specification, it is effectively "extracted" from the
            value in the "sip.instance" media feature tag. Thus, equality
            comparisons are performed using the rules for URN equality that
            are specific to the scheme in the URN. If the element performing
            the comparisons does not understand the URN scheme, it performs
            the comparisons using the lexical equality rules defined in RFC
            2141 <xref target="RFC2141" />. Lexical equality could result in
            two URNs being considered unequal when they are actually equal. In
            this specific 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 MUST provide lexically equivalent URNs in each
            registration it generates. This is likely to be normal behavior in
            any case; clients are not likely to modify the value of the
            instance ID so that it remains functionally equivalent yet
            lexicographically different from previous registrations.</t>
          </list>
        </t>
      </section>

      <section anchor="reg" title="Registrations">
        <t>At configuration time, UAs obtain one or more SIP URIs representing
        the default outbound-proxy-set. This specification assumes the set is
        determined via any of a number of configuration mechanisms, and future
        specifications can define additional mechanisms such as using 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 least two
        outbound proxy URIs and SHOULD support sets with up to four URIs. </t>
        
        <t>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 proxy.  (The
        UA could limit the number of flows formed to conserve battery power,
        for example). All of these REGISTER requests will use the same
        Call-ID.  [OPEN ISSUE:  This is for consistency with GRUU, Section 
        5.1 paragraph 5.  Is this a bad idea?  Alternatively GRUU could check
        all reg-ids and preserve temporary GRUU if a registration used the
        same Call-ID as used by any of the current bindings for the same
        instance.] Forming
        the route set for the request is outside the scope of this document,
        but typically results in sending the REGISTER such that the topmost
        Route header field contains a loose route to the outbound proxy URI.
        Other issues related to outbound route construction are discussed in
        <xref target="I-D.rosenberg-sip-route-construct" />.</t>

        <t>Registration requests, other than those described in <xref
        target="third-party-reg" />, MUST include an instance-id media feature
        tag as specified in <xref target="section-instance" />.</t>

        <t>These ordinary registration requests include a distinct reg-id
        parameter in the Contact header field. Each one of these registrations
        will form a new flow from the UA to the proxy. The sequence of reg-id
        values does not have to be sequential but MUST be exactly the same
        sequence of reg-id values each time the UA instance power cycles or
        reboots so that the reg-id values will collide with the previously
        used reg-id values. This is so the registrar can replace the older
        registrations.</t>

        <t>
          <list>
            <t>The UAC can situationally decide whether to request outbound
            behavior by including or omitting the 'reg-id' parameter. For
            example, imagine the outbound-proxy-set contains two proxies in
            different domains, EP1 and EP2. If an outbound-style registration
            succeeded for a flow through EP1, the UA might decide to include
            'outbound' in its Require header field when registering with EP2,
            in order to insure consistency. Similarly, if the registration
            through EP1 did not support outbound, the UA might not register
            with EP2 at all.</t>
          </list>
        </t>

        <t>The UAC MUST indicate that it supports the <xref
        target="RFC3327">Path header</xref> mechanism, by including the 'path'
        option-tag in a Supported header field value in its REGISTER requests.
        Other than optionally examining the Path vector in the response, this
        is all that is required of the UAC to support Path.</t>

        <t>The UAC MAY examine successful registration responses for the presence of an
        'outbound' option-tag in a Require header field value. Presence of
        this option-tag indicates that the registrar is compliant with this
        specification, and that any edge proxies which needed to participate are
        also compliant.  If the registrar did not support outbound, the UA may
        have unintentionally registered an unroutable contact. It is the responsiblity
        of the UA to remove any inappropriate Contacts.</t>

        <t>Note that the UA needs to honor 503 (Service Unavailable) responses
        to registrations as described in RFC 3261 and <xref
        target="RFC3263">RFC 3263</xref>. In particular, implementors should
        note that when receiving a 503 (Service Unavailable) response with a
        Retry-After header field, the UA is expected to wait the indicated
        amount of time and retry the registration. A Retry-After header field
        value of 0 is valid and indicates the UA is expected to retry the
        REGISTER immediately. Implementations need to ensure that when
        retrying the REGISTER, they revisit the DNS resolution results such
        that the UA can select an alternate host from the one chosen the
        previous time the URI was resolved.</t>

        <t>Finally, re-registrations which merely refresh an existing valid
        registration SHOULD be sent over the same flow as the original
        registration.</t>

        <section anchor="third-party-reg"
                 title="Non Outbound Registrations">
          <t>A User Agent MUST NOT include a reg-id header parameter in the
          Contact header field of a registration with a non-zero expiration, 
          if the registering UA is not
          the same instance as the UA referred to by the target Contact header
          field. (This practice is occasionally used to install forwarding
          policy into registrars.)</t>

          <t>A UAC also MUST NOT include an instance-id or reg-id
          parameter in a request to unregister all Contacts (a single Contact
          header field value with the value of "*").</t>
        </section>
      </section>

      <section anchor="send" title="Sending Non-REGISTER Requests">
        <t>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
        techniques to compute the route set and accordingly the next hop URI.
        Discussion of these techniques is outside the scope of this document
        but could include mechanisms specified in <xref target="RFC3608">RFC
        3608</xref> (Service Route) and <xref
        target="I-D.rosenberg-sip-route-construct" />.</t>

        <t>The UA performs normal DNS resolution on the next hop URI (as
        described in <xref target="RFC3263">RFC 3263</xref>) to find a
        protocol, IP address, and port. For protocols that don't use TLS, if
        the UA has an existing flow to this IP address, and port with the
        correct protocol, then the UA MUST use the existing connection. For
        TLS protocols, there MUST also be a match between the host production
        in the next hop and one of the URIs 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 by sending a datagram or opening a new
        connection to the next hop, as appropriate for the transport
        protocol.</t>

        <t>If the UA is sending a dialog-forming request, and wants all 
        subsequent requests in the dialog to arrive over the same flow, the
        UA adds an 'ob' parameter to its Contact header.  Typically this is
        desirable, but it is not necessary for example if the Contact is a
        <xref target="I-D.ietf-sip-gruu">GRUU</xref>.  The flow used for 
        the request is typically the same flow the UA registered over, but 
        it could be a new flow, for example the initial subcription dialog for the 
        <xref target="I-D.ietf-sipping-config-framework">configuration framework</xref>
        needs to exist before registration.</t>

        <t>
          <list>
            <t>Note that if the UA wants its flow to work through NATs or
            firewalls it still needs to put the 'rport' parameter <xref
            target="RFC3581" /> in its Via header field value, and send from
            the port it is prepared to receive on. More general information
            about NAT traversal in SIP is described in <xref
            target="I-D.ietf-sipping-nat-scenarios" />.</t>
          </list>
        </t>
        <t> ****** </t>
        
      </section>

      <section anchor="detect-fail" title="Detecting Flow Failure">
        <t>The UA needs to detect when a specific flow fails. The UA actively
        tries to detect failure by periodically sending keepalive messages
        using one of the techniques described in 
        <xref target="keepcrlf" /> or <xref target="keepstun" />. If a flow
        has failed, the UA follows the procedures in <xref target="reg" /> to
        form a new flow to replace the failed one.</t>

        <t>When the outbound-proxy-set contains the "timed-keepalives"
        parameter, the UA MUST send its keepalives according to the time
        periods described in this section. The server can specify this so the
        server can detect liveness of the client within a predictable time
        scale. If the parameter is not present, the UA can send keepalives at
        its discretion.</t>

        <t>The time between each keepalive request when using non connection
        based transports such as UDP SHOULD be a random number between 24 and
        29 seconds while for connection based transports such as TCP it SHOULD
        be a random number between 95 and 120 seconds. These times MAY be
        configurable. To clarify, the random number will be different for each
        request. Issues such as battery consumption might motivate longer
        keepalive intervals. If the 'timed-keepalives' parameter is set on the
        outbound-proxy-set, the UA MUST use these recommended timer
        values.</t>

        <t>
          <list>
            <t>Note on selection of time values: For UDP, the upper bound of
            29 seconds was selected so that multiple STUN packets could be
            sent before 30 seconds, as many NATs have
            UDP timeouts as low as 30 seconds. The 24 second lower bound was
            selected so that after 10 minutes the jitter introduced by
            different timers will make the keepalive requests unsynchronized
            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 user
            experience, failures normally will be detected in this amount of
            time and a new connection set up. Operators that wish to change
            the relationship between load on servers and the expected time
            that a user might not receive inbound communications will probably
            adjust this time. The 95 seconds lower bound was chosen so that
            the jitter introduced will result in a relatively even load on the
            servers after 30 minutes.</t>
          </list>
        </t>

        <t>The client needs to perform normal <xref target="RFC3263">RFC
        3263</xref> SIP DNS resolution on the URI from the outbound-proxy-set
        to pick a transport. Once a transport is selected, if the 'keep'
        parameter is present in the URI, the UA selects the
        keepalive approach that is recommended for that transport.</t>


        <section anchor="keepcrlf" title="Keepalive with CRLF">
          <t>This approach MUST only be used with connection oriented
          transports such as TCP or SCTP.</t>

          <t>A User Agent that forms flows, checks if the configured URI to which
          the UA is connecting resolves to a stream-based transport (ex: TCP and TLS 
          over TCP) and has a 'keep' URI parameter (defined in <xref
          target="iana" />). If the parameter is present, the
          UA can send keep alives as described in this section.</t>

          <t>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:</t>

          <figure>
            <artwork><![CDATA[
CRLF = CR LF
double-CRLF = CR LF CR LF
CR = 0x0d
LF = 0x0a]]></artwork>
          </figure>

          <t>The ping and pong need to be sent between SIP messages and cannot
          be sent in the middle of a SIP message. If sending over TLS,
          the CRLFs are sent inside the TLS protected channel.
          If sending over a <xref target="RFC3320">SigComp</xref> compressed 
          data stream, the CRLF keepalives are sent inside the compressed stream.
          The double CRLF is considered a single SigComp message.
          The specific mechanism for representing these characters is an implementation
          specific matter to be handled by the SigComp compressor at the sending end.</t>
          
          <t>If a pong is not received within 10 seconds then the client MUST
          treat the flow as failed. Clients MUST support this CRLF
          keepalive.</t>
        </section>

        <section anchor="keepstun" title="Keepalive with STUN">
          <t>This approach MUST only be used with connection-less transports, 
          such as UDP.</t>

          <t>A User Agent that forms flows, checks if the configured URI to which
          the UA is connecting resolve to use the UDP transport, and has a 'keep'
          URI parameter (defined in <xref target="iana" />). If the parameter is 
          present, the
          UA can periodically perform keepalive checks by sending <xref
          target="I-D.ietf-behave-rfc3489bis">STUN</xref> Binding Requests
          over the flow as described in <xref target="stunkeep" />. Clients
          MUST support STUN based keepalives. </t>

          <t>If a STUN Binding Error Response is received, or if no Binding 
          Response is received after 7 retransmissions (16 times the STUN 
          "RTO" timer--RTO is an estimate of round-trip time), 
          the UA considers the flow
          failed.  If the XOR-MAPPED-ADDRESS in the STUN Binding Response changes,
          the UA MUST treat this event as a failure on the flow.</t>
        </section>
      </section>

      <section anchor="recovery" title="Flow Recovery">
        <t>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 registrations that were previously sent over this flow. Each new
        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
        flow as described in <xref target="reg" />; however, if there is a
        failure in forming this flow, the UA needs to wait a certain amount of
        time before retrying to form a flow to this particular next hop.</t>

        <t>The amount of time to wait depends if the previous attempt at
        establishing a flow was successful. For the purposes of this section,
        a flow is considered successful if outbound registration succeeded,
        and if keepalives are in use on this flow, at least one subsequent
        keepalive response was received.</t>

        <!--
          <t>The amount of time to wait depends if the previous attempt at
          establishing a flow was successful.  For the purposes of this section,
          a flow is considered successful if outbound registration succeeded and
          keepalives have not timed out for 120
          seconds after a registration.  For STUN-based keepalives, this typically means
          three successful STUN transactions over UDP or one successful STUN
          transaction over TCP.  If a flow is established and is alive after
          this amount of time, the number of consecutive registration failures
          is set to zero.  Each time a flow fails before two minutes, the number
          of consecutive registration failures is incremented by one.  Note that
          a failure during the initial STUN validation does not count against
          the number of consecutive registration failures. </t> -->

        <t>The number of seconds to wait is computed in the following way. If
        all of the flows to every URI in the outbound proxy set have failed,
        the base-time is set to 30 seconds; otherwise, in the case where at
        least one of the flows has not failed, the base-time is set to 90
        seconds. The wait time is computed by taking two raised to the power
        of the number of consecutive registration failures for that URI, and
        multiplying this by the base time, up to a maximum of 1800
        seconds.</t>

        <figure>
          <artwork><![CDATA[
wait-time = min( max-time, (base-time * (2 ^ consecutive-failures)))]]></artwork>
        </figure>

        <t>These times MAY be configurable in the UA. The three times are:
        <list style="symbols">
            <t>max-time with a default of 1800 seconds</t>

            <t>base-time (if all failed) with a default of 30 seconds</t>

            <t>base-time (if all have not failed) with a default of 90 seconds</t>
          </list> 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. 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 of the delay time before trying another registration to form a
        new flow for that URI.</t>

        <t>To be explicitly clear on the boundary conditions: when the UA
        boots it immediately tries to register. If this fails and no
        registration on other flows succeed, the first retry happens somewhere
        between 30 and 60 seconds after the failure of the first registration
        request. If the number of consecutive-failures is large enough that
        the maximum of 1800 seconds is reached, the UA will keep trying
        indefinitely with a random time of 15 to 30 minutes between each
        attempt.</t>
      </section>
    </section>

    <section title="Edge Proxy Mechanisms">
      <section anchor="edge" title="Processing Register Requests">
        <t>When an Edge Proxy receives a registration request with a reg-id
        header parameter in the Contact header field, it needs to determine if
        it (the edge proxy) will have to be visited for any subsequent
        requests sent to the user agent identified in the Contact header
        field, or not. If the Edge Proxy determines that this is the case, it
        inserts its URI in a Path header field value as described in <xref
        target="RFC3327">RFC 3327</xref>. If the Edge Proxy is the first SIP
        node after the UAC, it either MUST store a "flow token"--containing
        information about the flow from the previous hop--in its Path URI, or
        reject the request. The flow token MUST be an identifier that is
        unique to this network flow. The flow token MAY be placed in the
        userpart of the URI. In addition, the first node MUST include an 'ob'
        URI parameter in its Path header field value. If the Edge Proxy is not
        the first SIP node after the UAC it MUST NOT place an 'ob' URI
        parameter in a Path header field value. The Edge Proxy can determine
        if it is the first hop by examining the Via header field.</t>
      </section>

      <section anchor="flowtokens" title="Generating Flow Tokens">
        <t>A trivial but impractical way to satisfy the flow token requirement
        in <xref target="edge" /> involves storing a mapping between an
        incrementing counter and the connection information; however this
        would require the Edge Proxy to keep an impractical amount of state.
        It is unclear when this state could be removed and the approach would
        have problems if the proxy crashed and lost the value of the counter.
        A stateless example is provided below. A proxy can use any algorithm
        it wants as long as the flow token is unique to a flow, the flow can
        be recovered from the token, and the token cannot be modified by
        attackers.</t>

        <t>
          <list style="hanging">
            <t hangText="Example Algorithm:">When the proxy boots it selects a
            20-octet crypto random key called K that only the Edge Proxy
            knows. A byte array, called S, is formed that contains the
            following information about the flow the request was received on:
            an enumeration indicating the protocol, the local IP address and
            port, the remote IP address and port. The HMAC of S is computed
            using the key K and the HMAC-SHA1-80 algorithm, as defined in
            <xref target="RFC2104" />. The concatenation of the HMAC and S are
            base64 encoded, as defined in <xref target="RFC4648" />, and used
            as the flow identifier. When using IPv4 addresses, this will
            result in a 32-octet identifier.</t>

            <!-- we don't need time or file descriptor since we migrated to full 5-tuple -->
          </list>
        </t>
      </section>

      <section title="Forwarding Non-REGISTER Requests">
        <t>When an Edge Proxy receives a request, it applies normal routing
        procedures with the following addition. If the Edge Proxy receives a
        request where the edge proxy is the host in the topmost Route header
        field value, and the Route header field value contains a flow token,
        the proxy decodes the flow token and compares the flow in the flow 
        token with the source of the
        request to determine if this is an "incoming" or "outgoing" request.
        </t>
        <t>
        If the flow in the flow token in the topmost Route header field value
        matches the source of the request, the request in an "outgoing"
        request. For an "outgoing" request, the edge proxy just removes the
        Route header and continues processing the request. Otherwise, this is
        an "incoming" request. For an incoming request, the proxy removes the
        Route header field value and forwards the request over the 'logical
        flow' identified by the flow token, that is known to deliver data to
        the specific target UA instance. For connection-oriented transports,
        if the flow no longer exists the proxy SHOULD send a 430 (Flow Failed)
        response to the request.</t>

        <t>Proxies which used the example algorithm described in this document
        to form a flow token follow the procedures below to determine the
        correct flow.</t>

        <t>
          <list style="hanging">
            <t hangText="Example Algorithm:">To decode the flow token, take
            the flow identifier in the user portion of the URI and base64
            decode it, then verify the HMAC is correct by recomputing the HMAC
            and checking that it matches. If the HMAC is not correct, the
            proxy SHOULD send a 403 (Forbidden) response. If the HMAC is
            correct then the proxy SHOULD forward the request on the flow that
            was specified by the information in the flow identifier. If this
            flow no longer exists, the proxy SHOULD send a 430 (Flow Failed)
            response to the request.</t>
          </list>
        </t>

        <t>Note that this specification needs mid-dialog requests to be routed
        over the same flows as those stored in the Path vector from the
        initial registration, but specific procedures at the edge proxy to ensure that mid-dialog
        requests are routed over an existing flow are not part of this
        specification. However, an approach such as having the Edge Proxy
        add a Record-Route header with a flow token is one way to ensure that mid-dialog
        requests are routed over the correct flow. The Edge Proxy can use the
        presence of the "ob" parameter in dialog-forming requests in the UAC's
        Contact URI to determine if it should add a flow token.</t>
      </section>

      <section anchor="edgekeep" title="Edge Proxy Keepalive Handling">
        <t>All edge proxies compliant with this specification MUST implement
        support for STUN NAT Keepalives on its SIP UDP ports as
        described in <xref target="stunkeep" />.</t>

        <t>When a server 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.</t>
      </section>
    </section>

    <section anchor="registrar" title="Registrar Mechanisms: Processing REGISTER Requests">
<t>
This specification updates the definition of a binding in 
<xref target="RFC3261">RFC 3261</xref> Section 10 and 
<xref target="RFC3327">RFC 3327</xref> Section 5.3.
</t>

<t>
Registrars which implement this specification MUST support the Path
header mechanism <xref target="RFC3327">RFC 3327</xref>.
</t>

<t>
When receiving a REGISTER request, the registrar first checks from
its Via header field if the registrar is the first hop or not. If
the registrar is not the first hop, it examines the Path header of the
request. If the Path header field is missing or it exists but the 
first URI does not have an 'ob' URI parameter, the registrar MUST 
ignore the reg-id parameter of the Contact header.
</t>

<t>
A Contact header field value with an instance-id but no reg-id is 
valid (this combination can be used in the 
<xref target="I-D.ietf-sip-gruu">GRUU</xref> specification), 
but one with a reg-id but no instance-id is not.  If the registrar 
processes a Contact header field value with a reg-id but no 
instance-id, it simply ignores the reg-id parameter.
If the Contact header contains more than one header field value with a 
non-zero expiration and a 'reg-id' parameter, the entire registration
SHOULD be rejected with a 400 Bad Request response.
If the Contact header did not contain a 'reg-id' parameter or if that
parameter became ignored (as described above) the registrar MUST NOT
include the 'outbound' option-tag in the Require header field 
of its response.
</t>

<t>
The registrar MUST be prepared to receive, simultaneously for the 
same AOR, some registrations that use instance-id and reg-id and 
some registrations that do not. The Registrar MAY be configured 
with local policy to reject any registrations that do not include 
the instance-id and reg-id, or with Path header field values that 
do not contain the 'ob' parameter.  If the Contact header field 
does not contain a '+sip.instance' media feature parameter, the
registrar processes the request using the Contact binding rules
in <xref target="RFC3261">RFC 3261</xref>.
</t>

<t>
When a '+sip.instance' media feature parameter is  present in a 
Contact header field of a REGISTER request (after
the Contact header validation as described above), the corresponding 
binding is between an AOR and the combination of the instance-id 
(from the +sip.instance media feature parameter) and the value of 
reg-id parameter if it is present. The registrar MUST store in the binding the 
Contact URI, all the Contact head field parameters, and any Path header
field values
and SHOULD also store the time at which the binding 
was last updated. (Even though the Contact URI is not used for binding
comparisons, it is still needed by the authoritative proxy to form the 
target set.)  The Registrar MUST include the 'outbound' 
option-tag (defined in <xref target="iana-reg-id"/>) in a Require header 
field value in its response to the REGISTER request. 
</t>

<t>
If the UAC has a direct flow with the registrar, the registrar MUST
store enough information to uniquely identify the network flow over
which the request arrived.  For common operating systems with TCP,
this would typically just be the handle to the file descriptor where
the handle would become invalid if the TCP session was closed.  For
common operating systems with UDP this would typically be the file
descriptor for the local socket that received the request, the local
interface, and the IP address and port number of the remote side that
sent the request.  The registrar MAY store this information by adding
itself to the Path header field with an appropriate flow token.
</t>

<t>
If the registrar receives a re-registration for a specific combination
of AOR, instance-id and reg-id values, the registrar MUST update any 
information that uniquely identifies the network flow over which 
the request arrived if that information has changed, and SHOULD 
update the time the binding was last updated.
</t>

<t>
To be compliant with this specification, registrars which can receive
SIP requests directly from a UAC without intervening edge proxies
MUST implement the same keepalive mechanisms as Edge Proxies (<xref target="edgekeep"/>).
</t>
    </section>

    <section title="Authoritative Proxy Mechanisms: Forwarding Requests">
      <t>When a proxy uses the location service to look up a registration
      binding and then proxies a request to a particular contact, it selects a
      contact to use normally, with a few additional rules:</t>

      <t>
        <list style="symbols">
          <t>The proxy MUST NOT populate the target set with more than one
          contact with the same AOR and instance-id at a time.</t>

          <t>If a request for a particular AOR and instance-id fails with a
          430 (Flow Failed) response, the proxy SHOULD replace the failed
          branch with another target (if one is available) with the same AOR
          and instance-id, but a different reg-id.</t>

          <t>If the proxy receives a final response from a branch other than a
          408 (Request Timeout) or a 430 (Flow Failed) response, the proxy
          MUST NOT forward the same request to another target representing the
          same AOR and instance-id. The targeted instance has already provided
          its response.</t>
        </list>
      </t>

      <t>The proxy uses the next-hop target
      of the message and the value of any stored Path header field vector in
      the registration binding to decide how to forward and
      populate the Route header in the request. If the proxy doubles as a
      registrar and stored
      information about the flow that created the
      binding, then the proxy MUST send the request over the same 'logical
      flow' saved with the binding, since that flow is known to deliver data to the
      specific target UA instance's network flow that was saved with the binding.</t>

      <t>
        <list>
          <t>Typically this means that for TCP, the request is sent on the
          same TCP socket that received the REGISTER request. For UDP, the
          request is sent from the same local IP address and port over which
          the registration was received, to the same IP address and port from
          which the REGISTER was received.</t>
        </list>
      </t>

      <t>If a proxy or registrar receives information from the network that
      indicates that no future messages will be delivered on a specific flow,
      then the proxy MUST invalidate all the bindings in the target set that
      use that flow (regardless of AOR). Examples of this are a TCP socket
      closing or receiving a destination unreachable ICMP error 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 use that file
      descriptor.</t>
    </section>

    <section anchor="stunkeep" title="STUN Keepalive Processing">
      <t>This section describes changes to the SIP transport layer that allow
      SIP and the <xref target="I-D.ietf-behave-rfc3489bis">STUN</xref>
      Binding Requests to be mixed over the same flow. This constitues a
      new STUN usage.  The STUN messages are
      used to verify that connectivity is still available over a UDP flow, and
      to provide periodic keepalives. Note that these STUN keepalives are
      always sent to the next SIP hop. STUN messages are not delivered
      end-to-end.</t>

      <t>The only STUN messages required by this usage are Binding Requests,
      Binding Responses, and Binding Error Responses. The UAC sends Binding
      Requests over the same UDP flow that is used for sending SIP messages.
      These Binding Requests do not require any STUN attributes except the 
      XOR-MAPPED-ADDRESS and never use 
      any form of authentication. The UAS, proxy, or registrar
      responds to a valid Binding Request with a Binding Response which MUST
      include the XOR-MAPPED-ADDRESS attribute.</t>

      <t>If a server compliant to this section receives SIP requests on a
      given interface and UDP port, it MUST also provide a limited version of a
      STUN server on the same interface and UDP port.</t>

      <t>
        <list>
          <t>It is easy to distinguish STUN and SIP packets sent over UDP,
          because the first octet of a STUN Binding method has a value of 0 or 1 while
          the first octet of a SIP message is never a 0 or 1.</t>
        </list>
      </t>

      <t>When a URI is created that refers to a SIP node that supports STUN as
      described in this section, the 'keep' URI parameter, as defined in
      <xref target="iana" /> SHOULD be added to the URI. This allows a UA to
      inspect the URI to decide if it should attempt to send STUN requests to
      this location. For example, an edge proxy could insert this parameter
      into its Path URI so that the registering UA can discover the edge proxy
      supports STUN keepalives.</t>

      <t>Because sending and receiving binary STUN data on the same ports used
      for SIP is a significant and non-backwards compatible change to RFC
      3261, this section requires a number of checks before sending STUN
      messages to a SIP node. If a SIP node sends STUN requests (for example
      due to incorrect configuration) despite these warnings, the node could
      be blacklisted for UDP traffic.</t>

      <t>A SIP node MUST NOT send STUN requests over a flow unless it has an
      explicit indication that the target next hop SIP server claims to
      support STUN. For example, automatic or manual configuration of an
      outbound-proxy-set which contains the 'keep' parameter, or
      receiving the parameter in the Path header of the edge proxy, is
      considered sufficient explicit indication. Note that UACs MUST NOT use
      an ambiguous configuration option such as "Work through NATs?" or "Do
      Keepalives?" to imply next hop STUN support.<!-- A SIP node MAY also probe
        the next hop using a SIP OPTIONS request to check for support of the
        'sip-stun' option tag in a Supported header field. --></t>

      <t>
        <list>
          <t>Typically, a SIP node first sends a SIP request and waits to
          receive a 200-class response over a flow to
          a new target destination, before sending any STUN messages. When
          scheduled for the next NAT refresh, the SIP node sends a STUN
          request to the target.</t>
        </list>
      </t>

      <t>Once a flow is established, failure of a STUN request (including its
      retransmissions) is considered a failure of the underlying flow. For SIP
      over UDP flows, if the XOR-MAPPED-ADDRESS returned over the flow
      changes, this indicates that the underlying connectivity has changed,
      and is considered a flow failure.<!-- A 408 response to a next-hop OPTIONS probe is also considered
        a flow failure. --></t>
        
        <t>
        The SIP keepalive STUN usage requires no backwards compatibility with 
        <xref target="RFC3489">RFC 3489</xref>.   
        </t>

      <!--        <section anchor="cartman-probe" title="Explicit Option Probes">
        <t>This section defines a new SIP option-tag called 'sip-stun'.
        Advertising this option-tag indicates that the server can receive SIP
        messages and STUN messages as part of the NAT Keepalive usage on the
        same port.  Clients that want to probe a SIP server to determine support
        for STUN, can send an OPTIONS request to the next hop by setting the
        Max-Forwards header field to zero or addressing the request to that
        server.  The OPTIONS response will contain a Supported header field with
        a list of the server's supported option-tags.
        </t>
        
        <t><list><t>A UAC SHOULD NOT include the 'sip-stun' option-tag in a
        Proxy-Require header. This is because a request with this header will
        fail in some topologies where the first proxy support sip-stun, but a
        subsequent proxy does not.  Note that RFC 3261 does not allow proxies to
        remove option-tags from a Proxy-Require header field.
        </t></list></t>
        </section>  -->

      <section title="Use with Sigcomp">
        <t>When STUN is used together with <xref
        target="RFC3320">SigComp</xref> compressed SIP messages over the same
        flow. For UDP flows, the STUN messages are simply sent
        uncompressed, "outside" of SigComp. This is supported by multiplexing
        STUN messages with SigComp messages by checking the two topmost bits
        of the message. These bits are always one for SigComp, or zero for
        STUN.</t>

        <t>
          <list>
            <t>All SigComp messages contain a prefix (the five
            most-significant bits of the first byte are set to one) that does
            not occur in <xref target="RFC3629">UTF-8</xref> encoded text
            messages, so for applications which use this encoding (or ASCII
            encoding) it is possible to multiplex uncompressed application
            messages and SigComp messages on the same UDP port.</t>

            <t>The most significant two bits of every STUN Binding method are both
            zeroes. This, combined with the magic cookie, aids in
            differentiating STUN packets from other protocols when STUN is
            multiplexed with other protocols on the same port.</t>
          </list>
        </t>
      </section>
    </section>

    <section title="Example Message Flow">
      <!-- this would be better if all the messages in this were complete-->
      
      <figure><artwork><![CDATA[
   [----example.com domain------]
  Bob         EP1   EP2     Proxy     Alice
   |           |     |        |         |
 1)|-REGISTER->|     |        |         |
 2)|           |---REGISTER-->|         |
 3)|           |<----200 OK---|         |
 4)|<-200 OK---|     |        |         |
 5)|----REGISTER---->|        |         |
 6)|           |     |--REG-->|         |
 7)|           |     |<-200---|         |
 8)|<----200 OK------|        |         |
   |           |     |        |         |
   |    CRASH  X     |        |         |
   |        Reboot   |        |         |
 9)|           |     |        |<-INVITE-|
10)|           |<---INVITE----|         |
11)|           |----430------>|         |
12)|           |     |<-INVITE|         |
13)|<---INVITE-------|        |         |
14)|----200 OK------>|        |         |
15)|           |     |200 OK->|         |
16)|           |     |        |-200 OK->|
17)|           |     |        |<-ACK----|
18)|           |     |<-ACK---|         |
19)|<---ACK----------|        |         |
   |           |     |        |         |
20)|--2CRLF->X |     |        |         |
   |           |     |        |         |
21)|-REGISTER->|     |        |         |
22)|<-200 OK---|     |        |         |
   |           |     |        |         |

      ]]></artwork></figure>

      <t>[TODO FIX example]  The following call flow shows a basic registration and an incoming
      call. At some point, the flow to the Primary proxy is lost. An incoming
      INVITE tries to reach the Callee through the Primary flow, but receives
      an ICMP Unreachable message. The Caller retries using the Secondary Edge
      Proxy, which uses a separate flow. Later, after the Primary reboots, The
      Callee discovers the flow failure and reestablishes a new flow to the
      Primary.</t>

      <figure>
        <artwork><![CDATA[

                [-----example.com domain -------------------]
Caller           Secondary             Primary            Callee 
  |                 |                  |     (1) REGISTER |    
  |                 |                  |<-----------------|     
  |                 |                  |(2) 200 OK        |     
  |                 |                  |----------------->|     
  |                 |                  |     (3) REGISTER |     
  |                 |<------------------------------------|     
  |                 |(4) 200 OK        |                  |     
  |                 |------------------------------------>|  
  |                 |                  |                  |   
  |                 |           CRASH  X                  | 
  |(5) INVITE       |                  |                  |   
  |----------------------------------->|                  |
  |(6) ICMP Unreachable                |                  |
  |<-----------------------------------|                  |
  |(7) INVITE       |                  |                  |     
  |---------------->|                  |                  | 
  |                 |(8) INVITE        |                  |
  |                 |------------------------------------>|     
  |                 |(9) 200 OK        |                  |     
  |                 |<------------------------------------|     
  |(10) 200 OK      |                  |                  |
  |<----------------|                  |                  |
  |(11) ACK         |                  |                  |     
  |---------------->|                  |                  |
  |                 |(12) ACK          |                  |
  |                 |------------------------------------>|
  |                 |                  |                  |
  |                 |          REBOOT  |                  |
  |                 |                  |(13) REGISTER     |    
  |                 |                  |<-----------------|    
  |                 |                  |(14) 200 OK       |    
  |                 |                  |----------------->|     
  |                 |                  |                  |
  |(15) BYE         |                  |                  |     
  |---------------->|                  |                  |     
  |                 | (16) BYE         |                  |    
  |                 |------------------------------------>|    
  |                 |                  |      (17) 200 OK |    
  |                 |<------------------------------------|     
  |     (18) 200 OK |                  |                  |     
  |<----------------|                  |                  |
  |                 |                  |                  |
]]></artwork>
      </figure>

      <t>This call flow assumes that the Callee has been configured with a
      proxy set that consists of "sip:pri.example.com;lr;keep-stun" and
      "sip:sec.example.com;lr;keep-stun". The Callee REGISTER in message (1)
      looks like:</t>

      <figure>
        <artwork><![CDATA[

REGISTER sip:example.com SIP/2.0 
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnashds7 
Max-Forwards: 70 
From: Callee <sip:callee@example.com>;tag=7F94778B653B 
To: Callee <sip:callee@example.com> 
Call-ID: 16CB75F21C70 
CSeq: 1 REGISTER
Supported: path
Route: <sip:pri.example.com;lr;keep-stun> 
Contact: <sip:callee@192.0.2.1>
  ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
  ;reg-id=1
Content-Length: 0 
]]></artwork>
      </figure>

      <t>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
      REGISTER in message (2) would look like:</t>

      <figure>
        <artwork><![CDATA[

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnashds7 
From: Callee <sip:callee@example.com>;tag=7F94778B653B 
To: Callee <sip:callee@example.com>;tag=6AF99445E44A
Call-ID: 16CB75F21C70 
CSeq: 1 REGISTER
Supported: outbound
Contact: <sip:callee@192.0.2.1>
  ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
  ;reg-id=1
  ;expires=3600
Content-Length: 0 
]]></artwork>
      </figure>

      <t>The second registration in message 3 and 4 are similar other than the
      Call-ID has changed, the reg-id is 2, and the route is set to the
      secondary instead of the primary. They look like:</t>

      <figure>
        <artwork><![CDATA[

REGISTER sip:example.com SIP/2.0 
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnqr9bym 
Max-Forwards: 70 
From: Callee <sip:callee@example.com>;tag=755285EABDE2 
To: Callee <sip:callee@example.com> 
Call-ID: E05133BD26DD 
CSeq: 1 REGISTER 
Supported: path
Route: <sip:sec.example.com;lr;keep-stun> 
Contact: <sip:callee@192.0.2.1>
  ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
  ;reg-id=2
Content-Length: 0 
]]></artwork>
      </figure>

      <figure>
        <artwork><![CDATA[
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.0.2.1;branch=z9hG4bKnqr9bym 
From: Callee <sip:callee@example.com>;tag=755285EABDE2
To: Callee <sip:callee@example.com>;tag=49A9AD0B3F6A
Call-ID: E05133BD26DD 
Supported: outbound
CSeq: 1 REGISTER 
Contact: <sip:callee@192.0.2.1>
  ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
  ;reg-id=1
  ;expires=3600
Contact: <sip:callee@192.0.2.1>
  ;+sip.instance="<urn:uuid:0C67446E-F1A1-11D9-94D3-000A95A0E128>"
  ;reg-id=2
  ;expires=3600
Content-Length: 0 
]]></artwork>
      </figure>

      <t>The messages in the call flow are very normal. The only interesting
      thing to note is that the INVITE in message 8 contains a Record-Route
      header for the Secondary proxy, with its flow token.</t>

      <figure>
        <artwork><![CDATA[
Record-Route: 
 <sip:PQPbqQE+Ynf+tzRPD27lU6uxkjQ8LLUG@sec.example.com;lr>
]]></artwork>
      </figure>

      <!-- <t>Message 7 seems strange in that it goes to the secondary instead
           of the primary. The Caller actually sends the message to the domain
           of the callee to a host (primary or secondary) that is currently
           available. How the domain does this is an implementation detail up to
           the domain and not part of this specification.</t>-->

      <t>The registrations in message 13 and 14 are the same as message 1 and
      2 other than the Call-ID and tags have changed. Because these messages
      will contain the same instance-id and reg-id as those in 1 and 2, this
      flow will partially supersede that for messages 1 and 2 and will be
      tried first by Primary.</t>
    </section>

    <section anchor="grammar" title="Grammar">
      <t>This specification defines new Contact header field parameters,
      reg-id and +sip.instance. The grammar includes the definitions from
      <xref target="RFC3261">RFC 3261</xref> and includes the definition of
      uric from <xref target="RFC3986">RFC 3986</xref>.</t>

      <t>
        <list>
          <t>Note: The "=/" syntax used in this ABNF indicates an extension of
          the production on the left hand side.</t>
        </list>
      </t>

      <t>The ABNF<xref target="RFC4234" /> is:</t>

      <figure>
        <artwork type="abnf"><![CDATA[
 contact-params =/ c-p-reg / c-p-instance

 c-p-reg        = "reg-id" EQUAL 1*DIGIT ; 1 to (2**31 - 1)

 c-p-instance   =  "+sip.instance" EQUAL 
                   LDQUOT "<" instance-val ">" RDQUOT

 instance-val   = *uric ; defined in RFC 3986 
]]></artwork>

        <!--  
 other-tags     = sip-instance / "+" ftag-name
 sip-instance   = "+sip.instance"
 -->
      </figure>

      <t>The value of the reg-id MUST NOT be 0 and MUST be less than
      2**31.</t>
    </section>

    <section title="Definition of 430 Flow Failed response code">
      <t>This specification defines a new SIP response code '430 Flow Failed'.
      This response code is used by an Edge Proxy to indicate to the
      Authoritative Proxy that a specific flow to a UA instance has failed.
      Other flows to the same instance could still succeed. The Authoritative
      Proxy SHOULD attempt to forward to another target (flow) with the same
      instance-id and AOR.</t>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <section anchor="iana-reg-id" title="Contact Header Field">
        <t>This specification defines a new Contact header field parameter
        called reg-id in the "Header Field Parameters and Parameter Values"
        sub-registry as per the registry created by <xref target="RFC3968" />.
        The required information is:</t>

        <figure>
          <artwork><![CDATA[ 
 Header Field                  Parameter Name   Predefined  Reference
                                                  Values
 ____________________________________________________________________
 Contact                       reg-id               No     [RFC AAAA]

 [NOTE TO RFC Editor: Please replace AAAA with
                      the RFC number of this specification.]
]]></artwork>
        </figure>
      </section>

      <section anchor="iana-keepalive" title="SIP/SIPS URI Parameters">
        <t>This specification augments the "SIP/SIPS URI Parameters"
        sub-registry as per the registry created by <xref target="RFC3969" />.
        The required information is:</t>

        <figure>
          <artwork><![CDATA[ 
    Parameter Name  Predefined Values  Reference
    ____________________________________________
    keep                No            [RFC AAAA]
    timed-keepalives    No            [RFC AAAA]
    ob                  No            [RFC AAAA]
    
    [NOTE TO RFC Editor: Please replace AAAA with
                         the RFC number of this specification.]
]]></artwork>
        </figure>
      </section>

      <section anchor="iana-outbound" title="SIP Option Tag">
        <t>This specification registers a new SIP option tag, as per the
        guidelines in Section 27.1 of RFC 3261.</t>

        <t>
          <list style="hanging">
            <t hangText="Name:">outbound</t>

            <t hangText="Description:">This option-tag is used to identify
            UAs and Registrars which support extensions for Client Initiated
            Connections. A Registrar places this option-tag in a Supported
            header to communicate the Registrar's support for this extension
            to the registering User Agent, and vice versa.</t>
          </list>

          <!--          <list style="hanging">
            <t hangText="Name:">sip-stun</t>
            
            <t hangText="Description:">This option-tag is used to identify 
            SIP servers which can receive STUN requests described in the STUN
            NAT Keepalive usage on the same ports they use to receive SIP messages.
            </t>
          </list> -->
        </t>
      </section>

      <section title="Response Code">
        <t>This section registers a new SIP Response Code, as per the
        guidelines in Section 27.4 of RFC 3261.</t>

        <t>
          <list style="hanging">
            <t hangText="Code:">430</t>

            <t hangText="Default Reason Phrase:">Flow Failed</t>

            <t hangText="Reference:">This document</t>
          </list>
        </t>
      </section>

      <section title="Media Feature Tag">
        <t>This section registers a new media feature tag, per the procedures
        defined in <xref target="RFC2506">RFC 2506</xref>. The tag is placed
        into the sip tree, which is defined in <xref target="RFC3840">RFC
        3840</xref>.</t>

        <t>Media feature tag name: sip.instance</t>

        <t>ASN.1 Identifier: New assignment by IANA.</t>

        <t>Summary of the media feature indicated by this tag: This feature
        tag contains a string containing a URN that indicates a unique
        identifier associated with the UA instance registering the
        Contact.</t>

        <t>Values appropriate for use with this feature tag: String.</t>

        <t>The feature tag is intended primarily for use in the following
        applications, protocols, services, or negotiation mechanisms: This
        feature tag is most useful in a communications application, for
        describing the capabilities of a device, such as a phone or PDA.</t>

        <t>Examples of typical use: Routing a call to a specific device.</t>

        <t>Related standards or documents: RFC XXXX</t>

        <t>[[Note to IANA: Please replace XXXX with the RFC number of this
        specification.]]</t>

        <t>Security Considerations: This media feature tag can be used in ways
        which affect application behaviors. For example, the <xref
        target="RFC3841">SIP caller preferences extension</xref> allows for
        call routing decisions to be based on the values of these parameters.
        Therefore, if an attacker can modify the values of this tag, they
        might be able to affect the behavior of applications. As a result,
        applications which utilize this media feature tag SHOULD provide a
        means for ensuring its integrity. Similarly, this feature tag should
        only be trusted as valid when it comes from the user or user agent
        described by the tag. As a result, protocols for conveying this
        feature tag SHOULD provide a mechanism for guaranteeing
        authenticity.</t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>One of the key security concerns in this work is making sure that an
      attacker cannot hijack the sessions of a valid user and cause all calls
      destined to that user to be sent to the attacker. Note that the intent
      is not to prevent existing active attacks on SIP UDP and TCP traffic,
      but to insure that no new attacks are added by introducing the outbound
      mechanism.<!-- Note to Cullen: This last sentence is in response to a comment from
      Fredrik Thulin. --></t>

      <t>The simple case is when there are no edge proxies. In this case, the
      only time an entry can be added to the routing for a given AOR is when
      the registration succeeds. SIP already protects against attackers being
      able to successfully register, and this scheme relies on that security.
      Some implementers have considered the idea of just saving the
      instance-id without relating it to the AOR with which it registered.
      This idea will not work because an attacker's UA can impersonate a valid
      user's instance-id and hijack that user's calls.</t>

      <t>The more complex case involves one or more edge proxies. When a UA
      sends a REGISTER request through an Edge Proxy on to the registrar, the
      Edge Proxy inserts a Path header field value. If the registration is
      successfully authenticated, the registrar stores the value of the Path
      header field. Later when the registrar forwards a request destined for
      the UA, it copies the stored value of the Path header field into the
      Route header field of the request and forwards the request to the Edge
      Proxy.</t>

      <t>The only time an Edge Proxy will route over a particular flow is when
      it has received a Route header that has the flow identifier information
      that it has created. An incoming request would have gotten this
      information from the registrar. The registrar will only save this
      information for a given AOR if the registration for the AOR has been
      successful; and the registration will only be successful if the UA can
      correctly authenticate. Even if an attacker has spoofed some bad
      information in the Path header sent to the registrar, the attacker will
      not be able to get the registrar to accept this information for an AOR
      that does not belong to the attacker. The registrar will not hand out
      this bad information to others, and others will not be misled into
      contacting the attacker.</t>
      
      <t>The Security Considerations discussed in <xref target="RFC3261"/> and 
      <xref target="RFC3327"/> are also relevant to this document.  For the 
      security considerations of generating flow tokens, please also 
      see <xref target="flowtokens"/>. A discussion of preventing the avalanche
      restart problem is in <xref target="recovery"/>.</t>
      
      <t>This document does not change the mandatory to implement security 
      mechanisms in SIP.  User Agents are already required to implement Digest
      authentication while support of TLS is recommended; proxy servers 
      are already required to implement Digest and TLS.</t>
    </section>

    <section title="Operational Notes on Transports">
      <t>This entire section is non-normative.</t>

      <t>RFC 3261 requires proxies, registrars, and User Agents to implement
      both TCP and UDP but deployments can chose which transport protocols
      they want to use. Deployments need to be careful in choosing what
      transports to use. Many SIP features and extensions, such as large
      presence notification bodies, result in SIP requests that can be too
      large to be reasonably transported over UDP. RFC 3261 states that when a
      request is too large for UDP, the device sending the request attempts to
      switch over to TCP. No known deployments currently use this feature but
      it is important to note that when using outbound, this will only work if
      the UA has formed both UDP and TCP outbound flows. This specification
      allows the UA to do so but in most cases it will probably make more
      sense for the UA to form a TCP outbound connection only, rather than
      forming both UDP and TCP flows. One of the key reasons that many
      deployments choose not to use TCP has to do with the difficulty of
      building proxies that can maintain a very large number of active TCP
      connections. Many deployments today use SIP in such a way that the
      messages are small enough that they work over UDP but they can not take
      advantage of all the functionality SIP offers. Deployments that use only
      UDP outbound connections are going to fail with sufficiently large SIP
      messages.</t>
    </section>

    <section title="Requirements">
      <t>This specification was developed to meet the following
      requirements:</t>

      <t>
        <list style="numbers">
          <t>Must be able to detect that a UA supports these mechanisms.</t>

          <t>Support UAs behind NATs.</t>

          <t>Support TLS to a UA without a stable DNS name or IP address.</t>

          <t>Detect failure of a connection and be able to correct for
          this.</t>

          <t>Support many UAs simultaneously rebooting.</t>

          <t>Support a NAT rebooting or resetting.</t>

          <t>Minimize initial startup load on a proxy.</t>

          <t>Support architectures with edge proxies.</t>
        </list>
      </t>
    </section>

    <section title="Changes">
      <t>Note to RFC Editor: Please remove this whole section.</t>
      
      <section title="Changes from 09 Version">
        <t>Make outbound consistent with the latest version of STUN 3489bis draft.
        The STUN keepalive section of outbound is now a STUN usage (much less formal).
        </t><t>
        Fixed references.
        </t>
      </section>

      <section title="Changes from 08 Version">
        <t>UAs now include the 'ob' parameter in their Contact header for
        non-REGISTER requests, as a hint to the Edge Proxy (so the EP can
        Record-Route with a flow-token for example).</t>

        <t>Switched to CRLF for keepalives of connection-oriented transports
        after brutal consensus at IETF 68.</t>

        <t>Added timed-keepalive parameter and removed the unnecessary
        keep-tcp param, per consensus at IETF68.</t>

        <t>Removed example "Algorithm 1" which only worked over SIPS, per
        consensus at IETF68.</t>

        <t>Deleted text about probing and validating with options, per
        consensus at IETF68.</t>

        <t>Deleted provision for waiting 120 secs before declaring flow
        stable, per consensus at IETF68.</t>

        <t>fixed example UUIDs</t>
      </section>

      <section title="Changes from 07 Version">
        <t>Add language to show the working group what adding CRLF keepalives
        would look like.</t>

        <t>Changed syntax of keep-alive=stun to keep-stun so that it was
        easier to support multiple tags in the same URI.</t>
      </section>

      <section title="Changes from 06 Version">
        <t>Added the section on operational selection of transports.</t>

        <t>Fixed various editorial typos.</t>

        <t>Put back in requirement flow token needs to be unique to flow as it
        had accidentally been dropped in earlier version. This did not change
        any of the flow token algorithms.</t>

        <t>Reordered some of the text on STUN keepalive validation to make it
        clearer to implementors. Did not change the actual algorithm or
        requirements. Added note to explain how if the proxy changes, the
        revalidation will happen.</t>
      </section>

      <section title="Changes from 05 Version">
        <t>Mention the relevance of the 'rport' parameter.</t>

        <t>Change registrar verification so that only first-hop proxy and the
        registrar need to support outbound. Other intermediaries in between do
        not any more.</t>

        <t>Relaxed flow-token language slightly. Instead of flow-token saving
        specific UDP address/port tuples over which the request arrived, make
        language fuzzy to save token which points to a 'logical flow' that is
        known to deliver data to that specific UA instance.</t>

        <t>Added comment that keep-stun could be added to Path.</t>

        <t>Added comment that battery concerns could motivate longer TCP
        keepalive intervals than the defaults.</t>

        <t>Scrubbed document for avoidable lowercase may, should, and
        must.</t>

        <t>Added text about how Edge Proxies could determine they are the
        first hop.</t>
      </section>

      <section title="Changes from 04 Version">
        <t>Moved STUN to a separate section. Reference this section from
        within the relevant sections in the rest of the document.</t>

        <t>Add language clarifying that UA MUST NOT send STUN without an
        explicit indication the server supports STUN.</t>

        <t>Add language describing that UA MUST stop sending STUN if it
        appears the server does not support it.</t>

        <t>Defined a 'sip-stun' option tag. UAs can optionally probe servers
        for it with OPTIONS. Clarified that UAs SHOULD NOT put this in a
        Proxy-Require. Explain that the first-hop MUST support this
        option-tag.</t>

        <t>Clarify that SIP/STUN in TLS is on the "inside". STUN used with
        Sigcomp-compressed SIP is "outside" the compression layer for UDP, but
        wrapped inside the well-known shim header for TCP-based
        transports.</t>

        <t>Clarify how to decide what a consecutive registration timer is.
        Flow must be up for some time (default 120 seconds) otherwise previous
        registration is not considered successful.</t>

        <t>Change UAC MUST-->SHOULD register a flow for each member of
        outbound-proxy-set.</t>

        <t>Reworded registrar and proxy in some places (introduce the term
        "Authoritative Proxy").</t>

        <t>Loosened restrictions on always storing a complete Path vector back
        to the registrar/authoritative proxy if a previous hop in the path
        vector is reachable.</t>

        <t>Added comment about re-registration typically happening over same
        flow as original registration.</t>

        <t>Changed 410 Gone to new response code 430 Flow Failed. Was going to
        change this to 480 Temporarily Unavailable. Unfortunately this would
        mean that the authoritative proxy deletes all flows of phones who use
        480 for Do Not Disturb. Oops!</t>

        <t>Restored sanity by restoring text which explains that registrations
        with the same reg-id replace the old registration.</t>

        <t>Added text about the 'ob' parameter which is used in Path header
        field URIs to make sure that the previous proxy that added a Path
        understood outbound processing. The registrar doesn't include
        Supported: outbound unless it could actually do outbound processing
        (ex: any Path headers have to have the 'ob' parameter).</t>

        <t>Added some text describing what a registration means when there is
        an instance-id, but no reg-id.</t>
      </section>

      <section title="Changes from 03 Version">
        <t>Added non-normative text motivating STUN vs. SIP PING, OPTIONS, and
        Double CRLF. Added discussion about why TCP Keepalives are not always
        available.</t>

        <t>Explained more clearly that outbound-proxy-set can be "configured"
        using any current or future, manual or automatic
        configuration/discovery mechanism.</t>

        <t>Added a sentence which prevents an Edge Proxy from forwarding back
        over the flow over which the request is received if the request
        happens to contain a flow token for that flow. This was an
        oversight.</t>

        <t>Updated example message flow to show a fail-over example using a
        new dialog-creating request instead of a mid-dialog request. The old
        scenario was leftover from before the outbound / gruu
        reorganization.</t>

        <t>Fixed tags, Call-IDs, and branch parameters in the example
        messages.</t>

        <t>Made the ABNF use the "=/" production extension mechanism
        recommended by Bill Fenner.</t>

        <t>Added a table in an appendix expanding the default flow recovery
        timers.</t>

        <t>Incorporated numerous clarifications and rewordings for better
        comprehension.</t>

        <t>Fixed many typos and spelling steaks.</t>
      </section>

      <section title="Changes from 02 Version">
        <t>Removed Double CRLF Keepalive</t>

        <t>Changed ;sip-stun syntax to ;keepalive=stun</t>

        <t>Fixed incorrect text about TCP keepalives.</t>
      </section>

      <section title="Changes from 01 Version">
        <t>Moved definition of instance-id from GRUU<xref
        target="I-D.ietf-sip-gruu" /> draft to this draft.</t>

        <t>Added tentative text about Double CRLF Keepalive</t>

        <t>Removed pin-route stuff</t>

        <t>Changed the name of "flow-id" to "reg-id"</t>

        <t>Reorganized document flow</t>

        <t>Described the use of STUN as a proper STUN usage</t>

        <t>Added 'outbound' option-tag to detect if registrar supports
        outbound</t>
      </section>

      <section title="Changes from 00 Version">
        <t>Moved TCP keepalive to be STUN.</t>

        <t>Allowed SUBSCRIBE to create flow mappings. Added pin-route option
        tags to support this.</t>

        <t>Added text about updating dialog state on each usage after a
        connection failure.</t>
      </section>
    </section>

    <!--
<section title = "Changes from 01 Version" >
<t>
Changed the algorithm and timing for retries of re-registrations. </t>
<t>
Changed to using sigcomp style URI parameter to detect it - UA should attempt
STUN to proxy. </t>
<t>
Changed to use a configured set of secondary proxies instead of playing DNS games
to try and figure out what secondary proxies to use. </t>
</section>

<section title = "Changes from 00 Version" >
<t>
Changed the behavior of the proxy so that it does not automatically remove
registrations with the same instance-id and reg-id but instead just uses the
most recently created registration first. </t>
<t>
Changed the connection-id to reg-id. </t>
<t>
Fixed expiry of edge proxies and rewrote mechanism section to be clearer. </t>
</section>
-->

    <section title="Acknowledgments">
      <t>Jonathan Rosenberg, Erkki Koivusalo, and Byron Campben 
      provided many comments and useful text.  Dave Oran
      came up with the idea of using the most recent registration first in the
      proxy. Alan Hawrylyshen co-authored the draft that formed the initial
      text of this specification. Additionally, many of the concepts here
      originated at a connection reuse meeting at IETF 60 that included the
      authors, Jon Peterson, Jonathan Rosenberg, Alan Hawrylyshen, and Paul
      Kyzivat. The TCP design team consisting of Chris Boulton, Scott
      Lawrence, Rajnish Jain, Vijay K. Gurbani, and Ganesh Jayadevan provided
      input and text. Nils Ohlmeier provided many fixes and initial
      implementation experience. In addition, thanks to the following folks
      for useful comments: Francois Audet, Flemming Andreasen, Mike Hammer,
      Dan Wing, Srivatsa Srinivasan, Dale Worely, Juha Heinanen, Eric
      Rescorla, Lyndsay Campbell, Christer Holmberg, Kevin Johns, Jeroen van Bemmel,
      and Derek MacDonald.</t>
    </section>

    <appendix title="Default Flow Registration Backoff Times">
      <t>The base-time used for the flow re-registration backoff times
      described in <xref target="recovery" /> are configurable. If the
      base-time-all-fail value is set to the default of 30 seconds and the
      base-time-not-failed value is set to the default of 90 seconds, the
      following table shows the resulting delay values.</t>

      <texttable>
        <ttcol># of reg failures</ttcol>

        <ttcol>all flows unusable</ttcol>

        <ttcol>>1 non-failed flow</ttcol>

        <c>0</c>

        <c>0 secs</c>

        <c>0 secs</c>

        <c>1</c>

        <c>30-60 secs</c>

        <c>90-180 secs</c>

        <c>2</c>

        <c>1-2 mins</c>

        <c>3-6 mins</c>

        <c>3</c>

        <c>2-4 mins</c>

        <c>6-12 mins</c>

        <c>4</c>

        <c>4-8 mins</c>

        <c>12-24 mins</c>

        <c>5</c>

        <c>8-16 mins</c>

        <c>15-30 mins</c>

        <c>6 or more</c>

        <c>15-30 mins</c>

        <c>15-30 mins</c>
      </texttable>
    </appendix>
  </middle>

  <back>
    <references title="Normative References">

      <reference anchor="RFC2506">
        <front>
          <title>Media Feature Tag Registration Procedure</title>

          <author fullname="Koen Holtman" initials="K." surname="Holtman">
            <organization>Technische Universiteit Eindhoven</organization>

            <address>
              <postal>
                <street>Postbus 513</street>

                <street>Kamer HG 6.57</street>

                <city>Eindhoven</city>

                <code>5600 MB</code>

                <country>NL</country>
              </postal>

              <email>koen@win.tue.nl</email>
            </address>
          </author>

          <author fullname="Andrew H. Mutz" initials="A." surname="Mutz">
            <organization>Hewlett-Packard Company</organization>

            <address>
              <postal>
                <street>11000 Wolfe Road</street>

                <street>42UO</street>

                <city>Cupertino</city>

                <region>CA</region>

                <code>95014</code>

                <country>US</country>
              </postal>

              <email>andy_mutz@hp.com</email>
            </address>
          </author>

          <author fullname="Ted Hardie" initials="T." surname="Hardie">
            <organization>Equinix</organization>

            <address>
              <postal>
                <street>901 Marshall Street</street>

                <city>Redwood City</city>

                <region>CA</region>

                <code>94063</code>

                <country>US</country>
              </postal>

              <email>hardie@equinix.com</email>
            </address>
          </author>

          <date month="March" year="1999" />

          <abstract>
            <t>Recent Internet applications, such as the World Wide Web, tie
            together a great diversity in data formats, client and server
            platforms, and communities. This has created a need for media
            feature descriptions and negotiation mechanisms in order to
            identify and reconcile the form of information to the capabilities
            and preferences of the parties involved.</t>

            <t>Extensible media feature identification and negotiation
            mechanisms require a common vocabulary in order to positively
            identify media features. A registration process and authority for
            media features is defined with the intent of sharing this
            vocabulary between communicating parties. In addition, a URI tree
            is defined to enable sharing of media feature definitions without
            registration.</t>

            <t>This document defines a registration procedure which uses the
            Internet Assigned Numbers Authority (IANA) as a central registry
            for the media feature vocabulary.</t>

            <t>Please send comments to the CONNEG working group
            at<ietf-medfree@imc.org>.Discussions of the working group
            are archived at<URL: http://www.imc.org/ietf-medfree/>.</t>
          </abstract>
        </front>

        <seriesInfo name="BCP" value="31" />

        <seriesInfo name="RFC" value="2506" />

        <format octets="24892" target="ftp://ftp.isi.edu/in-notes/rfc2506.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3841">
        <front>
          <title>Caller Preferences for the Session Initiation Protocol
          (SIP)</title>

          <author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
            <organization></organization>
          </author>

          <author fullname="H. Schulzrinne" initials="H."
                  surname="Schulzrinne">
            <organization></organization>
          </author>

          <author fullname="P. Kyzivat" initials="P." surname="Kyzivat">
            <organization></organization>
          </author>

          <date month="August" year="2004" />
        </front>

        <seriesInfo name="RFC" value="3841" />

        <format octets="61382" target="ftp://ftp.isi.edu/in-notes/rfc3841.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC2141">
        <front>
          <title>URN Syntax</title>

          <author fullname="Ryan Moats" initials="R." surname="Moats">
            <organization>AT&T</organization>

            <address>
              <postal>
                <street>15621 Drexel Circle</street>

                <street>Omaha</street>

                <street>NE 68135-2358</street>

                <country>USA</country>
              </postal>

              <phone>+1 402 894-9456</phone>

              <email>jayhawk@ds.internic.net</email>
            </address>
          </author>

          <date month="May" year="1997" />

          <area>Applications</area>

          <keyword>URN</keyword>

          <keyword>uniform resource</keyword>

          <abstract>
            <t>Uniform Resource Names (URNs) are intended to serve as
            persistent, location-independent, resource identifiers. This
            document sets forward the canonical syntax for URNs. A discussion
            of both existing legacy and new namespaces and requirements for
            URN presentation and transmission are presented. Finally, there is
            a discussion of URN equivalence and how to determine it.</t>
          </abstract>
        </front>

        <seriesInfo name="RFC" value="2141" />

        <format octets="14077" target="ftp://ftp.isi.edu/in-notes/rfc2141.txt"
                type="TXT" />

        <format octets="30670"
                target="http://xml.resource.org/public/rfc/html/rfc2141.html"
                type="HTML" />

        <format octets="17551"
                target="http://xml.resource.org/public/rfc/xml/rfc2141.xml"
                type="XML" />
      </reference>

      <reference anchor="RFC2119">
        <front>
          <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate
          Requirement Levels</title>

          <author fullname="Scott Bradner" initials="S." surname="Bradner">
            <organization>Harvard University</organization>

            <address>
              <postal>
                <street>1350 Mass. Ave.</street>

                <street>Cambridge</street>

                <street>MA 02138</street>
              </postal>

              <phone>- +1 617 495 3864</phone>

              <email>sob@harvard.edu</email>
            </address>
          </author>

          <date month="March" year="1997" />

          <area>General</area>

          <keyword>keyword</keyword>
        </front>

        <seriesInfo name="BCP" value="14" />

        <seriesInfo name="RFC" value="2119" />

        <format octets="4723" target="ftp://ftp.isi.edu/in-notes/rfc2119.txt"
                type="TXT" />

        <format octets="15905"
                target="http://xml.resource.org/public/rfc/html/rfc2119.html"
                type="HTML" />

        <format octets="5661"
                target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"
                type="XML" />
      </reference>

      <reference anchor="RFC3261">
        <front>
          <title>SIP: Session Initiation Protocol</title>

          <author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
            <organization></organization>
          </author>

          <author fullname="H. Schulzrinne" initials="H."
                  surname="Schulzrinne">
            <organization></organization>
          </author>

          <author fullname="G. Camarillo" initials="G." surname="Camarillo">
            <organization></organization>
          </author>

          <author fullname="A. Johnston" initials="A." surname="Johnston">
            <organization></organization>
          </author>

          <author fullname="J. Peterson" initials="J." surname="Peterson">
            <organization></organization>
          </author>

          <author fullname="R. Sparks" initials="R." surname="Sparks">
            <organization></organization>
          </author>

          <author fullname="M. Handley" initials="M." surname="Handley">
            <organization></organization>
          </author>

          <author fullname="E. Schooler" initials="E." surname="Schooler">
            <organization></organization>
          </author>

          <date month="June" year="2002" />
        </front>

        <seriesInfo name="RFC" value="3261" />

        <format octets="647976"
                target="ftp://ftp.isi.edu/in-notes/rfc3261.txt" type="TXT" />
      </reference>

      <reference anchor="RFC3263">
        <front>
          <title>Session Initiation Protocol (SIP): Locating SIP
          Servers</title>

          <author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
            <organization></organization>
          </author>

          <author fullname="H. Schulzrinne" initials="H."
                  surname="Schulzrinne">
            <organization></organization>
          </author>

          <date month="June" year="2002" />

          <abstract>
            <t>The Session Initiation Protocol (SIP) uses DNS procedures to
            allow a client to resolve a SIP Uniform Resource Identifie r (URI)
            into the IP address, port, and transport protocol of the next hop
            to contact. It also uses DNS to allow a server to send a response
            to a backup client if the primary client has failed. This document
            describes those DNS procedures in d etail.</t>
          </abstract>
        </front>

        <seriesInfo name="RFC" value="3263" />

        <format octets="42310" target="ftp://ftp.isi.edu/in-notes/rfc3263.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3629">
        <front>
          <title>UTF-8, a transformation format of ISO 10646</title>

          <author fullname="F. Yergeau" initials="F." surname="Yergeau">
            <organization></organization>
          </author>

          <date month="November" year="2003" />
        </front>

        <seriesInfo name="STD" value="63" />

        <seriesInfo name="RFC" value="3629" />

        <format octets="33856"
                target="ftp://ftp.isi.edu/in-notes/rfc3629.txt " type="TXT" />
      </reference>

      
<reference anchor='RFC3489'>

<front>
<title>STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network
Address Translators (NATs)</title>
<author initials='J.' surname='Rosenberg' fullname='J. Rosenberg'>
<organization /></author>
<author initials='J.' surname='Weinberger' fullname='J. Weinberger'>
<organization /></author>
<author initials='C.' surname='Huitema' fullname='C. Huitema'>
<organization /></author>
<author initials='R.' surname='Mahy' fullname='R. Mahy'>
<organization /></author>
<date year='2003' month='March' />
<abstract>
<t>Simple Traversal of User Datagram Protocol (UDP) Through Network Address
Translators (NATs) (STUN) is a lightweight pro tocol that allows applications to
discover the presence and types of NATs and firewalls between them and the
public Intern et.  It also provides the ability for applications to determine
the public Internet Protocol (IP) addresses allocated to t hem by the NAT.  STUN
works with many existing NATs, and does not require any special behavior from
them.  As a result, it allows a wide variety of applications to work through
existing NAT infrastructure.</t></abstract></front>

<seriesInfo name='RFC' value='3489' />
<format type='TXT' octets='117562' target='ftp://ftp.isi.edu/in-notes/rfc3489.txt' />
</reference>


      <reference anchor="I-D.ietf-behave-rfc3489bis">
        <front>
          <title>Simple Traversal Underneath Network Address Translators (NAT)
          (STUN)</title>

          <author fullname="Jonathan Rosenberg" initials="J"
                  surname="Rosenberg">
            <organization></organization>
          </author>

          <date day="13" month="November" year="2007" />

          <abstract>
            <t>Simple Traversal Underneath NATs (STUN) is a lightweight
            protocol that serves as a tool for application protocols in
            dealing with NAT traversal. It allows a client to determine the IP
            address and port allocated to them by a NAT and to keep NAT
            bindings open. It can also serve as a check for connectivity
            between a client and a server in the presence of NAT, and for the
            client to detect failure of the server. STUN works with many
            existing NATs, and does not require any special behavior from
            them. As a result, it allows a wide variety of applications to
            work through existing NAT infrastructure.</t>
          </abstract>
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-ietf-behave-rfc3489bis-12" />

        <format target="http://www.ietf.org/internet-drafts/draft-ietf-behave-rfc3489bis-12.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC4234">
        <front>
          <title>Augmented BNF for Syntax Specifications: ABNF</title>

          <author fullname="D. Crocker" initials="D." surname="Crocker">
            <organization></organization>
          </author>

          <author fullname="P. Overell" initials="P." surname="Overell">
            <organization></organization>
          </author>

          <date month="October" year="2005" />
        </front>

        <seriesInfo name="RFC" value="4234" />

        <format octets="26351" target="ftp://ftp.isi.edu/in-notes/rfc4234.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC4122">
        <front>
          <title>A Universally Unique IDentifier (UUID) URN Namespace</title>

          <author fullname="P. Leach" initials="P." surname="Leach">
            <organization></organization>
          </author>

          <author fullname="M. Mealling" initials="M." surname="Mealling">
            <organization></organization>
          </author>

          <author fullname="R. Salz" initials="R." surname="Salz">
            <organization></organization>
          </author>

          <date month="July" year="2005" />
        </front>

        <seriesInfo name="RFC" value="4122" />

        <format octets="59319" target="ftp://ftp.isi.edu/in-notes/rfc4122.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3840">
        <front>
          <title>Indicating User Agent Capabilities in the Session Initiation
          Protocol (SIP)</title>

          <author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
            <organization></organization>
          </author>

          <author fullname="H. Schulzrinne" initials="H."
                  surname="Schulzrinne">
            <organization></organization>
          </author>

          <author fullname="P. Kyzivat" initials="P." surname="Kyzivat">
            <organization></organization>
          </author>

          <date month="August" year="2004" />
        </front>

        <seriesInfo name="RFC" value="3840" />

        <format octets="81360" target="ftp://ftp.isi.edu/in-notes/rfc3840.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3986">
        <front>
          <title abbrev="URI Generic Syntax">Uniform Resource Identifier
          (URI): Generic Sy ntax</title>

          <author fullname="Tim Berners-Lee" initials="T."
                  surname="Berners-Lee">
            <organization abbrev="W3C/MIT">World Wide Web
            Consortium</organization>

            <address>
              <postal>
                <street>Massachusetts Institute of Technology</street>

                <street>77 Massachusetts Avenue</street>

                <city>Cambridge</city>

                <region>MA</region>

                <code>02139</code>

                <country>USA</country>
              </postal>

              <phone>+1-617-253-5702</phone>

              <facsimile>+1-617-258-5999</facsimile>

              <email>timbl@w3.org</email>

              <uri>http://www.w3.org/People/Berners-Lee/</uri>
            </address>
          </author>

          <author fullname="Roy T. Fielding" initials="R." surname="Fielding">
            <organization abbrev="Day Software">Day Software</organization>

            <address>
              <postal>
                <street>5251 California Ave., Suite 110</street>

                <city>Irvine</city>

                <region>CA</region>

                <code>92617</code>

                <country>USA</country>
              </postal>

              <phone>+1-949-679-2960</phone>

              <facsimile>+1-949-679-2972</facsimile>

              <email>fielding@gbiv.com</email>

              <uri>http://roy.gbiv.com/</uri>
            </address>
          </author>

          <author fullname="Larry Masinter" initials="L." surname="Masinter">
            <organization abbrev="Adobe Systems">Adobe Systems
            Incorporated</organization>

            <address>
              <postal>
                <street>345 Park Ave</street>

                <city>San Jose</city>

                <region>CA</region>

                <code>95110</code>

                <country>USA</country>
              </postal>

              <phone>+1-408-536-3024</phone>

              <email>LMM@acm.org</email>

              <uri>http://larry.masinter.net/</uri>
            </address>
          </author>

          <date month="January" year="2005" />

          <area>Applications</area>
        </front>

        <seriesInfo name="STD" value="66" />

        <seriesInfo name="RFC" value="3986" />

        <format octets="141811"
                target="ftp://ftp.isi.edu/in-notes/rfc3986.txt" type="TXT" />

        <format octets="174704"
                target="http://xml.resource.org/public/rfc/html/rfc3986.html"
                type="HTML" />

        <format octets="151524"
                target="http://xml.resource.org/public/rfc/xml/rfc3986.xml"
                type="XML" />
      </reference>

      <reference anchor="RFC3327">
        <front>
          <title>Session Initiation Protocol (SIP) Extension Header Field for
          Registering Non-Adjacent Contacts</title>

          <author fullname="D. Willis" initials="D." surname="Willis">
            <organization></organization>
          </author>

          <author fullname="B. Hoeneisen" initials="B." surname="Hoeneisen">
            <organization></organization>
          </author>

          <date month="December" year="2002" />
        </front>

        <seriesInfo name="RFC" value="3327" />

        <format octets="36493" target="ftp://ftp.isi.edu/in-notes/rfc3327.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3968">
        <front>
          <title>The Internet Assigned Number Authority (IANA) Header Field
          Parameter Registry for the Session Initiation Protocol (SIP)</title>

          <author fullname="G. Camarillo" initials="G." surname="Camarillo">
            <organization></organization>
          </author>

          <date month="December" year="2004" />
        </front>

        <seriesInfo name="BCP" value="98" />

        <seriesInfo name="RFC" value="3968" />

        <format octets="20615" target="ftp://ftp.isi.edu/in-notes/rfc3968.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3969">
        <front>
          <title>The Internet Assigned Number Authority (IANA) Uniform
          Resource Identifier (URI) Parameter Registry for the Session
          Initiation Protocol (SIP)</title>

          <author fullname="G. Camarillo" initials="G." surname="Camarillo">
            <organization></organization>
          </author>

          <date month="December" year="2004" />
        </front>

        <seriesInfo name="BCP" value="99" />

        <seriesInfo name="RFC" value="3969" />

        <format octets="12119" target="ftp://ftp.isi.edu/in-notes/rfc3969.txt"
                type="TXT" />
      </reference>

      <reference anchor="RFC3581">
        <front>
          <title>An Extension to the Session Initiation Protocol (SIP) for
          Symmetric Response Routing</title>

          <author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
            <organization></organization>
          </author>

          <author fullname="H. Schulzrinne" initials="H."
                  surname="Schulzrinne">
            <organization></organization>
          </author>

          <date month="August" year="2003" />
        </front>

        <seriesInfo name="RFC" value="3581" />

        <format octets="66133" target="ftp://ftp.isi.edu/in-notes/rfc3581.txt"
                type="TXT" />
      </reference>
    </references>

    <references title="Informative References">
      <reference anchor="RFC3320">
        <front>
          <title>Signaling Compression (SigComp)</title>

          <author fullname="R. Price" initials="R." surname="Price">
            <organization></organization>
          </author>

          <author fullname="C. Bormann" initials="C." surname="Bormann">
            <organization></organization>
          </author>

          <author fullname="J. Christoffersson" initials="J."
                  surname="Christoffersson">
            <organization></organization>
          </author>

          <author fullname="H. Hannu" initials="H." surname="Hannu">
            <organization></organization>
          </author>

          <author fullname="Z. Liu" initials="Z." surname="Liu">
            <organization></organization>
          </author>

          <author fullname="J. Rosenberg" initials="J." surname="Rosenberg">
            <organization></organization>
          </author>

          <date month="January" year="2003" />
        </front>

        <seriesInfo name="RFC" value="3320" />

        <format octets="137035"
                target="ftp://ftp.isi.edu/in-notes/rfc3320.txt" type="TXT" />
      </reference>

      <!--
      <reference anchor='I-D.ietf-rohc-sigcomp-impl-guide'>
<front>
<title>Implementer's Guide for SigComp</title>

<author initials='A' surname='Surtees' fullname='Abigail Surtees'>
    <organization />
</author>

<date month='October' day='26' year='2006' />

<abstract><t>This document describes common misinterpretations and some ambiguit
ies in the Signalling Compression Protocol (SigComp), and offers guidance to dev
elopers to clarify any resultant problems. SigComp defines a scheme for compress
ing messages generated by application protocols such as the Session Initiation P
rotocol (SIP).</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-rohc-sigcomp-impl-guide-08' 
/>
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-rohc-sigcomp-impl
-guide-08.txt' />
</reference>


-->


      <reference anchor="I-D.ietf-sip-gruu">
        <front>
          <title>Obtaining and Using Globally Routable User Agent (UA) URIs
          (GRUU) in the Session Initiation Protocol (SIP)</title>

          <author fullname="Jonathan Rosenberg" initials="J"
                  surname="Rosenberg">
            <organization></organization>
          </author>

          <date day="11" month="October" year="2007" />
        </front>

        <seriesInfo name="Internet-Draft" value="draft-ietf-sip-gruu-15" />

        <format target="" type="TXT" />
      </reference>

      <!--
<reference anchor='I-D.ietf-sip-connect-reuse'>
<front>
<title>Connection Reuse in the Session Initiation Protocol (SIP)</title>
<author initials='R' surname='Mahy' fullname='Rohan Mahy'>
    <organization />
</author>
<date month='October' day='25' year='2004' />
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-sip-connect-reuse-03' />
<format type='TXT'
target='http://www.ietf.org/internet-drafts/draft-ietf-sip-connect-reuse-03.txt'
/>
</reference>
-->

      <!--
<reference anchor='I-D.ietf-sipping-connect-reuse-reqs'>
<front>
<title>Requirements for Connection Reuse in the Session Initiation Protocol (SIP)</title>
<author initials='R' surname='Mahy' fullname='Rohan Mahy'>
    <organization />
</author>
<date month='October' day='28' year='2002' />
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-sipping-connect-reuse-reqs-00' />
<format type='TXT'
target='http://www.ietf.org/internet-drafts/draft-ietf-sipping-connect-reuse-reqs-00.txt'
/>
</reference>
-->

      <!--
      <reference anchor="I-D.lawrence-maxforward-problems">
        <front>
          <title abbrev="Max-Forwards Problems">Problems with Max-Forwards
          Processing (and Potential Solutions)</title>

          <author fullname="Scott Lawrence" initials="S." surname="Lawrence">
            <organization>Pingtel Corp.</organization>

            <address>
              <postal>
                <street>400 West Cummings Park</street>

                <street>Suite 2200</street>

                <city>Woburn</city>

                <region>MA</region>

                <code>01801</code>

                <country>USA</country>
              </postal>

              <phone>+1 781 938 5306</phone>

              <email>slawrence@pingtel.com</email>
            </address>
          </author>

          <author fullname="Alan Hawrylyshen" initials="A."
                  surname="Hawrylyshen">
            <organization>Ditech Networks Inc.</organization>

            <address>
              <postal>
                <street>1167 Kensington Rd NW</street>

                <street>Suite 200</street>

                <city>Calgary</city>

                <region>Alberta</region>

                <code>T2N 1X7</code>

                <country>Canada</country>
              </postal>

              <phone>+1 403 806 3366</phone>

              <email>ahawrylyshen@ditechnetworks.com</email>
            </address>
          </author>

          <author fullname="Robert Sparks" initials="R." surname="Sparks">
            <organization>Estacado Systems</organization>

            <address>
              <postal>
                <street>17210 Campbell Road</street>

                <street>Suite 250</street>

                <city>Dallas</city>

                <region>Texas</region>

                <code>75254-4203</code>

                <country>USA</country>
              </postal>

              <email>RjS@nostrum.com</email>
            </address>
          </author>

          <date day="16" month="October" year="2005" />

          <area>Transport</area>

          <workgroup>SIPPING WG</workgroup>

          <keyword>I-D</keyword>

          <keyword>Internet-Draft</keyword>
        </front>
      </reference>
-->

      <reference anchor="I-D.rosenberg-sip-route-construct">
        <front>
          <title>Construction of the Route Header Field in the Session
          Initiation Protocol (SIP)</title>

          <author fullname="Jonathan Rosenberg" initials="J"
                  surname="Rosenberg">
            <organization></organization>
          </author>

          <date day="" month="" year="" />
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-rosenberg-sip-route-construct-02" />

        <format target="" type="TXT" />
      </reference>

      <reference anchor="RFC3608">
        <front>
          <title>Session Initiation Protocol (SIP) Extension Header Field for
          Service Route Discovery During Registration</title>

          <author fullname="D. Willis" initials="D." surname="Willis">
            <organization></organization>
          </author>

          <author fullname="B. Hoeneisen" initials="B." surname="Hoeneisen">
            <organization></organization>
          </author>

          <date month="October" year="2003" />
        </front>

        <seriesInfo name="RFC" value="3608" />

        <format octets="35628" target="ftp://ftp.isi.edu/in-notes/rfc3608.txt"
                type="TXT" />
      </reference>

      <reference anchor="I-D.ietf-sipping-config-framework">
        <front>
          <title>A Framework for Session Initiation Protocol User Agent
          Profile Delivery</title>

          <author fullname="Dan Petrie" initials="D" surname="Petrie">
            <organization></organization>
          </author>

          <date day="25" month="October" year="2007" />
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-ietf-sipping-config-framework-13" />

        <format target="" type="TXT" />
      </reference>

      <reference anchor="I-D.ietf-sipping-nat-scenarios">
        <front>
          <title>Best Current Practices for NAT Traversal for SIP</title>

          <author fullname="Chris Boulton" initials="C" surname="Boulton">
            <organization></organization>
          </author>

          <date day="9" month="July" year="2007" />
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-ietf-sipping-nat-scenarios-07" />

        <format target="" type="TXT" />
      </reference>
      
            <reference anchor="RFC2104">
        <front>
          <title abbrev="HMAC">HMAC: Keyed-Hashing for Message
          Authentication</title>

          <author fullname="Hugo Krawczyk" initials="H." surname="Krawczyk">
            <organization>IBM, T.J. Watson Research Center</organization>

            <address>
              <postal>
                <street>P.O.Box 704</street>

                <city>Yorktown Heights</city>

                <region>NY</region>

                <code>10598</code>

                <country>US</country>
              </postal>

              <email>hugo@watson.ibm.com</email>
            </address>
          </author>

          <author fullname="Mihir Bellare" initials="M." surname="Bellare">
            <organization>University of California at San Diego, Dept of
            Computer Science and Engineering</organization>

            <address>
              <postal>
                <street>9500 Gilman Drive</street>

                <street>Mail Code 0114</street>

                <city>La Jolla</city>

                <region>CA</region>

                <code>92093</code>

                <country>US</country>
              </postal>

              <email>mihir@cs.ucsd.edu</email>
            </address>
          </author>

          <author fullname="Ran Canetti" initials="R." surname="Canetti">
            <organization>IBM T.J. Watson Research Center</organization>

            <address>
              <postal>
                <street>P.O.Box 704</street>

                <city>Yorktown Heights</city>

                <region>NY</region>

                <code>10598</code>

                <country>US</country>
              </postal>

              <email>canetti@watson.ibm.com</email>
            </address>
          </author>

          <date month="February" year="1997" />

          <abstract>
            <t>This document describes HMAC, a mechanism for message
            authentication using cryptographic hash functions. HMAC can be
            used with any iterative cryptographic hash function, e.g., MD5,
            SHA-1, in combination with a secret shared key. The cryptographic
            strength of HMAC depends on the properties of the underlying hash
            function.</t>
          </abstract>
        </front>

        <seriesInfo name="RFC" value="2104" />

        <format octets="22297" target="ftp://ftp.isi.edu/in-notes/rfc2104.txt"
                type="TXT" />
      </reference>

<!--      <reference anchor="RFC3548">
        <front>
          <title>The Base16, Base32, and Base64 Data Encodings</title>

          <author fullname="S. Josefsson" initials="S." surname="Josefsson">
            <organization></organization>
          </author>

          <date month="July" year="2003" />
        </front>

        <seriesInfo name="RFC" value="3548" />

        <format octets="26363" target="ftp://ftp.isi.edu/in-notes/rfc3548.txt"
                type="TXT" />
      </reference>  -->

      <?rfc include="reference.RFC.4648"?>
      <?rfc include="reference.RFC.2782"?>
      <?rfc include="reference.RFC.4346"?>
    </references>
  </back>
</rfc>

PAFTECH AB 2003-20262026-04-21 20:22:54