<?xml version="1.0" encoding="US-ASCII"?> version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc='yes' ?> "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
number="8839"
obsoletes="5245, 6336"
updates=""
category="std"
consensus="true"
docName="draft-ietf-mmusic-ice-sip-sdp-39"
ipr="pre5378Trust200902" obsoletes="5245">
submissionType="IETF"
xml:lang="en"
tocInclude="true"
symRefs="true"
sortRefs="true"
version="3">
  <!-- xml2rfc v2v3 conversion 2.30.0 -->

  <front>
    <title abbrev="ICE SDP Usage">Session Description Protocol (SDP) Offer/Answer procedures Procedures for Interactive Connectivity Establishment (ICE)</title>
    <seriesInfo name="RFC" value="8839"/>
    <author surname="Petit-Huguenin" initials="M.P." initials="M." fullname="Marc Petit-Huguenin">
      <organization>Impedance Mismatch</organization>
      <address>
        <email>marc@petit-huguenin.org</email>
      </address>
    </author>
    <author surname="Nandakumar" initials="S.N." initials="S." fullname="Suhas Nandakumar">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>707 Tasman Dr</street>
          <city>Milpitas</city>
          <region>CA</region>
          <code>95035</code>
          <country>USA</country>
          <country>United States of America</country>
        </postal>
        <email>snandaku@cisco.com</email>
      </address>
    </author>
    <author fullname="Christer Holmberg" initials="C.H." initials="C." surname="Holmberg">
      <organization abbrev="Ericsson">Ericsson</organization>
      <address>
        <postal>
          <street>Hirsalantie 11</street>
          <city>Jorvas</city>
          <region/>
          <code>02420</code>
          <country>Finland</country>
        </postal>
        <email>christer.holmberg@ericsson.com</email>
      </address>
    </author>

    <author surname="Keranen" initials="A.K." surname="Keränen" initials="A." fullname="Ari Keranen"> Keränen">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street/>
          <city>Jorvas</city>
          <code>02420</code>
          <country>Finland</country>
        </postal>
        <email>ari.keranen@ericsson.com</email>
      </address>
    </author>
    <author fullname="Roman Shpount" initials="R.S." initials="R." surname="Shpount">
      <organization abbrev="TurboBridge">TurboBridge</organization>
      <address>
        <postal>
          <street>4905 Del Ray Avenue, Suite 300</street>
          <city>Bethesda</city>
          <region>MD</region>
          <code>20814</code>
          <country>USA</country>
          <country>United States of America</country>
        </postal>
        <phone>+1 (240) 292-6632</phone>
        <email>rshpount@turbobridge.com</email>
      </address>
    </author>
    <date day="13" month="August" year="2019"/>
    <area>RAI</area> month="January" year="2021"/>
    <area>ART</area>
    <workgroup>MMUSIC</workgroup>
    <keyword>SIP</keyword>
    <keyword>Session Initial Protocol</keyword>
    <abstract>
      <t>
This document describes Session Description Protocol (SDP) Offer/Answer
procedures for carrying out Interactive Connectivity Establishment (ICE)
between the agents.
</t>

      <t>
This document obsoletes RFC 5245. RFCs 5245 and 6336.
</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction"> numbered="true" toc="default">
      <name>Introduction</name>
      <t>
This document describes how Interactive Connectivity Establishment (ICE) is
used with Session Description Protocol (SDP) offer/answer <xref target="RFC3264"/>.
target="RFC3264" format="default"/>. The ICE specification <xref target="RFC8445"/>
target="RFC8445" format="default"/> describes procedures that are common to
all usages of ICE ICE, and this document gives the additional details needed to
use ICE with SDP offer/answer.
</t>

      <t>This document obsoletes RFC 5245. RFCs 5245 and 6336. </t>
<t hangText="Note:">
      <t>
NOTE: Previously both the common ICE procedures, and the SDP offer/answer
specific details, were described in<xref target="RFC5245"/>. in <xref target="RFC8445"/> target="RFC5245"
format="default"/>. <xref target="RFC8445" format="default"/> obsoleted <xref target="RFC5245"/>,
target="RFC5245" format="default"/>, and the SDP offer/answer specific offer/answer-specific details
were removed from the document. <xref target="sec.5245"/> target="sec.5245" format="default"/>
describes the changes to the SDP offer/answer specific offer/answer-specific details specified in
this document.
</t>
    </section>
    <section title="Conventions"> numbered="true" toc="default">
      <name>Conventions</name>
      <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
        "MAY", "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as described in BCP 14 BCP&nbsp;14 <xref target="RFC2119"></xref> target="RFC2119"/>
    <xref target="RFC8174"></xref> target="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here.
      </t>
    </section>
    <section title="Terminology"> numbered="true" toc="default">
      <name>Terminology</name>
      <t>
Readers should be familiar with the terminology defined in <xref target="RFC3264"/>,
target="RFC3264" format="default"/>, in <xref target="RFC8445"/> target="RFC8445"
format="default"/>, and the following:
</t>
      <t>
        <list style="hanging">
          <t hangText="Default Destination/Candidate:">

      <dl newline="false" spacing="normal">
        <dt>Default Destination/Candidate:</dt>
        <dd>
The default destination for a component of a data stream is the transport
address that would be used by an agent that is not ICE aware. A default
candidate for a component is one whose transport address matches the default
destination for that component. For the RTP component, the default connection
address is in the "c=" line of the SDP, and the port and transport protocol
are in the "m=" line. For the RTCP RTP Control Protocol (RTCP) component, the
address and port are indicated using the "a=rtcp" "rtcp" attribute defined in <xref target="RFC3605"/>,
target="RFC3605" format="default"/>, if present; otherwise, the RTCP component
address is the same as the address of the RTP component, and its port is one
greater than the port of the RTP component.
</t>
        </list>
      </t>
</dd>
      </dl>
    </section>
    <section title="SDP numbered="true" toc="default">
      <name>SDP Offer/Answer Procedures"> Procedures</name>
      <section title="Introduction"> numbered="true" toc="default">
        <name>Introduction</name>
        <t><xref target="RFC8445"/> target="RFC8445" format="default"/> defines ICE candidate
        exchange as the process for ICE agents (Initiator (initiator and Responder) responder) to
        exchange their candidate information required for ICE processing at
        the agents. For the purposes of this specification, the candidate
        exchange process corresponds to the <xref target="RFC3264"/> Offer/Answer protocol <xref
        target="RFC3264" format="default"/>, and the terms "offerer" and
        "answerer" correspond to the initiator and responder roles from <xref target="RFC8445"/>
        target="RFC8445" format="default"/> respectively.
</t>
        <t>
Once the initiating agent has gathered, pruned, and prioritized its set of
candidates <xref target="RFC8445"/>, target="RFC8445" format="default"/>, the candidate exchange
with the peer agent begins.
</t>
      </section>
      <section title="Generic Procedures"> numbered="true" toc="default">
        <name>Generic Procedures</name>
        <section anchor="sec-encoding" title="Encoding"> numbered="true" toc="default">
          <name>Encoding</name>
          <t><xref target="sec-grammar"/> target="sec-grammar" format="default"/> provides detailed
          rules for constructing various SDP attributes defined in this
          specification.
</t>
          <section title="Data Streams"> numbered="true" toc="default">
            <name>Data Streams</name>
            <t>
Each data stream <xref target="RFC8445"/> target="RFC8445" format="default"/> is represented by
an SDP media description ("m=" section).
</t>
          </section>
          <section title="Candidates"> numbered="true" toc="default">
            <name>Candidates</name>
            <t>
Within an "m=" section, each candidate (including the default candidate) associated
with the data stream is represented by an SDP candidate "candidate" attribute.
</t>
            <t>
Prior to nomination, the "c=" line associated with an "m=" section contains
the connection address of the default candidate, while the "m=" line contains the port
and transport protocol of the default candidate for that "m=" section.
</t>
            <t>
After nomination, the "c=" line for a given "m=" section contains the
connection address of the nominated candidate (the local candidate of the
nominated candidate pair) pair), and the "m=" line contains the port and
transport protocol corresponding to the nominated candidate for that
"m=" section.
</t>
          </section>
          <section title="Username numbered="true" toc="default">
            <name>Username and Password"> Password</name>
            <t>
The ICE username is represented by an SDP ice-ufrag attribute "ice-ufrag" attribute, and the ICE
password is represented by an SDP ice-pwd "ice-pwd" attribute.
</t>
          </section>
          <section title="Lite Implementations"> numbered="true" toc="default">
            <name>Lite Implementations</name>
            <t>
An ICE lite ICE-lite implementation <xref target="RFC8445"/> MUST target="RFC8445" format="default"/> <bcp14>MUST</bcp14> include an SDP ice-lite "ice-lite" attribute.
A full implementation MUST NOT <bcp14>MUST NOT</bcp14> include that attribute.
</t>
          </section>
          <section title="ICE Extensions"> numbered="true" toc="default">
            <name>ICE Extensions</name>
            <t>
An agent uses the SDP ice-options "ice-options" attribute to indicate support of ICE
extensions.
</t>
            <t>
An agent compliant to with this specification MUST <bcp14>MUST</bcp14> include an SDP ice-options "ice-options"
attribute with an "ice2" attribute value <xref target="RFC8445"/>. target="RFC8445" format="default"/>. If an agent receives an SDP offer
or answer that indicates ICE support, but that does not contain an SDP ice-options "ice-options" attribute with an "ice2" attribute value,
the agent can assume that the peer is compliant to <xref target="RFC5245"/>. target="RFC5245" format="default"/>.
</t>
          </section>
          <section title="Inactive numbered="true" toc="default">
            <name>Inactive and Disabled Data Streams"> Streams</name>
            <t>
If an "m=" section is marked as inactive <xref target="RFC4566"/>, target="RFC4566" format="default"/>, or has a bandwidth
value of zero <xref target="RFC4566"/>, target="RFC4566" format="default"/>, the agent MUST <bcp14>MUST</bcp14> still include ICE-related SDP
attributes.
</t>
            <t>
If the port value associated with an "m=" section is set to zero (implying a
disabled stream) as defined in section 8.2 of <xref target="RFC3264"/>, target="RFC3264" sectionFormat="of" section="8.2" format="default"/>, the agent SHOULD NOT <bcp14>SHOULD NOT</bcp14>
include ICE-related SDP candidate "candidate" attributes in that "m=" section, unless an
SDP extension specifying otherwise is used.
</t>
          </section>
        </section>
        <section title="RTP/RTCP Considerations"> numbered="true" toc="default">
          <name>RTP/RTCP Considerations</name>
          <t>
If an agent utilizes both RTP and RTCP, and separate ports
are used for RTP and RTCP, the agent MUST <bcp14>MUST</bcp14> include SDP candidate "candidate"
attributes for both the RTP and RTCP components.
</t>
          <t>
The agent includes an SDP rtcp "rtcp" attribute following the procedures
in <xref target="RFC3605"/>. target="RFC3605" format="default"/>. Hence, in the cases where the RTCP
port value is one higher than the RTP port value and the RTCP component
address the same as the address of the RTP component, the SDP rtcp "rtcp" attribute
might be omitted.
</t>
          <t>
NOTE: <xref target="RFC5245"/> target="RFC5245" format="default"/> required that an agent always includes the
SDP rtcp "rtcp" attribute, even if the RTCP port value was one higher than the
RTP port value. This specification aligns the rtcp "rtcp" attribute procedures
with <xref target="RFC3605"/>. target="RFC3605" format="default"/>.
</t>
          <t>
If the agent does not utilize RTCP, it indicates that by including b=RS:0 "RS:0"
and b=RR:0 "RR:0" SDP attributes, attributes as described in <xref target="RFC3556"/>. target="RFC3556" format="default"/>.
</t>
        </section>
        <section title="Determining Role"> numbered="true" toc="default">
          <name>Determining Role</name>
          <t>
The offerer acts as the Initiating initiating agent. The answerer acts as the
Responding
responding agent. The ICE roles (controlling and controlled) are determined
using the procedures in <xref target="RFC8445"/>. target="RFC8445" format="default"/>.
</t>
        </section>
        <section title="STUN Considerations"> numbered="true" toc="default">
          <name>STUN Considerations</name>
          <t>
Once an agent has provided its local candidates to its peer in an SDP
offer or answer, the agent MUST <bcp14>MUST</bcp14> be prepared to receive STUN
(Session Traversal Utilities for NAT, <xref target="RFC5389" format="default"/>) connectivity
check Binding requests on those candidates.
</t>
        </section>
        <section anchor="sec-ice-mismatch" title="Verifying numbered="true" toc="default">
          <name>Verifying ICE Support Procedures"> Procedures</name>
          <t>
            An ICE agent is considered to indicate indicates support of ICE by including
            at least the SDP ice-pwd "ice-pwd" and ice-ufrag "ice-ufrag" attributes in an offer or answer.
            An ICE agent compliant with this specification MUST <bcp14>MUST</bcp14> also include an
            SDP ice-options "ice-options" attribute with an "ice2" attribute value.
          </t>
          <t>
The agents will proceed with the ICE procedures defined in <xref target="RFC8445"/> target="RFC8445" format="default"/> and
this specification if, for each data stream in the SDP it received, the
default destination for each component of that data stream appears in
a candidate "candidate" attribute. For example, in the case of RTP, the
connection address, port, and transport protocol in the
"c=" and "m=" lines, respectively, appear in a candidate
attribute "candidate"
attribute, and the value in the rtcp "rtcp" attribute appears in a candidate "candidate"
attribute.
</t>
          <t>
This specification provides no guidance on how an agent should proceed
in the cases where the above condition is not met with the few
exceptions noted below:
</t>
          <t>
            <list style="numbers">
              <t>
          <ol spacing="normal" type="1">
            <li>
The presence of certain application layer gateways Application Layer Gateways might modify
the transport address information as described in <xref target="sec-alg-sip"/>. target="sec-alg-sip" format="default"/>.
The behavior of the responding agent in such a situation is
implementation dependent. Informally, the responding agent might
consider the mismatched transport address information as a
plausible new candidate learnt learned from the peer and continue its
ICE processing with that transport address included.
Alternatively, the responding agent MAY <bcp14>MAY</bcp14> include an "a=ice-mismatch" "ice-mismatch"
attribute in its answer for such data streams.  If an agent chooses to
include an "a=ice-mismatch" "ice-mismatch" attribute in its answer for a data stream,
then it MUST <bcp14>MUST</bcp14> also omit "a=candidate" "candidate" attributes, MUST <bcp14>MUST</bcp14> terminate
the usage of ICE procedures procedures, and <xref target="RFC3264"/> target="RFC3264" format="default"/>
procedures MUST <bcp14>MUST</bcp14> be used instead for this data stream.

</t>
              <t>

</li>
            <li>
The transport address from the peer for the default destination
is set to IPv4/IPv6 address values "0.0.0.0"/"::" and port value of "9".
This MUST NOT <bcp14>MUST NOT</bcp14> be considered as a an ICE failure by the peer agent agent, and
the ICE processing MUST <bcp14>MUST</bcp14> continue as usual.

</t>
              <t>

</li>
            <li>
In some cases, the controlling/initiator agent may receive the an SDP answer
that may omit "a=candidate" "candidate" attributes for the data stream, and instead
include a media level "a=ice-mismatch" media-level "ice-mismatch" attribute.  This signals to the
offerer that the answerer supports ICE, but that ICE processing was not
used for this data stream. In this case, ICE processing MUST <bcp14>MUST</bcp14> be terminated
for this data stream stream, and <xref target="RFC3264"/> target="RFC3264" format="default"/> procedures MUST <bcp14>MUST</bcp14> be followed instead.

</t>
              <t>

</li>
            <li>
The transport address from the peer for the default destination is
an FQDN. Regardless of the procedures used to resolve FQDN or the
resolution result, this MUST NOT <bcp14>MUST NOT</bcp14> be considered as a an ICE failure by
the peer agent agent, and the ICE processing MUST <bcp14>MUST</bcp14> continue as usual.

</t>
            </list>
          </t>

</li>
          </ol>
        </section>
        <section title="SDP Example"> numbered="true" toc="default">
          <name>SDP Example</name>
          <t>
The following is an example SDP message that includes ICE attributes
(lines folded for readability):
</t>
          <figure>
            <artwork><![CDATA[
          <sourcecode name="" type="sdp"><![CDATA[
v=0
o=jdoe 2890844526 2890842807 IN IP4 203.0.113.141
s=
c=IN IP4 192.0.2.3
t=0 0
a=ice-options:ice2
a=ice-pacing:50
a=ice-pwd:asd88fgpdd777uzjYhagZg
a=ice-ufrag:8hhY
m=audio 45664 RTP/AVP 0
b=RS:0
b=RR:0
a=rtpmap:0 PCMU/8000
a=candidate:1 1 UDP 2130706431 203.0.113.141 8998 typ host
a=candidate:2 1 UDP 1694498815 192.0.2.3 45664 typ srflx raddr
 203.0.113.141 rport 8998
]]></artwork>
          </figure>
]]></sourcecode>
        </section>
      </section>
      <section title="Initial numbered="true" toc="default">
        <name>Initial Offer/Answer Exchange"> Exchange</name>
        <section title="Sending numbered="true" toc="default">
          <name>Sending the Initial Offer"> Offer</name>
          <t>
When an offerer generates the initial offer, in each "m=" section it MUST <bcp14>MUST</bcp14>
include SDP candidate "candidate" attributes for each available candidate associated
with the "m=" section. In addition, the offerer MUST <bcp14>MUST</bcp14> include an SDP ice-ufrag "ice-ufrag"
attribute, an SDP ice-pwd attribute "ice-pwd" attribute, and an SDP ice-options "ice-options" attribute with
an "ice2" attribute value in the offer. If the offerer is a full ICE implementation,
it SHOULD <bcp14>SHOULD</bcp14> include an ice-pacing "ice-pacing" attribute in the offer (if not included, the
default value will apply). A lite ICE implementation MUST NOT included <bcp14>MUST NOT</bcp14> include the ice-pacing "ice-pacing"
attribute in the offer (as it will not perform connectivity checks).
</t>
          <t>
It is valid for an offer "m=" line to include no SDP candidate "candidate" attributes
and with have the default destination set to the IP address values
"0.0.0.0"/"::" and the port value of to "9".
This implies that the offering agent is only going to use peer reflexive peer-reflexive
candidates or that will provide additional candidates
would be provided in subsequent signaling
messages.
</t>
          <t>
            <list style="hanging">
              <t hangText="Note:">
          <dl newline="false" spacing="normal">
            <dt>Note:</dt>
            <dd>
Within the scope of this document, "Initial Offer" "initial offer" refers to the first
SDP offer that is sent in order to negotiate usage of ICE. It might, or
might not, be the initial SDP offer of the SDP session.
</t>
            </list>
          </t>
          <t>
            <list style="hanging">
              <t hangText="Note:">
</dd>
          </dl>
          <dl newline="false" spacing="normal">
            <dt>Note:</dt>
            <dd>
The procedures in this document only consider "m=" sections associated
with data streams where ICE is used.
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="Sending numbered="true" toc="default">
          <name>Sending the Initial Answer"> Answer</name>

          <t>
When an answerer receives an initial offer that indicates indicating
that the offerer supports ICE, and if the answerer accepts
the offer and the usage of ICE, the answerer <bcp14>MUST</bcp14> include
in each "m=" section within the answer, it MUST include answer the SDP candidate "candidate"
attributes for each available candidate associated with
the "m=" section.
In addition, the answerer MUST <bcp14>MUST</bcp14> include an SDP ice-ufrag "ice-ufrag"
attribute, an SDP ice-pwd attribute "ice-pwd" attribute, and an SDP ice-options "ice-options"
attribute with an "ice2" attribute value in the answer. If the
answerer is a full ICE implementation, it SHOULD <bcp14>SHOULD</bcp14> include an
ice-pacing
"ice-pacing" attribute in the answerer answer (if not included, the
default value will apply). A lite ICE implementation MUST NOT
included <bcp14>MUST NOT</bcp14>
include the ice-pacing "ice-pacing" attribute in the answer (as it will
not perform connectivity chekcks). checks).
</t>
          <t>
In each "m=" line, the answerer MUST <bcp14>MUST</bcp14> use the same transport
protocol as was used in the offer "m=" line. If none of
the candidates in the "m=" line in the answer use uses the same
transport protocol as indicated in the offer "m=" line,
then, in order to avoid ICE mismatch, the default destination
MUST
<bcp14>MUST</bcp14> be set to IP address values "0.0.0.0"/"::" and
port value of "9".
</t>

          <t>
It is also valid for an answer "m=" line to include no SDP
candidate
"candidate" attributes and with have the default destination set
to the IP address values "0.0.0.0"/"::" and the port value of to "9".
This implies that the answering agent is only going to use peer
reflexive
peer-reflexive candidates or that additional candidates would be
provided in subsequent signaling messages.
</t>
          <t>
Once the answerer has sent the answer, it can start performing
connectivity checks towards the peer candidates that were provided
in the offer.
</t>
          <t>
If the offer does not indicate support of ICE <xref target="sec-ice-mismatch"/>, (<xref target="sec-ice-mismatch" format="default"/>), the answerer
MUST NOT
<bcp14>MUST NOT</bcp14> accept the usage of ICE. If the answerer still accepts
the offer, the answerer MUST NOT <bcp14>MUST NOT</bcp14> include any ICE-related SDP
attributes in the answer. Instead Instead, the answerer will generate
the answer according to normal offer/answer procedures <xref target="RFC3264"/>. target="RFC3264" format="default"/>.
</t>
          <t>
If the answerer detects a possibility of an ICE mismatch,
procedures described in <xref target="sec-ice-mismatch"/> target="sec-ice-mismatch" format="default"/> are followed.
</t>
        </section>
        <section title="Receiving numbered="true" toc="default">
          <name>Receiving the Initial Answer"> Answer</name>
          <t>
When an offerer receives an initial answer that indicates
that the answerer supports ICE, it can start performing
connectivity checks towards the peer candidates that were
provided in the answer.
</t>
          <t>
If the answer does not indicate that the answerer supports ICE, or if the
answerer included "a=ice-mismatch" "ice-mismatch" attributes for all the active data streams
in the answer, the offerer MUST <bcp14>MUST</bcp14> terminate the usage of ICE for
the entire session session, and <xref target="RFC3264"/> target="RFC3264" format="default"/> procedures MUST
<bcp14>MUST</bcp14> be followed instead.
</t>

          <t>
On the other hand, if the answer indicates support for
ICE but includes "a=ice-mismatch" "ice-mismatch" in certain active data
streams, then the offerer MUST <bcp14>MUST</bcp14> terminate the usage of ICE
procedures
procedures, and <xref target="RFC3264"/> target="RFC3264" format="default"/> procedures
MUST
<bcp14>MUST</bcp14> be used instead for only these data streams. Also, ICE
procedures MUST <bcp14>MUST</bcp14> be used for data streams where an "a=ice-mismatch" "ice-mismatch"
attribute was not included.
</t>
          <t>
If the offerer detects an ICE mismatch for one or more data streams in the
answer, as described in <xref target="sec-ice-mismatch"/>, target="sec-ice-mismatch" format="default"/>,
the offerer MUST <bcp14>MUST</bcp14> terminate the usage of ICE for the entire
session.  The subsequent actions taken by the offerer are implementation
dependent and are out of the scope of this specification.
</t>
        </section>
        <section title="Concluding ICE"> numbered="true" toc="default">
          <name>Concluding ICE</name>
          <t>
Once the agent has successfully nominated a pair <xref target="RFC8445"/>, target="RFC8445"
format="default"/>, the state of the checklist associated with the pair is set
to Completed. Once the state of each checklist is set to either Completed or
Failed, for each Completed checklist checklist, the agent checks whether the nominated
pair matches the default candidate pair. If there are one or more pairs that
do not match, and the peer did not indicate support for the 'ice2' ice-option,
the controlling agent
MUST <bcp14>MUST</bcp14> generate a subsequent offer, offer in which
the connection address, port port, and transport protocol in the "c=" and "m="
lines associated with each data stream match the corresponding local
information of the nominated pair for that data stream (<xref target="sec-send-subsequent-offer-after-nom"/>).
target="sec-send-subsequent-offer-after-nom" format="default"/>).  If the peer
did indicate support for the 'ice2' ice-option, the controlling agent does not
immediately need to generate an updated offer in order to align a connection
address, port port, and protocol with a nominated pair. However, later in the
session, whenever the controlling agent does sent send a subsequent offer, it MUST
<bcp14>MUST</bcp14> do the alignment as described above.
          </t>
          <t>
If there are one or more checklists with the state set to Failed, the
controlling agent MUST <bcp14>MUST</bcp14> generate a subsequent offer in order to
remove the associated data streams by setting the port value of the data
streams to zero (<xref target="sec-send-subsequent-offer-remove"/>), target="sec-send-subsequent-offer-remove"
format="default"/>), even if the peer did indicate support for the 'ice2'
ice-option. If needed, such offer is used to align the connection address, port
port, and transport protocol, as described above.
          </t>
          <t>
As described in <xref target="RFC8445"/>, target="RFC8445" format="default"/>, once the controlling agent has nominated
a candidate pair for a checklist, the agent MUST NOT <bcp14>MUST NOT</bcp14> nominate another pair
for that checklist during the lifetime of the ICE session (i.e. (i.e., until
ICE is restarted).
</t>

          <t>
  <xref target="draft-ietf-ice-pac"/> target="RFC8863" format="default"/> provides a mechanism for
  allowing the ICE process to run long enough in order to find working candidate pairs,
  by waiting for potential peer-reflexive candidates, even though no candidate pairs were
  received from the peer or all current candidate pairs associated with a checklist have
  either failed or been discarded. It is OPTIONAL for an ICE agent to support the mechanism.
</t>
        </section>
      </section>
      <section title="Subsequent numbered="true" toc="default">
        <name>Subsequent Offer/Answer Exchanges"> Exchanges</name>
        <t>
Either agent MAY <bcp14>MAY</bcp14> generate a subsequent offer at any time allowed by
<xref target="RFC3264"/>. target="RFC3264" format="default"/>. This section defines rules for construction of subsequent
offers and answers.
</t>
        <t>
Should a subsequent offer fail, ICE processing continues as if the
subsequent offer had never been made.
</t>
        <section anchor="sec-send-subsequent-offer" title="Sending numbered="true" toc="default">
          <name>Sending Subsequent Offer"> Offer</name>
          <section title="Procedures numbered="true" toc="default">
            <name>Procedures for All Implementations"> Implementations</name>
            <section anchor="sec-suboffer-restarts" title="ICE Restart"> numbered="true" toc="default">
              <name>ICE Restart</name>
              <t>
An agent MAY <bcp14>MAY</bcp14> restart ICE processing for an existing data stream <xref target="RFC8445"/>. target="RFC8445" format="default"/>.
</t>
              <t>
The rules governing the ICE restart imply that setting the connection address
in the "c=" line to "0.0.0.0" (for IPv4)/ "::" (for IPv6) will cause an ICE restart.
Consequently, ICE implementations MUST NOT <bcp14>MUST NOT</bcp14> utilize this mechanism for call hold,
and instead MUST <bcp14>MUST</bcp14> use "a=inactive" "inactive" and "a=sendonly" "sendonly" as described in
<xref target="RFC3264"/>. target="RFC3264" format="default"/>.
</t>
              <t>
To restart ICE, an agent MUST <bcp14>MUST</bcp14> change both the ice-pwd "ice-pwd" and the ice-ufrag "ice-ufrag" for
the data stream in an offer. However, it is permissible to use a session-level
attribute in one offer, but to provide the same ice-pwd "ice-pwd" or ice-ufrag "ice-ufrag" as a
media-level attribute in a subsequent offer. This MUST NOT <bcp14>MUST NOT</bcp14> be considered
as ICE restart.
</t>
              <t>
An agent sets the rest of the ICE-related fields in the SDP for this data stream as it
would in an initial offer of this data stream (<xref target="sec-encoding"/>). target="sec-encoding" format="default"/>).
Consequently, the set of candidates MAY <bcp14>MAY</bcp14> include some, none, or all of the
previous candidates for that data stream and MAY <bcp14>MAY</bcp14> include a totally new set of
candidates. The agent MAY <bcp14>MAY</bcp14> modify the attribute values of the SDP ice-options "ice-options" and
SDP ice-pacing "ice-pacing" attributes, and it MAY <bcp14>MAY</bcp14> change its role using the SDP ice-lite "ice-lite" attribute.
The agent MUST NOT <bcp14>MUST NOT</bcp14> modify the SDP ice-options, ice-pacing "ice-options", "ice-pacing", and ice-lite "ice-lite" attributes in a
subsequent offer unless the offer is sent in order to request an ICE restart.
</t>
            </section>
            <section title="Removing anchor="sec-send-subsequent-offer-remove" numbered="true" toc="default">
              <name>Removing a Data Stream" anchor="sec-send-subsequent-offer-remove"> Stream</name>
              <t>
If an agent removes a data stream by setting its port to zero, it MUST NOT <bcp14>MUST NOT</bcp14>
include any candidate "candidate" attributes for that data stream and SHOULD NOT <bcp14>SHOULD NOT</bcp14> include
any other ICE-related attributes defined in <xref target="sec-grammar"/> target="sec-grammar" format="default"/> for that data stream.
</t>
            </section>
            <section title="Adding numbered="true" toc="default">
              <name>Adding a Data Stream"> Stream</name>
              <t>
If an agent wishes to add a new data stream, it sets the fields in the SDP for
this data stream as if this were an initial offer for that data stream
(<xref target="sec-encoding"/>). target="sec-encoding" format="default"/>). This will cause ICE processing to begin for this data stream.
</t>
            </section>
          </section>
          <section title="Procedures numbered="true" toc="default">
            <name>Procedures for Full Implementations"> Implementations</name>
            <t>
This section describes additional procedures for full implementations,
covering existing data streams.
</t>
            <section title="Before Nomination"> numbered="true" toc="default">
              <name>Before Nomination</name>
              <t>
When an offerer sends a subsequent offer; in each "m=" section for which a
candidate pair has not yet been nominated, the offer MUST <bcp14>MUST</bcp14> include the
same set of ICE-related information that the offerer included in the
previous offer or answer. The agent MAY <bcp14>MAY</bcp14> include additional candidates
it did not offer previously, but which it has gathered since the last
offer/answer exchange, including peer reflexive peer-reflexive candidates.
</t>
              <t>
The agent MAY <bcp14>MAY</bcp14> change the default destination for media. As with initial
offers, there MUST <bcp14>MUST</bcp14> be a set of candidate "candidate" attributes in the offer matching
this default destination.
</t>
            </section>
            <section title="After Nomination" anchor="sec-send-subsequent-offer-after-nom"> anchor="sec-send-subsequent-offer-after-nom" numbered="true" toc="default">
              <name>After Nomination</name>
              <t>
Once a candidate pair has been nominated for a data stream, the connection address,
port
port, and transport protocol in each "c=" and "m=" line associated with that data
stream MUST <bcp14>MUST</bcp14> match the data associated with the nominated pair for that
data stream. In addition, the offerer only includes SDP candidates "candidate" attributes
(one per component) representing the local candidates of the nominated candidate pair.
The offerer MUST NOT <bcp14>MUST NOT</bcp14> include any other SDP candidate "candidate" attributes in the
subsequent offer.
</t>
              <t>
In addition, if the agent is controlling, it MUST <bcp14>MUST</bcp14> include the
"a=remote-candidates"
"remote-candidates" attribute for each data stream whose checklist
is in the Completed state. The attribute contains the remote candidates
corresponding to the nominated pair in the valid list for each
component of that data stream. It is needed to avoid a race condition
whereby the controlling agent chooses its pairs, but the updated offer
beats the connectivity checks to the controlled agent, which doesn&#8217;t doesn't
even know these pairs are valid, let alone selected. See Appendix B <xref target="sec-why-remote" format="default"/>
for elaboration on this race condition.
</t>
            </section>
          </section>
          <section title="Procedures numbered="true" toc="default">
            <name>Procedures for Lite Implementations"> Implementations</name>
            <t>
If the ICE state is Running, a lite implementation MUST <bcp14>MUST</bcp14> include all of
its candidates for each component of each data stream in "a=candidate" "candidate"
attributes in any subsequent offer. The candidates are formed identically
to the procedures for initial offers.
</t>
            <t>
A lite implementation MUST NOT <bcp14>MUST NOT</bcp14> add additional host candidates in a
subsequent offer, and MUST NOT <bcp14>MUST NOT</bcp14> modify the username fragments and
passwords. If an agent needs to offer additional candidates, or
to modify the username fragments and passwords, it MUST <bcp14>MUST</bcp14> request an
ICE restart (<xref target="sec-suboffer-restarts"/>) target="sec-suboffer-restarts" format="default"/>) for that data stream.
</t>
            <t>
If ICE has completed for a data stream stream, and if the agent is controlled,
the default destination for that data stream MUST <bcp14>MUST</bcp14> be set to the
remote candidate of the candidate pair for that component in the valid list.
For a lite implementation, there is always just a single candidate pair in
the valid list for each component of a data stream. Additionally, the agent
MUST
<bcp14>MUST</bcp14> include a candidate "candidate" attribute for each default destination.
</t>
            <t>
If the ICE state is Completed Completed, and if the agent is controlling (which only
happens when both agents are lite), the agent MUST <bcp14>MUST</bcp14> include the
"a=remote-candidates"
"remote-candidates" attribute for each data stream.  The attribute
contains the remote candidates from the candidate pairs in the
valid list (one pair for each component of each data stream).
</t>
          </section>
        </section>
        <section anchor="sec-subsequent-answer" title="Sending numbered="true" toc="default">
          <name>Sending Subsequent Answer"> Answer</name>
          <t>
If ICE is Completed for a data stream, and the offer for that data
stream lacked the "a=remote-candidates" "remote-candidates" attribute, the rules for
construction of the answer are identical to those for the offerer,
except that the answerer MUST NOT <bcp14>MUST NOT</bcp14> include the "a=remote-candidates" "remote-candidates"
attribute in the answer.
</t>
          <t>
A controlled agent will receive an offer with the "a=remote-candidates" "remote-candidates"
attribute for a data stream when its peer has concluded ICE processing
for that data stream. This attribute is present in the
offer to deal with a race condition between the receipt of the offer,
and the receipt of the Binding Response response that tells the answerer the
candidate that will be selected by ICE. See Appendix B <xref target="sec-why-remote" format="default"/> for an
explanation of this race condition. Consequently, processing of an
offer with this attribute depends on the winner of the race.
</t>
          <t>
The agent forms a candidate pair for each component of the data stream by:
</t>
          <t>
            <list style="symbols">
              <t>
          <ul spacing="normal">
            <li>
Setting the remote candidate equal to the offerer&#8217;s offerer's default
destination for that component (i.e. (i.e., the contents of the "m=" and
"c=" lines for RTP, and the "a=rtcp" "rtcp" attribute for RTCP)

</t>
              <t>

</li>
            <li>
Setting the local candidate equal to the transport address for
that same component in the "a=remote-candidates" "remote-candidates" attribute in the
offer.

</t>
            </list>
          </t>

</li>
          </ul>
          <t>
The agent then sees if each of these candidate pairs is present
in the valid list.  If a particular pair is not in the valid list,
the check has "lost" the race.  Call such a pair a "losing pair".
</t>
          <t>
The agent finds all the pairs in the checklist whose remote
candidates equal the remote candidate in the losing pair:
</t>
          <t>
            <list style="symbols">
              <t>
          <ul spacing="normal">

            <li>
If none of the pairs are is In-Progress, and at least one is Failed,
it is most likely that a network failure, such as a network
partition or serious packet loss, has occurred.  The agent SHOULD <bcp14>SHOULD</bcp14>
generate an answer for this data stream as if the remote-
candidates "remote-
candidates" attribute had not been present, and then restart ICE
for this stream.

</t>
              <t>

</li>
            <li>
If at least one of the pairs is In-Progress, the agent SHOULD <bcp14>SHOULD</bcp14> wait
for those checks to complete, and as each completes, redo the
processing in this section until there are no losing pairs.

</t>
            </list>
          </t>

</li>
          </ul>
          <t>
Once there are no losing pairs, the agent can generate the answer.
It MUST <bcp14>MUST</bcp14> set the default destination for media to the candidates in
the remote-candidates "remote-candidates" attribute from the offer (each of which will
now be the local candidate of a candidate pair in the valid list).
It MUST <bcp14>MUST</bcp14> include a candidate "candidate" attribute in the answer for each
candidate in the remote-candidates "remote-candidates" attribute in the offer.
</t>

          <section title="ICE Restart"> numbered="true" toc="default">
            <name>ICE Restart</name>
            <t>
If the offerer in a subsequent offer requested an ICE restart (<xref target="sec-suboffer-restarts"/>) target="sec-suboffer-restarts" format="default"/>)
for a data stream, and if the answerer accepts the offer, the
answerer follows the procedures for generating an initial answer.
</t>
            <t>
For a given data stream, the answerer MAY <bcp14>MAY</bcp14> include the same
candidates that were used in the previous ICE session, but
it MUST <bcp14>MUST</bcp14> change the SDP ice-pwd "ice-pwd" and ice-ufrag "ice-ufrag" attribute
values.
</t>
            <t>
The answerer MAY <bcp14>MAY</bcp14> modify the attribute values of the SDP ice-options "ice-options" and
SDP ice-pacing "ice-pacing" attributes, and it MAY <bcp14>MAY</bcp14> change its role using the SDP ice-lite "ice-lite" attribute.
The answerer MUST NOT <bcp14>MUST NOT</bcp14> modify the SDP ice-options, ice-pacing "ice-options", "ice-pacing", and ice-lite "ice-lite" attributes in a
subsequent answer unless the answer is sent for an offer that was used to request an ICE restart
(<xref target="sec-suboffer-restarts"/>). target="sec-suboffer-restarts" format="default"/>). If any of the SDP attributes have been modified in
a subsequent offer that is not used to request an ICE restart, the answerer MUST <bcp14>MUST</bcp14> reject the
offer.
</t>
          </section>
          <section title="Lite numbered="true" toc="default">
            <name>Lite Implementation specific procedures"> Specific Procedures</name>
            <t>
If the received offer contains the remote-candidates "remote-candidates" attribute for a
data stream, the agent forms a candidate pair for each component of the
data stream by:
</t>
            <t>
              <list style="symbols">
                <t>
            <ul spacing="normal">
              <li>
Setting the remote candidate equal to the offerer&#8217;s offerer's default destination
for that component (i.e., the contents of the "m=" and "c=" lines for RTP,
and the "a=rtcp" "rtcp" attribute for RTCP).

</t>
                <t>

</li>
              <li>
Setting the local candidate equal to the transport address for that same
component in the "a=remote-candidates" "remote-candidates" attribute in the offer.

</t>
              </list>
            </t>

</li>
            </ul>
            <t>
The state of the checklist associated with that data stream is set to Completed.
</t>
            <t>
Furthermore, if the agent believed it was controlling, but the offer contained
the "a=remote-candidates" "remote-candidates" attribute, both agents believe they are controlling.
In this case, both would have sent updated offers around the same time.
</t>
            <t>
However, the signaling protocol carrying the offer/answer exchanges
will have resolved this glare condition, so that one agent is always
the 'winner' by having its offer received before its peer has sent
an offer. The winner takes the role of controlling, so that the
loser (the answerer under consideration in this section) MUST <bcp14>MUST</bcp14>
change its role to controlled.
</t>
            <t>
   Consequently, if the agent was going to send an updated offer since, controlling based on the rules
   in section 8.2 of <xref target="RFC8445"/>, it target="RFC8445" sectionFormat="of" section="8.2" format="default"/>
   and was controlling, going to send an updated offer, it no longer needs to.

</t>
            <t>
Besides the potential role change, change in the Valid valid list, and
state changes, the construction of the answer is performed identically
to the construction of an offer.
</t>
          </section>
        </section>
        <section title="Receiving numbered="true" toc="default">
          <name>Receiving Answer for a Subsequent Offer"> Offer</name>
          <section title="Procedures numbered="true" toc="default">
            <name>Procedures for Full Implementations"> Implementations</name>
            <t>
There may be certain situations where the offerer receives
an SDP answer that lacks ICE candidates although the initial answer
included them. One example of such an "unexpected" answer might be
happen when an ICE-unaware Back-to-Back User Agent (B2BUA)
introduces a media server during call hold using 3rd third party
call-control
call control procedures <xref target="RFC3725"/>. target="RFC3725" format="default"/>.
Omitting further details on how this is done, this could
result in an answer being received at the holding
UA that was constructed by the B2BUA. B2BUA
being received at the holding UA. With the B2BUA being
ICE-unaware, that answer would not include ICE candidates.
</t>
            <t>
Receiving an answer without ICE attributes in this situation might be
unexpected, but would not necessarily impair the user experience.
</t>
            <t>
When the offerer receives an answer indicating support for ICE, the
offer performs one of the following actions:
</t>
            <t>
              <list style="symbols">
                <t>
            <ul spacing="normal">
              <li>
If the offer was a restart, the agent MUST <bcp14>MUST</bcp14> perform ICE restart
procedures as specified in <xref target="sec-restart-subsequent"/></t>
                <t> target="sec-restart-subsequent" format="default"/>.</li>
              <li>
If the offer/answer exchange removed a data stream, or an
answer rejected an offered data stream, an agent MUST <bcp14>MUST</bcp14> flush the
Valid
valid list for that data stream. It MUST <bcp14>MUST</bcp14> also terminate any
STUN transactions in progress for that data stream.

</t>
                <t>
</li>
              <li>
If the offer/answer exchange added a new data stream, the agent
MUST
<bcp14>MUST</bcp14> create a new checklist for it (and an empty Valid valid list to
start of course) course), which in turn triggers the candidate
processing procedures <xref target="RFC8445"/>.

</t>
                <t> target="RFC8445" format="default"/>.
</li>
              <li>
If the checklist state associated with a data stream is Running, the agent
recomputes the checklist. If a pair on the new checklist was
also on the previous checklist, its candidate pair state is copied over.
  Otherwise, its candidate pair state is set to Frozen. If none of the checklists
  are active (meaning that the candidate pair states in each checklist
  are Frozen), appropriate procedures in <xref target="RFC8445"/> target="RFC8445" format="default"/>
  are performed to move candidate pair(s) to the Waiting state to
  further continue ICE processing.
</t>
                <t>
</li>
              <li>
If the ICE state is Completed Completed, and the SDP answer conforms to
<xref target="sec-subsequent-answer"/>, target="sec-subsequent-answer" format="default"/>, the agent MUST <bcp14>MUST</bcp14> remain in the
Completed ICE state.

</t>
              </list>
            </t>

</li>
            </ul>
            <t>
However, if the ICE support is no longer indicated in the SDP answer,
the agent MUST fall-back <bcp14>MUST</bcp14> fall back to <xref target="RFC3264"/> target="RFC3264" format="default"/>
procedures and SHOULD NOT <bcp14>SHOULD NOT</bcp14> drop the dialog because of the
missing ICE support or unexpected answer.
Once
When the agent sends a new offer later on, offer, it MUST <bcp14>MUST</bcp14> perform an ICE restart.
</t>
            <section anchor="sec-restart-subsequent" title="ICE Restarts"> numbered="true" toc="default">
              <name>ICE Restarts</name>
              <t>
The agent MUST <bcp14>MUST</bcp14> remember the nominated pair in the Valid valid list for each
component of the data stream, called the "previous selected pair", prior
to the restart. The agent will continue to send media using this pair,
as described in section 12 of <xref target="RFC8445"/>. target="RFC8445" sectionFormat="of" section="12" format="default"/>. Once these destinations are
noted, the agent MUST <bcp14>MUST</bcp14> flush the Valid valid lists and checklists, and then recompute
the checklist and its states, thus triggering the candidate processing
procedures <xref target="RFC8445"/></t> target="RFC8445" format="default"/>.</t>
            </section>
          </section>
          <section title="Procedures numbered="true" toc="default">
            <name>Procedures for Lite Implementations"> Implementations</name>
            <t>
If ICE is restarting for a data stream, the agent MUST <bcp14>MUST</bcp14> create a new
Valid
valid list for that data stream. It MUST <bcp14>MUST</bcp14> remember the nominated pair in the
previous Valid valid list for each component of the data stream, called
the "previous selected pairs", and continue to send media there as
described in section 12 of <xref target="RFC8445"/>. target="RFC8445" sectionFormat="of" section="12" format="default"/>. The state of each
checklist for each data stream MUST <bcp14>MUST</bcp14> change to Running, and the ICE state
MUST
<bcp14>MUST</bcp14> be set to Running.
</t>
          </section>
        </section>
      </section>
    </section>
    <section anchor="sec-grammar" title="Grammar"> numbered="true" toc="default">
      <name>Grammar</name>
      <t>
This specification defines eight new SDP attributes&#8201;&#8212;&#8201;the attributes -- the "candidate",
"remote-candidates", "ice-lite", "ice-mismatch", "ice-ufrag", "ice-pwd", "ice-pacing",
and "ice-options" attributes.
</t>
      <t>
This section also provides non-normative examples of the attributes defined.
</t>
      <t>
The syntax for the attributes follow Augmented BNF as defined in <xref target="RFC5234"/>. target="RFC5234" format="default"/>.
</t>
      <section title="&quot;candidate&quot; Attribute"> numbered="true" toc="default">
        <name>"candidate" Attribute</name>
        <t>
The candidate "candidate" attribute is a media-level attribute only.
It contains a transport address for a candidate that can be used for connectivity checks.
</t>
        <figure>
          <artwork><![CDATA[
        <sourcecode name="" type="abnf"><![CDATA[
candidate-attribute   = "candidate" ":" foundation SP component-id SP
                        transport SP
                        priority SP
                        connection-address SP     ;from RFC 4566
                        port         ;port from RFC 4566
                        SP cand-type
                        [SP rel-addr]
                        [SP rel-port]
                        *(SP cand-extension)

foundation            = 1*32ice-char
component-id          = 1*3DIGIT
transport             = "UDP" / transport-extension
transport-extension   = token              ; from RFC 3261
priority              = 1*10DIGIT
cand-type             = "typ" SP candidate-types
candidate-types       = "host" / "srflx" / "prflx" / "relay" / token
rel-addr              = "raddr" SP connection-address
rel-port              = "rport" SP port
cand-extension        = extension-att-name SP extension-att-value
extension-att-name    = token
extension-att-value   = *VCHAR
ice-char              = ALPHA / DIGIT / "+" / "/"
]]></artwork>
        </figure>
]]></sourcecode>
        <t>
This grammar encodes the primary information about a candidate: its IP address,
port and transport protocol, and its properties: the foundation, component ID, priority,
type, and related transport address:
</t>
        <t>
          <list style="hanging">
            <t hangText="&lt;connection-address&gt;:">
        <dl newline="false" spacing="normal">
          <dt>&lt;connection-address&gt;:</dt>
          <dd>
is taken from RFC 4566 <xref target="RFC4566"/>. target="RFC4566" format="default"/>.
It is the IP address of the candidate, allowing for
IPv4 addresses, IPv6 addresses, and fully qualified domain names (FQDNs).
When parsing this field, an agent can differentiate an IPv4 address
and an IPv6 address by presence of a colon in its value -
the presence of a colon indicates IPv6.  An agent generating
local candidates MUST NOT <bcp14>MUST NOT</bcp14> use FQDN addresses. An agent processing remote
candidates MUST <bcp14>MUST</bcp14> ignore candidate "candidate" lines that include candidates with
FQDN
FQDNs or IP address versions that are not supported or recognized.
The procedures for generation and handling of FQDN candidates, as well as,
how agents indicate support for such procedures, need to be specified in an
extension specification.
</t>
            <t hangText="&lt;port&gt;:">
</dd>
          <dt>&lt;port&gt;:</dt>
          <dd>
is also taken from RFC 4566 <xref target="RFC4566"/>. target="RFC4566" format="default"/>.
It is the port of the candidate.
</t>
            <t hangText="&lt;transport&gt;:">
</dd>
          <dt>&lt;transport&gt;:</dt>
          <dd>
indicates the transport protocol for the candidate.
This specification only defines UDP. However, extensibility is provided to allow for
future transport protocols to be used with ICE by extending the sub-registry subregistry
"ICE Transport Protocols" under the "Interactive Connectivity Establishment (ICE)" registry.
</t>
            <t hangText="&lt;foundation&gt;:">
</dd>
          <dt>&lt;foundation&gt;:</dt>
          <dd>
is composed of 1 to 32 &lt;ice-char&gt;s.
It is an identifier that is equivalent for two candidates that are of the same type,
share the same base, and come from the same STUN server.
The foundation is used to optimize ICE performance in the Frozen algorithm as
described in <xref target="RFC8445"/></t>
            <t hangText="&lt;component-id&gt;:"> target="RFC8445" format="default"/>.</dd>
          <dt>&lt;component-id&gt;:</dt>
          <dd>
is a positive integer between 1 and 256 (inclusive) that
identifies the specific component of the data stream for which this is a candidate.
It MUST <bcp14>MUST</bcp14> start at 1 and MUST <bcp14>MUST</bcp14> increment by 1 for each component of a particular candidate.
For data streams based on RTP, candidates for the actual RTP media MUST <bcp14>MUST</bcp14> have a component
ID of 1, and candidates for RTCP MUST <bcp14>MUST</bcp14> have a component ID of 2.
See section 13 in <xref target="RFC8445"/> target="RFC8445" sectionFormat="of" section="13" format="default"/> for additional discussion on extending ICE to new data streams.
</t>
            <t hangText="&lt;priority&gt;:">
</dd>
          <dt>&lt;priority&gt;:</dt>
          <dd>
is a positive integer between 1 and (2**31 - 1) inclusive. The procedures
for computing candidate&#8217;s a candidate's priority is are described in section 5.1.2 of <xref target="RFC8445"/>.
</t>
            <t hangText="&lt;cand-type&gt;:"> target="RFC8445" sectionFormat="of" section="5.1.2" format="default"/>.
</dd>
          <dt>&lt;cand-type&gt;:</dt>
          <dd>
encodes the type of candidate.
This specification defines the values "host", "srflx", "prflx", and "relay" for host,
server reflexive, peer reflexive,
server-reflexive, peer-reflexive, and relayed candidates, respectively.
Specifications for new candidate types MUST <bcp14>MUST</bcp14> define how, if at all, various steps in the ICE
processing differ from the ones defined by this specification.
</t>
            <t hangText="&lt;rel-addr&gt;
</dd>
          <dt>&lt;rel-addr&gt; and &lt;rel-port&gt;:"> &lt;rel-port&gt;:</dt>

          <dd>
convey transport addresses related to the candidate, useful for diagnostics
and other purposes. &lt;rel-addr&gt; and &lt;rel-port&gt; MUST <bcp14>MUST</bcp14> be present for server reflexive, peer reflexive,
server-reflexive, peer-reflexive, and relayed candidates.
If a candidate is server server-reflexive or peer reflexive, peer-reflexive, &lt;rel-addr&gt; and &lt;rel-port&gt;
are equal to the base for that server server-reflexive or peer reflexive  peer-reflexive candidate.
If the candidate is relayed, &lt;rel-addr&gt; and &lt;rel-port&gt; are equal to
the mapped address in the Allocate response that provided the client with
that relayed candidate (see
Appendix B.3 of <xref target="RFC8445"/> for a discussion of its purpose). target="RFC5766" section="6.3" sectionFormat="of" format="default"/>).
If the candidate is a host candidate, &lt;rel-addr&gt; and &lt;rel-port&gt; MUST be omitted.
</t>
            <t hangText="">
</dd>
          <dt></dt>
          <dd>
In some cases, e.g., for privacy reasons, an agent may not want to reveal the related
address and port. In this case the address MUST <bcp14>MUST</bcp14> be set to "0.0.0.0" (for IPv4 candidates)
or "::" (for IPv6 candidates) and the port to '9'.
</t>
          </list>
        </t> "9".
</dd>
        </dl>
        <t>
The candidate "candidate" attribute can itself be extended. The grammar allows for new name/value pairs
to be added at the end of the attribute. Such extensions MUST <bcp14>MUST</bcp14> be made through IETF Review or
IESG Approval <xref target="RFC8126"/> target="RFC8126" format="default"/>, and the assignments MUST <bcp14>MUST</bcp14> contain the specific extension and a
reference to the document defining the usage of the extension.
</t>
        <t>
An implementation MUST <bcp14>MUST</bcp14> ignore any name/value pairs it doesn&#8217;t doesn't understand.
</t>
        <figure>
          <artwork><![CDATA[
Example:
        <t>
The following is an example SDP line for a UDP server reflexive candidate server-reflexive "candidate" attribute for
the RTP component component:
</t>
        <sourcecode name="" type="sdp"><![CDATA[
a=candidate:2 1 UDP 1694498815 192.0.2.3 45664 typ srflx raddr
203.0.113.141 rport 8998
]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="&quot;remote-candidates&quot; Attribute"> numbered="true" toc="default">
        <name>"remote-candidates" Attribute</name>
        <t>
The syntax of the "remote-candidates" attribute is defined using Augmented BNF
as defined in <xref target="RFC5234"/>. target="RFC5234" format="default"/>.
The remote-candidates "remote-candidates" attribute is a media-level attribute only.
</t>
        <figure>
          <artwork><![CDATA[

        <sourcecode type="abnf"><![CDATA[
remote-candidate-att = "remote-candidates:" remote-candidate
                         0*(SP remote-candidate)
remote-candidate = component-ID component-id SP connection-address SP port
]]></artwork>
        </figure>
]]></sourcecode>
        <t>
The attribute contains a connection-address and port for each component. The ordering
of components is irrelevant. However, a value MUST <bcp14>MUST</bcp14> be present for each component of a
data stream. This attribute MUST <bcp14>MUST</bcp14> be included in an offer by a controlling agent for
a data stream that is Completed, and MUST NOT <bcp14>MUST NOT</bcp14> be included in any other case.
</t>
        <figure>
          <artwork><![CDATA[
Example: Remote candidates
        <t>
The following is an example of "remote-candidates" SDP lines for the RTP and RTCP components:
</t>
        <sourcecode name="" type="sdp"><![CDATA[
a=remote-candidates:1 192.0.2.3 45664
a=remote-candidates:2 192.0.2.3 45665
]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="&quot;ice-lite&quot; numbered="true" toc="default">
        <name>"ice-lite" and &quot;ice-mismatch&quot; Attributes"> "ice-mismatch" Attributes</name>
        <t>
The syntax of the "ice-lite" and "ice-mismatch" attributes, both of which are flags, is:
</t>
        <figure>
          <artwork><![CDATA[
        <sourcecode type="abnf"><![CDATA[
ice-lite               = "ice-lite"
ice-mismatch           = "ice-mismatch"
]]></artwork>
        </figure>
]]></sourcecode>
        <t>
"ice-lite" is a session-level attribute only, and indicates that an agent is a
lite implementation. "ice-mismatch" is a media-level attribute and only
reported in the answer. It indicates that the offer arrived with a default
destination for a media component that didn&#8217;t didn't have a corresponding candidate "candidate"
attribute. Inclusion of "a=ice-mismatch" "ice-mismatch" attribute for a given data stream implies
that even though both agents support ICE, ICE procedures MUST NOT <bcp14>MUST NOT</bcp14> be used for this data
stream
stream, and <xref target="RFC3264"/> target="RFC3264" format="default"/> procedures MUST <bcp14>MUST</bcp14> be used instead.
</t>
      </section>
      <section title="&quot;ice-ufrag&quot; numbered="true" toc="default">
        <name>"ice-ufrag" and &quot;ice-pwd&quot; Attributes"> "ice-pwd" Attributes</name>
        <t>
The "ice-ufrag" and "ice-pwd" attributes convey the username fragment and password used by ICE for message integrity.
Their syntax is:
</t>
        <figure>
          <artwork><![CDATA[
        <sourcecode type="abnf"><![CDATA[
ice-pwd-att           = "ice-pwd:" password
ice-ufrag-att         = "ice-ufrag:" ufrag
password              = 22*256ice-char
ufrag                 = 4*256ice-char
]]></artwork>
        </figure>
]]></sourcecode>
        <t>
The "ice-pwd" and "ice-ufrag" attributes can appear at either the session-level
or media-level. When present in both, the value in the media-level takes precedence.
Thus, the value at the session-level is effectively a default that applies to all
data streams, unless overridden by a media-level value. Whether present at the session
or media-level, there MUST <bcp14>MUST</bcp14> be an ice-pwd "ice-pwd" and ice-ufrag "ice-ufrag" attribute for each data stream.
If two data streams have identical ice-ufrag&#8217;s, "ice-ufrag"s, they MUST <bcp14>MUST</bcp14> have identical ice-pwd&#8217;s. "ice-pwd"s.
</t>
        <t>
The ice-ufrag "ice-ufrag" and ice-pwd "ice-pwd" attributes MUST <bcp14>MUST</bcp14> be chosen randomly at the beginning of
a session (the same applies when ICE is restarting for an agent).
</t>
        <t><xref target="RFC8445"/> target="RFC8445" format="default"/> requires the ice-ufrag "ice-ufrag" attribute to contain at least 24 bits of
randomness, and the ice-pwd "ice-pwd" attribute to contain at least 128 bits of
randomness. This means that the ice-ufrag "ice-ufrag"
attribute will be at least 4 characters long, and the ice-pwd "ice-pwd" at least 22 characters long,
since the grammar for these attributes allows for 6 bits of information per character.
The attributes MAY <bcp14>MAY</bcp14> be longer than 4 and 22 characters, respectively, of course, up to
256 characters. The upper limit allows for buffer sizing in implementations.
Its large upper limit allows for increased amounts of randomness to be added over time.
For compatibility with the 512 character 512-character limitation for the STUN username attribute value
and for bandwidth conservation considerations, the ice-ufrag "ice-ufrag" attribute MUST NOT <bcp14>MUST NOT</bcp14> be longer
than 32 characters when sending, but an implementation  MUST  <bcp14>MUST</bcp14> accept up to 256 characters
when receiving.
</t>
        <figure>
          <artwork><![CDATA[
Example
        <t>
The following example shows sample ice-ufrag "ice-ufrag" and ice-pwd "ice-pwd" SDP lines:
</t>
        <sourcecode name="" type="sdp"><![CDATA[
a=ice-pwd:asd88fgpdd777uzjYhagZg
a=ice-ufrag:8hhY
]]></artwork>
        </figure>
]]></sourcecode>
      </section>

      <section title="&quot;ice-pacing&quot; Attribute"> numbered="true" toc="default">
        <name>"ice-pacing" Attribute</name>
        <t>
The "ice-pacing" is a session level session-level attribute that indicates the desired connectivity
check connectivity-check pacing (Ta interval), in milliseconds, that the sender wishes to use. See section 14.2
of
<xref target="RFC8445"/> target="RFC8445" sectionFormat="of" section="14.2" format="default"/> for more information regarding selecting a pacing value.
The syntax is:
</t>
        <figure>
          <artwork><![CDATA[
        <sourcecode type="abnf"><![CDATA[
ice-pacing-att            = "ice-pacing:" pacing-value
pacing-value              = 1*10DIGIT
]]></artwork>
        </figure>
]]></sourcecode>
        <t>
If absent in an offer or answer answer, the default value of the attribute is 50 ms,
which is the recommended value specified in <xref target="RFC8445"/>. target="RFC8445" format="default"/>.
</t>

        <t>
As defined in <xref target="RFC8445" format="default"/>, regardless of the Ta value
chosen for each agent, the combination of all transactions from all agents (if a given
implementation runs several concurrent agents) will not be sent more often than
once every 5 ms.
</t>
        <t>
Once
As defined in <xref target="RFC8445" format="default"/>, once both agents have
indicated the pacing value they with want to use, both agents MUST will use the larger of the
indicated values.
</t>
<figure>
          <artwork><![CDATA[
Example
        <t>
The following example shows an ice-pacing "ice-pacing" SDP line with value '50':
</t>
        <sourcecode name="" type="sdp"><![CDATA[
a=ice-pacing:50
]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section anchor="sec-ice-options" title="&quot;ice-options&quot; Attribute"> numbered="true" toc="default">
        <name>"ice-options" Attribute</name>
        <t>
The "ice-options" attribute is a session- session-level and media-level attribute.
It contains a series of tokens that identify the options supported by the agent.
Its grammar is:
</t>
        <figure>
          <artwork><![CDATA[
        <sourcecode type="abnf"><![CDATA[
ice-options           = "ice-options:" ice-option-tag
                          *(SP ice-option-tag)
ice-option-tag        = 1*ice-char
]]></artwork>
        </figure>
]]></sourcecode>
        <t>
The existence of an ice-option "ice-options" in an offer indicates that a certain extension
is supported by the agent agent, and it is willing to use it, it if the peer agent also includes
the same extension in the answer. There might be further extension specific extension-specific
negotiation needed between the agents that determine how the extension gets used
in a given session. The details of the negotiation procedures, if present, MUST <bcp14>MUST</bcp14> be
defined by the specification defining the extension (<xref target="sec-iana-ice-options"/>). target="sec-iana-ice-options" format="default"/>).
</t>
        <figure>
          <artwork><![CDATA[
Example
<t>The following example shows an ice-options "ice-options" SDP line with 'ice2' and
'rtp+ecn' [RFC6679] values: <xref target="RFC6679" format="default"/> values.</t>
        <sourcecode name="" type="sdp"><![CDATA[
a=ice-options:ice2 rtp+ecn
]]></artwork>
        </figure>
]]></sourcecode>
      </section>
    </section>
    <section anchor="sec-keepalive" title="Keepalives"> numbered="true" toc="default">
      <name>Keepalives</name>

      <t>
All the ICE agents MUST <bcp14>MUST</bcp14> follow the procedures defined in section 11 of
 <xref target="RFC8445"/> target="RFC8445" sectionFormat="of" section="11" format="default"/>
for sending keepalives. The  As defined in <xref target="RFC8445" format="default"/>,
the keepalives MUST will be sent regardless of whether the data stream is currently
inactive, sendonly, recvonly, or sendrecv, and regardless
of the presence or value of the bandwidth attribute. An agent can determine that its
peer supports ICE by the presence of "a=candidate" "candidate" attributes for each media session.
</t>
    </section>
    <section title="SIP Considerations"> numbered="true" toc="default">
      <name>SIP Considerations</name>
      <t>
Note that ICE is not intended for NAT traversal for SIP signaling, which is assumed to be
provided via another mechanism <xref target="RFC5626"/>. target="RFC5626" format="default"/>.
</t>
      <t>
When ICE is used with SIP, forking may result in a single offer generating a
multiplicity of answers. In that case, ICE proceeds completely in parallel and
independently for each answer, treating the combination of its offer and
each answer as an independent offer/answer exchange, with its own set of local
candidates, pairs, checklists, states, and so on.
</t>
      <section anchor="sec-latency" title="Latency Guidelines"> numbered="true" toc="default">
        <name>Latency Guidelines</name>
        <t>
ICE requires a series of STUN-based connectivity checks to take place between
endpoints. These checks start from the answerer on generation of its answer,
and start from the offerer when it receives the answer.
These checks can take time to complete, and as such, the selection of
messages to use with offers and answers can affect perceived user latency.
Two latency figures are of particular interest. These are the post-pickup delay
and the post-dial delay. The post-pickup delay refers to the time between when
a user "answers the phone" and when any speech they utter can be delivered to
the caller. The post-dial delay refers to the time between when a user enters
the destination address for the user and ringback begins as a consequence of
having successfully started alerting the called user agent.
</t>
        <t>
Two cases can be considered&#8201;&#8212;&#8201;one considered -- one where the offer is present in the initial
INVITE and one where it is in a response.
</t>
        <section title="Offer numbered="true" toc="default">
          <name>Offer in INVITE"> INVITE</name>
          <t>
To reduce post-dial delays, it is RECOMMENDED <bcp14>RECOMMENDED</bcp14> that the caller begin gathering
candidates prior to actually sending its initial INVITE, so that the candidates
can be provided in the INVITE. This can be started upon
user interface cues that a call is pending, such as activity on a keypad or
the phone going off-hook.
</t>
          <t>
On the receipt of the offer, the answerer SHOULD <bcp14>SHOULD</bcp14> generate an answer in a
provisional response as soon as it has completed gathering
the candidates. ICE requires that a provisional response with an SDP be
transmitted reliably. This can be done through the existing
Provisional Response Acknowledgment (PRACK)
mechanism <xref target="RFC3262"/> target="RFC3262" format="default"/> or through an ICE specific ICE-specific optimization, wherein,
the agent retransmits the provisional response with the exponential backoff
timers described in <xref target="RFC3262"/>. target="RFC3262" format="default"/>. Such retransmissions MUST <bcp14>MUST</bcp14> cease on receipt
of a STUN Binding request with the transport address matching the candidate address
for one of the data streams signaled in that SDP or on transmission of the answer
in a 2xx response. If no Binding request is received prior to the last retransmit,
the agent does not consider the session terminated. For the ICE lite ICE-lite peers, the
agent MUST <bcp14>MUST</bcp14> cease retransmitting the 18x response after
sending it four times since there will be no Binding request sent sent, and
the number four is arbitrarily chosen to limit the number of 18x retransmits.
</t>
          <t>
Once the answer has been sent, the agent SHOULD <bcp14>SHOULD</bcp14> begin its connectivity checks.
Once candidate pairs for each component of a data stream enter the valid list,
the answerer can begin sending media on that data stream.
</t>
          <t>
However, prior to this point, any media that needs to be sent towards the
caller (such as SIP early media <xref target="RFC3960"/>) MUST NOT target="RFC3960" format="default"/>) <bcp14>MUST NOT</bcp14> be transmitted. For this
reason, implementations SHOULD <bcp14>SHOULD</bcp14> delay alerting the called party until candidates
for each component of each data stream have entered the valid list.
In the case of a PSTN gateway, this would mean that the setup message into the
PSTN is delayed until this point. Doing this increases the post-dial delay, but
has the effect of eliminating 'ghost rings'.
Ghost rings are cases where the called party hears the phone ring, picks up, but
hears nothing and cannot be heard. This technique works without requiring support
for, or usage of, preconditions <xref target="RFC3312"/>. target="RFC3312" format="default"/>. It also has the benefit of guaranteeing
that not a single packet of media will get clipped, so that post-pickup delay is zero.
If an agent chooses to delay local alerting in this way, it SHOULD <bcp14>SHOULD</bcp14> generate a 180
response once alerting begins.
</t>
        </section>
        <section title="Offer numbered="true" toc="default">
          <name>Offer in Response"> Response</name>
          <t>
In addition to uses where the offer is in an INVITE, and the answer is in the
provisional and/or 200 OK response, ICE works with cases where the offer appears
in the response.
In such cases, which are common in third party call control <xref target="RFC3725"/>, target="RFC3725" format="default"/>, ICE
agents SHOULD <bcp14>SHOULD</bcp14> generate their offers in a reliable provisional response
(which MUST <bcp14>MUST</bcp14> utilize <xref target="RFC3262"/>), target="RFC3262" format="default"/>), and not alert the user on receipt of the INVITE.
The answer will arrive in a PRACK.
This allows for ICE processing to take place prior to alerting, so that there is no
post-pickup delay, at the expense of increased call setup delays.
Once ICE completes, the callee can alert the user and then generate a 200 OK
when they answer.
The 200 OK would contain no SDP, since the offer/answer exchange has completed.
</t>
          <t>
Alternatively, agents MAY <bcp14>MAY</bcp14> place the offer in a 2xx instead (in which case the
answer comes in the ACK).
When this happens, the callee will alert the user on receipt of the INVITE,
and the ICE exchanges will take place only after the user answers.
This has the effect of reducing call setup call-setup delay, but can cause substantial
post-pickup delays and media clipping.
</t>
        </section>
      </section>
      <section title="SIP numbered="true" toc="default">
        <name>SIP Option Tags and Media Feature Tags"> Tags</name>
        <t><xref target="RFC5768"/> target="RFC5768" format="default"/> specifies a SIP option tag and media feature tag for usage with ICE.
ICE implementations using SIP SHOULD <bcp14>SHOULD</bcp14> support this specification, which uses a
feature tag in registrations to facilitate interoperability through signaling
intermediaries.
</t>
      </section>
      <section title="Interactions numbered="true" toc="default">
        <name>Interactions with Forking"> Forking</name>
        <t>
ICE interacts very well with forking.
Indeed, ICE fixes some of the problems associated with forking.
Without ICE, when a call forks and the caller receives multiple incoming
data streams, it cannot determine which data stream corresponds to
which callee.
</t>
        <t>
With ICE, this problem is resolved.
The connectivity checks which occur prior to transmission of media carry
username fragments, fragments which in turn are correlated to a specific callee.
Subsequent media packets that arrive on the same candidate pair as the
connectivity check will be associated with that same callee.
Thus, the caller can perform this correlation as long as it has received an answer.
</t>
      </section>
      <section title="Interactions numbered="true" toc="default">
        <name>Interactions with Preconditions"> Preconditions</name>
        <t>
Quality of Service (QoS) preconditions, which are defined in <xref target="RFC3312"/> target="RFC3312" format="default"/>
and <xref target="RFC4032"/>, target="RFC4032" format="default"/>, apply only to the transport addresses listed as the default
targets for media in an offer/answer.
If ICE changes the transport address where media is received, this change
is reflected in an updated offer that changes the default destination for
media to match ICE&#8217;s ICE's selection. As such, it appears like any other re-INVITE would,
and is fully treated in RFCs 3312 and 4032, which apply without regard to the fact
that the destination for media is changing due to ICE negotiations occurring
"in the background".
</t>
        <t>
Indeed, an agent SHOULD NOT <bcp14>SHOULD NOT</bcp14> indicate that QoS preconditions have been met
until the checks have completed and selected the candidate pairs to be used for media.
</t>
        <t>
ICE also has (purposeful) interactions with connectivity preconditions <xref target="RFC5898"/>. target="RFC5898" format="default"/>.
Those interactions are described there.
	Note that the procedures described in <xref target="sec-latency"/> target="sec-latency" format="default"/> describe their own type of "preconditions", albeit with less functionality than those provided by the explicit preconditions in <xref target="RFC5898"/>. target="RFC5898" format="default"/>.
</t>
      </section>
      <section title="Interactions numbered="true" toc="default">
        <name>Interactions with Third Party Call Control"> Control</name>
        <t>
ICE works with Flows I, III, and IV as described in <xref target="RFC3725"/>. target="RFC3725" format="default"/>.
Flow I works without the controller supporting or being aware of ICE.
Flow IV will work as long as the controller passes along the ICE attributes without alteration.
Flow II is fundamentally incompatible with ICE; each agent will believe itself to be the answerer and thus never generate a re-INVITE.
</t>
        <t>
The flows for continued operation, as described in Section 7 of <xref target="RFC3725"/>, target="RFC3725" sectionFormat="of" section="7" format="default"/>,
require additional behavior of ICE implementations to support.
In particular, if an agent receives a mid-dialog re-INVITE that contains no offer, it MUST <bcp14>MUST</bcp14> restart ICE for each data stream and go through the process of gathering new candidates.
Furthermore, that list of candidates SHOULD <bcp14>SHOULD</bcp14> include the ones currently being used for media.
</t>
      </section>
    </section>
    <section anchor="sec-alg-sip" title="Interactions numbered="true" toc="default">
      <name>Interactions with Application Layer Gateways and SIP"> SIP</name>
      <t>
        Application Layer Gateways (ALGs) are functions present in a Network Address Translation (NAT)
        device that inspect the contents of packets and modify them, in order to facilitate NAT traversal
        for application protocols. Session Border Controllers (SBCs) are close cousins of ALGs, but are
        less transparent since they actually exist as application-layer SIP intermediaries. ICE has
        interactions with SBCs and ALGs.
      </t>
      <t>
        If an ALG is SIP aware but not ICE aware, ICE will work through it as long as the ALG correctly
        modifies the SDP. A correct ALG implementation behaves as follows:
      </t>
      <t>
        <list style="symbols">
          <t>
      <ul spacing="normal">
        <li>
            The ALG does not modify the "m=" and "c=" lines or the rtcp "rtcp" attribute if they contain
            external addresses.
          </t>
          </li>
        <li>
          <t>
            If the "m=" and "c=" lines contain internal addresses, the modification depends on the state of the ALG:
            <list style="symbols">
              <t>
          </t>
          <ul spacing="normal">
            <li>
                If the ALG already has a binding established that maps an external port to an internal connection
                address and port matching the values in the "m=" and "c=" lines or rtcp "rtcp" attribute, the ALG uses that
                binding instead of creating a new one.
              </t>
              <t>
              </li>
            <li>
                If the ALG does not already have a binding, it creates a new one and modifies the SDP, rewriting
                the "m=" and "c=" lines and rtcp "rtcp" attribute.
              </t>
            </list>
          </t>
        </list>
      </t>
              </li>
          </ul>
        </li>
      </ul>
      <t>
        Unfortunately, many ALGs are known to work poorly in these corner cases.
        ICE does not try to work around broken ALGs, as this is outside the scope of its functionality.
        ICE can help diagnose these conditions, which often show up as a mismatch between the set of candidates and
        the "m=" and "c=" lines and rtcp "rtcp" attributes. The ice-mismatch "ice-mismatch" attribute is used for this purpose.
      </t>
      <t>
        ICE works best through ALGs when the signaling is run over TLS.
        This prevents the ALG from manipulating the SDP messages and interfering with ICE operation.
        Implementations that are expected to be deployed behind ALGs SHOULD <bcp14>SHOULD</bcp14> provide for TLS transport of the SDP.
      </t>
      <t>
        If an SBC is SIP aware but not ICE aware, the result depends on the behavior of the SBC.
        If it is acting as a proper Back-to-Back User Agent (B2BUA), the SBC will remove any SDP attributes
        it doesn&#8217;t doesn't understand, including the ICE attributes. Consequently, the call will appear to both
        endpoints as if the other side doesn&#8217;t doesn't support ICE. This will result in ICE being disabled, and
        media flowing through the SBC, if the SBC has requested it. If, however, the SBC passes the ICE attributes
        without modification, yet modifies the default destination for media (contained in the "m=" and "c=" lines
        and rtcp "rtcp" attribute), this will be detected as an ICE mismatch, and ICE processing is aborted for the call.
        It is outside of the scope of ICE for it to act as a tool for "working around" SBCs.
        If one is present, ICE will not be used and the SBC techniques take precedence.
      </t>
    </section>
    <section title="Security Considerations"> numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
        The generic ICE security considerations are defined in <xref target="RFC8445"/>, target="RFC8445" format="default"/>, and the
        generic SDP offer/answer security considerations are defined in <xref target="RFC3264"/>. target="RFC3264" format="default"/>. These
        security considerations also apply to implementations of this document.
      </t>
      <section title="IP numbered="true" toc="default">
        <name>IP Address Privacy"> Privacy</name>
        <t>
          In some cases, e.g., for privacy reasons, an agent may not want to reveal the related
          address and port. In this case the address MUST <bcp14>MUST</bcp14> be set to "0.0.0.0" (for IPv4 candidates)
          or "::" (for IPv6 candidates) and the port to '9'.
        </t>
      </section>
      <section title="Attacks numbered="true" toc="default">
        <name>Attacks on the Offer/Answer Exchanges"> Exchanges</name>
        <t>
          An attacker that can modify or disrupt the offer/answer exchanges themselves can readily
          launch a variety of attacks with ICE. They could direct media to a target of a DoS attack,
          they could insert themselves into the data stream, and so on. These are similar to the general
          security considerations for offer/answer exchanges, and the security considerations in
          <xref target="RFC3264"/> target="RFC3264" format="default"/> apply. These require techniques for message integrity and encryption
          for offers and answers, which are satisfied by the TLS mechanism <xref target="RFC3261"/> target="RFC3261" format="default"/> when
          SIP is used. As such, the usage of TLS with ICE is RECOMMENDED. <bcp14>RECOMMENDED</bcp14>.
        </t>
      </section>
      <section anchor="sec-voice-hammer" title="The numbered="true" toc="default">
        <name>The Voice Hammer Attack"> Attack</name>
        <t>
          The voice hammer attack is an amplification attack, and can be triggered even if the attacker
          is an authenticated and valid participant in a session.
          In this attack, the attacker initiates sessions to other agents, and maliciously includes
          the connection address and port of a DoS target as the destination for media traffic
          signaled in the SDP. This causes substantial amplification; a single offer/answer exchange
          can create a continuing flood of media packets, possibly at high rates (consider video sources).
          The use of ICE can help to prevent against this attack.
        </t>

        <t>
          Specifically, if ICE is used, the agent receiving the malicious SDP will first perform connectivity
          checks to the target of media before sending media there. If this target is a third-party host, the
          checks will not succeed, and media is never sent.  The ICE extension defined in <xref target="RFC7675" format="default"/>
          can be used to further protect against voice hammer attacks.
        </t>
        <t>
          Unfortunately, ICE doesn&#8217;t doesn't help if it&#8217;s it's not used, in which case an attacker could simply
          send the offer without the ICE parameters. However, in environments where the set of clients is known,
          and is limited to ones that support ICE, the server can reject any offers or answers that don&#8217;t don't
          indicate ICE support.
        </t>
        <t>
          SIP User Agents user agents (UA) <xref target="RFC3261"/> target="RFC3261" format="default"/> that are not willing to receive non-ICE answers MUST <bcp14>MUST</bcp14> include
          an "ice" Option Tag option tag <xref target="RFC5768"/> target="RFC5768" format="default"/> in the SIP Require Header Field header field in their offer. UAs that
          reject non-ICE offers will generally use a 421 response code, together with an Option Tag option tag "ice" in the
          Require Header Field header field in the response.
        </t>
      </section>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <section title="SDP Attributes"> numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section numbered="true" toc="default">
        <name>SDP Attributes</name>
        <t>
The original ICE specification defined seven new SDP attributes per the procedures of
Section 8.2.4 of
<xref target="RFC4566"/>. target="RFC4566" sectionFormat="of" section="8.2.4" format="default"/>.
The registration information from the original specification
is included here with modifications to include Mux Category <xref target="RFC8859" format="default"/>
and also defines a new SDP attribute 'ice-pacing'. "ice-pacing".
</t>
        <section title="candidate Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"candidate" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
candidate
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
media-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE),
and provides one of many possible candidate addresses for communication.
These addresses are validated with an end-to-end connectivity check using Session
Traversal Utilities for NAT (STUN).
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact Email:">
</dd>
            <dt>Contact Email:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
TRANSPORT
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="remote-candidates Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"remote-candidates" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
remote-candidates
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
media-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE),
and provides the identity of the remote candidates that the offerer wishes the answerer
to use in its answer.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact Email:">
</dd>
            <dt>Contact Email:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
TRANSPORT
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="ice-lite Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"ice-lite" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
ice-lite
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
session-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE),
and indicates that an agent has the minimum functionality required to support ICE
inter-operation with a peer that has a full implementation.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact Email:">
</dd>
            <dt>Contact Email:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
NORMAL
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="ice-mismatch Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"ice-mismatch" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
ice-mismatch
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>

            <dd>
media-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE), and indicates that an agent is ICE capable, but did not proceed with ICE due to a mismatch of candidates with the default destination for media signaled in the SDP.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact e-mail:">
</dd>
            <dt>Contact e-mail:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
NORMAL
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="ice-pwd Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"ice-pwd" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
ice-pwd
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
session- or media-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE),
and provides the password used to protect STUN connectivity checks.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact e-mail:">
</dd>
            <dt>Contact e-mail:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
TRANSPORT
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="ice-ufrag Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"ice-ufrag" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
ice-ufrag
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
session- or media-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE),
and provides the fragments used to construct the username in STUN connectivity checks.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact e-mail:">
</dd>
            <dt>Contact e-mail:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
TRANSPORT
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="ice-options Attribute">
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:"> numbered="true" toc="default">
          <name>"ice-options" Attribute</name>
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
ice-options
</t>
              <t hangText="Long Form:">
</dd>
            <dt>Long Form:</dt>
            <dd>
ice-options
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
session-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE),
and indicates the ICE options or extensions used by the agent.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact e-mail:">
</dd>
            <dt>Contact e-mail:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
NORMAL
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
        <section title="ice-pacing Attribute"> numbered="true" toc="default">
          <name>"ice-pacing" Attribute</name>
          <t>
This specification also defines a new SDP attribute, "ice-pacing" "ice-pacing", according
to the following data:
</t>
          <t>
            <list style="hanging">
              <t hangText="Attribute Name:">
          <dl newline="false" spacing="normal">
            <dt>Attribute Name:</dt>
            <dd>
ice-pacing
</t>
              <t hangText="Type
</dd>
            <dt>Type of Attribute:"> Attribute:</dt>
            <dd>
session-level
</t>
              <t hangText="Subject
</dd>
            <dt>Subject to charset:"> charset:</dt>
            <dd>
No
</t>
              <t hangText="Purpose:">
</dd>
            <dt>Purpose:</dt>
            <dd>
This attribute is used with Interactive Connectivity Establishment (ICE)
to indicate desired connectivity check pacing values.
</t>
              <t hangText="Appropriate Values:">
</dd>
            <dt>Appropriate Values:</dt>
            <dd>
See <xref target="sec-grammar"/> target="sec-grammar" format="default"/> of RFC XXXX.
</t>
              <t hangText="Contact Name:"> 8839.
</dd>
            <dt>Contact Name:</dt>
            <dd>
IESG
</t>
              <t hangText="Contact e-mail:">
</dd>
            <dt>Contact e-mail:</dt>
            <dd>
                iesg@ietf.org
              </t>
              <t hangText="Reference:">
RFCXXXX
</t>
              <t hangText="Mux Category:">
              </dd>
            <dt>Reference:</dt>
            <dd>

</dd>
            <dt>Mux Category:</dt>
            <dd>
NORMAL
</t>
            </list>
          </t>
</dd>
          </dl>
        </section>
      </section>

      <section anchor="sec-iana-ice-options" title="Interactive numbered="true" toc="default">
        <name>Interactive Connectivity Establishment (ICE) Options Registry"> Registry</name>
        <t>
IANA maintains a registry for ice-options "ice-options" identifiers under the Specification
Required policy as defined in "Guidelines for Writing an IANA Considerations
Section in RFCs" <xref target="RFC8126"/>. target="RFC8126" format="default"/>.
</t>
        <t>
ICE options are of unlimited length according to the syntax in
<xref target="sec-ice-options"/>; target="sec-ice-options" format="default"/>; however, they are RECOMMENDED <bcp14>RECOMMENDED</bcp14> to be no longer
than 20 characters. This is to reduce message sizes and allow for
efficient parsing. ICE options are defined at the session level.
</t>
        <t>
A registration request MUST <bcp14>MUST</bcp14> include the following information:
</t>
        <t>
          <list style="symbols">
            <t>
        <ul spacing="normal">
          <li>
The ICE option identifier to be registered

</t>
            <t>

</li>
          <li>
Name and email address of organization or individuals having change control
</li>
          <li>
Short description of the ICE extension to which the option relates

</t>
            <t>

</li>
          <li>
Reference(s) to the specification defining the ICE option and the related extensions

</t>
          </list>
        </t>

</li>
        </ul>
      </section>
      <section anchor="sec-iana-cand-ext" title="Candidate numbered="true" toc="default">
        <name>Candidate Attribute Extension Subregistry Establishment"> Establishment</name>

        <t>
          This section creates a new sub-registry, subregistry, "Candidate Attribute
	  Extensions", under the sdp-parameters SDP Parameters
          registry: http://www.iana.org/assignments/sdp-parameters. <eref target="http://www.iana.org/assignments/sdp-parameters"/>.
        </t>
        <t>
          The purpose of the sub-registry subregistry is to register SDP candidate "candidate" attribute extensions.
        </t>
        <t>
          When a candidate "candidate" extension is registered in the sub-registry, subregistry, it needs to meet the "Specification Required"
          policies defined in <xref target="RFC8126"/>. target="RFC8126" format="default"/>.
        </t>
        <t>
          Candidate
          "candidate" attribute extensions MUST <bcp14>MUST</bcp14> follow the 'cand-extension' syntax. The attribute extension
          name MUST <bcp14>MUST</bcp14> follow the 'extension-att-name' syntax, and the attribute extension value MUST <bcp14>MUST</bcp14> follow the
          'extension-att-value' syntax.
        </t>
        <t>
          A registration request MUST <bcp14>MUST</bcp14> include the following information:
        </t>
        <t>
          <list style="symbols">
            <t>
        <ul spacing="normal">
          <li>
              The name of the attribute extension.
            </t>
            <t>
            </li>

          <li>
Name and email address of organization or individuals having change control
            </li>
          <li>
              A short description of the attribute extension.
            </t>
            <t>
            </li>
          <li>
              A reference to a specification that describes the semantics, usage and possible
              values of the attribute extension.
            </t>
          </list>
        </t>
            </li>
        </ul>
      </section>
    </section>
    <section title="Acknowledgments">
      <t>
A large part of the text in this document was taken from <xref target="RFC5245"/>, authored by
Jonathan Rosenberg.
</t>
      <t>
Some of the text in this document was taken from <xref target="RFC6336"/>, authored by Magnus Westerlund
and Colin Perkins.
</t>
      <t>
Many thanks to Flemming Andreasen for shepherd review feedback.
</t>
      <t>
Thanks to following experts for their reviews and constructive feedback: Thomas Stach,
Adam Roach, Peter Saint-Andre, Roman Danyliw, Alissa Cooper, Benjamin Kaduk, Mirja Kuhlewind, Alexey Melnikov, Eric Vyncke for their detailed reviews.
</t>
    </section>
    <section title="Changes anchor="sec.5245" numbered="true" toc="default">
      <name>Changes from RFC 5245" anchor="sec.5245"> 5245</name>
      <t>
      <xref target="RFC8445"/> target="RFC8445" format="default"/> describes the changes that were done made to the
      common SIP procedures, including removal of aggressive nomination,
      modifying the procedures for calculating candidate pair states and states,
      scheduling connectivity checks checks, and the calculation of timer values.
      </t>
      <t>
      This document defines the following SDP offer/answer specific changes:
      <list style="symbols">
        <t>SDP
      </t>

      <ul spacing="normal">
        <li>SDP offer/answer realization and usage of of 'ice2' option.</t>
        <t>Definition option.</li>
        <li>Definition and usage of SDP 'ice-pacing' attribute.</t>
        <t>Explicit "ice-pacing" attribute.</li>
        <li>Explicit text that an ICE agent must not generate candidates with FQDNs, and
        must discard such candidates if received from the peer agent.</t>
        <t>Relax agent.</li>
        <li>Relax requirement to include SDP 'rtcp' attribute.</t>
        <t>Generic "rtcp" attribute.</li>
        <li>Generic clarifications of SDP offer/answer procedures.</t>
      </list>
    </t> procedures.</li>
        <li>ICE mismatch is now optional, and an agent has an option to not
            trigger mismatch and instead treat the default candidate as an
            additional candidate.</li>
        <li>FQDNs and "0.0.0.0"/"::" IP addresses with port "9" default
            candidates do not trigger ICE mismatch.</li>
      </ul>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.3261"?>
      <?rfc include="reference.RFC.3262"?>
      <?rfc include="reference.RFC.3264"?>
      <?rfc include="reference.RFC.3312"?>
      <?rfc include="reference.RFC.3556"?>
      <?rfc include="reference.RFC.3605"?>
      <?rfc include="reference.RFC.4032"?>
      <?rfc include="reference.RFC.4566"?>
      <?rfc include="reference.RFC.5234"?>
      <?rfc include="reference.RFC.5768"?>
      <?rfc include="reference.RFC.6336"?>
      <?rfc include="reference.RFC.8174"?>
      <?rfc include="reference.RFC.8445"?>
    <references>
      <name>References</name>
      <references>

        <name>Normative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3262.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3264.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3312.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3556.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3605.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4032.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4566.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5389.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5768.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6336.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8445.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5766.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3725.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3960.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5245.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5626.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5898.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6679.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7675.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>

        <reference anchor="RFC8859" target="https://www.rfc-editor.org/info/rfc8859">
          <front>
            <title>A Framework for Session Description Protocol (SDP)
            Attributes When Multiplexing</title>
            <author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar">
              <organization/>
            </author>
            <date month="January" year="2021"/>
          </front>
            <seriesInfo name="RFC" value="8859"/>
            <seriesInfo name="DOI" value="10.17487/RFC8859"/>
        </reference>

<reference anchor="draft-ietf-ice-pac" target="http://www.ietf.org/internet-drafts/draft-ietf-ice-pac-02.txt"> anchor="RFC8863" target="https://www.rfc-editor.org/info/rfc8863">
 <front>
  <title>Interactive Connectivity Establishment Patiently Awaiting Connectivity (ICE PAC)</title>
    <author initials="C." initials="C" surname="Holmberg" fullname="Christer Holmberg">
    <organization/>
    </author>
    <author initials="J." initials="J" surname="Uberti" fullname="Justin Uberti">
    <organization/>
    </author>
   <date year="2019" month="July"/>
          <abstract>
            <t>During the process of establishing peer-to-peer connectivity, ICE agents can encounter situations where they have no candidate pairs to check, and, as a result, conclude that ICE processing has failed. However, because additional candidate pairs can be discovered during ICE processing, declaring failure at this point may be premature. This document discusses when these situations can occur and proposes a way to avoid premature failure. [STANDARDS-TRACK]</t>
          </abstract> month="January" year="2021"/>
  </front>
  <seriesInfo name="Internet-Draft" value="draft-ietf-ice-pac-02"/> name="RFC" value="8863"/>
  <seriesInfo name="DOI" value="10.17487/RFC8863"/>
</reference>
      </references>
    <references title="Informative References">
      <?rfc include="reference.RFC.3725"?>
      <?rfc include="reference.RFC.3960"?>
      <?rfc include="reference.RFC.5245"?>
      <?rfc include="reference.RFC.5626"?>
      <?rfc include="reference.RFC.5898"?>
      <?rfc include="reference.RFC.6679"?>
      <?rfc include="reference.RFC.8126"?>
    </references>
    <section anchor="sec-example" title="Examples"> numbered="true" toc="default">
      <name>Examples</name>
      <t>
For the example shown in section 15 of <xref target="RFC8445"/> target="RFC8445" sectionFormat="of" section="15" format="default"/>,
the resulting offer (message 5) encoded in SDP looks like: like (lines folded for clarity):
</t>
      <figure>
        <artwork><![CDATA[
      <sourcecode name="" type="sdp"><![CDATA[
v=0
o=jdoe 2890844526 2890842807 IN IP6 $L-PRIV-1.IP
s=
c=IN IP6 $NAT-PUB-1.IP
t=0 0
a=ice-options:ice2
a=ice-pacing:50
a=ice-pwd:asd88fgpdd777uzjYhagZg
a=ice-ufrag:8hhY
m=audio $NAT-PUB-1.PORT RTP/AVP 0
b=RS:0
b=RR:0
a=rtpmap:0 PCMU/8000
a=candidate:1 1 UDP 2130706431 $L-PRIV-1.IP $L-PRIV-1.PORT typ host
a=candidate:2 1 UDP 1694498815 $NAT-PUB-1.IP $NAT-PUB-1.PORT typ
 srflx raddr $L-PRIV-1.IP rport $L-PRIV-1.PORT
]]></artwork>
      </figure>
]]></sourcecode>
      <t>
The offer, with the variables replaced with their values, will look like (lines folded for clarity):
</t>
      <figure>
        <artwork><![CDATA[

      <sourcecode name="" type="sdp"><![CDATA[
v=0
o=jdoe 2890844526 2890842807 IN IP6 fe80::6676:baff:fe9c:ee4a
s=
c=IN IP6 2001:db8:8101:3a55:4858:a2a9:22ff:99b9
t=0 0
a=ice-options:ice2
a=ice-pacing:50
a=ice-pwd:asd88fgpdd777uzjYhagZg
a=ice-ufrag:8hhY
m=audio 45664 RTP/AVP 0
b=RS:0
b=RR:0
a=rtpmap:0 PCMU/8000
a=candidate:1 1 UDP 2130706431 fe80::6676:baff:fe9c:ee4a 8998
 typ host
a=candidate:2 1 UDP 1694498815 2001:db8:8101:3a55:4858:a2a9:22ff:99b9
 45664 typ srflx raddr fe80::6676:baff:fe9c:ee4a rport 8998
]]></artwork>
      </figure>
]]></sourcecode>
      <t>
The resulting answer looks like:
</t>
      <figure>
        <artwork><![CDATA[
      <sourcecode name="" type="sdp"><![CDATA[
v=0
o=bob 2808844564 2808844564 IN IP4 $R-PUB-1.IP
s=
c=IN IP4 $R-PUB-1.IP
t=0 0
a=ice-options:ice2
a=ice-pacing:50
a=ice-pwd:YH75Fviy6338Vbrhrlp8Yh
a=ice-ufrag:9uB6
m=audio $R-PUB-1.PORT RTP/AVP 0
b=RS:0
b=RR:0
a=rtpmap:0 PCMU/8000
a=candidate:1 1 UDP 2130706431 $R-PUB-1.IP $R-PUB-1.PORT typ host
]]></artwork>
      </figure>
]]></sourcecode>
      <t>
With the variables filled in:
</t>
      <figure>
        <artwork><![CDATA[
      <sourcecode name="" type="sdp"><![CDATA[
v=0
o=bob 2808844564 2808844564 IN IP4 192.0.2.1
s=
c=IN IP4 192.0.2.1
t=0 0
a=ice-options:ice2
a=ice-pacing:50
a=ice-pwd:YH75Fviy6338Vbrhrlp8Yh
a=ice-ufrag:9uB6
m=audio 3478 RTP/AVP 0
b=RS:0
b=RR:0
a=rtpmap:0 PCMU/8000
a=candidate:1 1 UDP 2130706431 192.0.2.1 3478 typ host
]]></artwork>
      </figure>
]]></sourcecode>
    </section>

    <section anchor="sec-why-remote" title="The remote-candidates Attribute"> numbered="true" toc="default">
      <name>The "remote-candidates" Attribute</name>

      <t>
The "a=remote-candidates" "remote-candidates" attribute exists to eliminate a race condition between the updated offer and the response to the STUN Binding request that moved a candidate into the Valid valid list.
This race condition is shown in <xref target="fig-race-flow"/>. target="fig-race-flow" format="default"/>.
On receipt of message 4, agent L adds a candidate pair to the valid list.
If there was only a single data stream with a single component, agent L could now send an updated offer.
   However, the check from agent R has not yet generated
   received a response, and agent R receives the updated offer
   (message 7) before getting the response (message 9).
Thus, it does not yet know that this particular pair is valid.
To eliminate this condition, the actual candidates at R that were selected by the offerer (the remote candidates) are included in the offer itself, and the answerer delays its answer until those pairs validate.
</t>
      <figure anchor="fig-race-flow" title="Race anchor="fig-race-flow">
        <name>Race Condition Flow">
        <artwork><![CDATA[ Flow</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
Agent L               Network               Agent R
   |(1) Offer            |                     |
   |------------------------------------------>|
   |(2) Answer           |                     |
   |<------------------------------------------|
   |(3) STUN Req.        |                     |
   |------------------------------------------>|
   |(4) STUN Res.        |                     |
   |<------------------------------------------|
   |(5) STUN Req.        |                     |
   |<------------------------------------------|
   |(6) STUN Res.        |                     |
   |-------------------->|                     |
   |                     |Lost                 |
   |(7) Offer            |                     |
   |------------------------------------------>|
   |(8) STUN Req.        |                     |
   |<------------------------------------------|
   |(9) STUN Res.        |                     |
   |------------------------------------------>|
   |(10) Answer          |                     |
   |<------------------------------------------|
]]></artwork>
      </figure>
    </section>
    <section anchor="sec-glare" title="Why numbered="true" toc="default">
      <name>Why Is the Conflict Resolution Mechanism Needed?"> Needed?</name>
      <t>
When ICE runs between two peers, one agent acts as controlled, and the other as controlling.
Rules are defined as a function of implementation type and offerer/answerer to determine who is controlling and who is controlled.
However, the specification mentions that, in some cases, both sides might believe they are controlling, or both sides might believe they are controlled.
How can this happen?
</t>
      <t>
The condition when both agents believe they are controlled shows up in third party call control cases.
Consider the following flow:
</t>
      <figure anchor="fig-conflict" title="Role anchor="fig-conflict">
        <name>Role Conflict Flow">
        <artwork><![CDATA[ Flow</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
          A         Controller          B
          |(1) INV()     |              |
          |<-------------|              |
          |(2) 200(SDP1) |              |
          |------------->|              |
          |              |(3) INV()     |
          |              |------------->|
          |              |(4) 200(SDP2) |
          |              |<-------------|
          |(5) ACK(SDP2) |              |
          |<-------------|              |
          |              |(6) ACK(SDP1) |
          |              |------------->|
]]></artwork>
      </figure>
      <t>
This flow is a variation on flow III of RFC 3725 <xref target="RFC3725"/>. target="RFC3725" format="default"/>.
In fact, it works better than flow III since it produces fewer messages.
In this flow, the controller sends an offerless INVITE to agent A, which responds with its offer, SDP1.
The agent then sends an offerless INVITE to agent B, which it responds to with its offer, SDP2.
The controller then uses the offer from each agent to generate the answers.
When this flow is used, ICE will run between agents A and B, but both will believe they are in the controlling role.
With the role conflict resolution procedures, this flow will function properly when ICE is used.
</t>
      <t>
At this time, there are no documented flows that can result in the case where both agents believe they are controlled.
However, the conflict resolution procedures allow for this case, should a flow arise that would fit into this category.
</t>
    </section>
    <section title="Why numbered="true" toc="default">
      <name>Why Send an Updated Offer?"> Offer?</name>
      <t>
Section 11.1
<xref target="RFC8445" section="12.1" sectionFormat="of" format="default"/>
describes rules for sending media.
Both agents can send media once ICE checks complete, without waiting for an updated offer.
Indeed, the only purpose of the updated offer is to "correct" the SDP so that the default destination for media matches where media is being sent based on ICE procedures (which will be the highest-priority nominated candidate pair).
</t>
      <t>
This raises the question&#8201;&#8212;&#8201;why question -- why is the updated offer/answer exchange needed at all?
Indeed, in a pure offer/answer environment, it would not be.
The offerer and answerer will agree on the candidates to use through ICE, and then can begin using them.
As far as the agents themselves are concerned, the updated offer/answer provides no new information.
However, in practice, numerous components along the signaling path look at the SDP information.
These include entities performing off-path QoS reservations, NAT traversal components such as ALGs and Session Border Controllers (SBCs), and diagnostic tools that passively monitor the network.
For these tools to continue to function without change, the core property of SDP&#8201;&#8212;&#8201;that SDP -- that the existing, pre-ICE definitions of the addresses used for media&#8201;&#8212;&#8201;the media -- the "m=" and "c=" lines and the rtcp attribute&#8201;&#8212;&#8201;must "rtcp" attribute -- must be retained.
For this reason, an updated offer must be sent.
</t>
    </section>
    <section title="Contributors"> numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
A large part of the text in this document was taken from <xref
target="RFC5245" format="default"/>, authored by <contact fullname="Jonathan
Rosenberg"/>.
</t>
      <t>
Some of the text in this document was taken from <xref target="RFC6336" format="default"/>,
authored by <contact fullname="Magnus Westerlund"/> and <contact fullname="Colin Perkins"/>.
</t>
      <t>
Many thanks to <contact fullname="Flemming Andreasen"/> for shepherd review feedback.
</t>
      <t>
Thanks to following experts for their reviews and constructive feedback:
<contact fullname="Thomas Stach"/>, <contact fullname="Adam Roach"/>,
<contact fullname="Peter Saint-Andre"/>, <contact fullname="Roman Danyliw"/>,
<contact fullname="Alissa Cooper"/>, <contact fullname="Benjamin Kaduk"/>,
<contact fullname="Mirja Kühlewind"/>, <contact fullname="Alexey Melnikov"/>, and
<contact fullname="Éric Vyncke"/> for their detailed reviews.
</t>
    </section>
    <section numbered="false" toc="default">
      <name>Contributors</name>
      <t>
Following
The following experts have contributed textual and structural improvements for this work
</t>
      <t>
        <list style="numbers">
          <t>
Thomas Stach
<list style="symbols"><t>thomass.stach@gmail.com</t></list></t>
        </list> work:
</t>
      <contact fullname="Thomas Stach">
        <address>
          <email>thomass.stach@gmail.com</email>
        </address>
      </contact>
    </section>
  </back>
</rfc>