1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2857 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2009-03-09 17:47:20 +00:00
parent 68f03fc9b1
commit cd76bff68a

View File

@ -29,6 +29,12 @@
&hildjj;
&seanegan;
&robmcqueen;
<revision>
<version>0.26</version>
<date>2009-03-09</date>
<initials>psa</initials>
<remark><p>Minor changes to track modifications to XEP-0166.</p></remark>
</revision>
<revision>
<version>0.25</version>
<date>2009-02-26</date>
@ -188,22 +194,21 @@
</header>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0166; defines a framework for negotiating and managing out-of-band data sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor application formats, leaving that up to separate specifications.</p>
<p>The current document defines a transport method for establishing and managing data exchanges between XMPP entities over the User Datagram Protocol (see &rfc0768;), using the ICE methodology developed within the IETF and specified in &ice; (hereafter referred to as &icecore;). Use of the <strong>ice-udp</strong> method results in a datagram transport suitable for media applications where some packet loss is tolerable (e.g., audio and video).</p>
<p>The current document defines a transport method for establishing and managing data exchanges between XMPP entities over the User Datagram Protocol (see &rfc0768;), using the ICE methodology developed within the IETF and specified in &ice; (hereafter referred to as &icecore;). Use of this "ice-udp" method results in a datagram transport suitable for media applications where some packet loss is tolerable (e.g., audio and video).</p>
<p>Note: &icecore; has been approved for publication as an RFC but has not yet been published as an RFC. While every effort has been made to keep this document synchronized with &icecore;, the interested reader is referred to &icecore; for a detailed description of the ICE methodology.</p>
<p>The process for ICE negotiation is largely the same in Jingle as it is in ICE. There are several differences:</p>
<ul>
<li>Instead of using the Session Initiation Protocol (SIP) as the signalling channel, Jingle uses XMPP as the signalling channel.</li>
<li>In Jingle, lists of "preferred" candidates are typically sent in the Jingle session-initiate and session-accept messages, in a way that is consistent with the SDP offer / answer model described in &rfc3264; and the process described in &icecore;. However, it is also possible to send candidates in separate transport-info messages; this enables a part to send higher-priority candidates earlier in the negotiation and lower-priority candidates later in the negotiation, or to continue sending candidates after session setup to adjust to changing network conditions.</li>
<li>Syntax from the Session Description Protocol (see &rfc4566;) is mapped to an XML syntax suitable for sending over the XMPP signalling channel.</li>
<li>ICE candidates can be upgraded during a session (e.g., to change an IP address).</li>
<li>Either party can continue to send ICE candidates throughout a session and renegotiate which candidate will be used.</li>
<li>In Jingle, lists of "preferred" candidates are typically sent in the Jingle session-initiate and session-accept messages, in a way that is consistent with the SDP offer / answer model described in &rfc3264; and the process described in &icecore;.</li>
<li>Candidates can also be sent in separate transport-info messages either before sending the session-accept message (to expedite negotiation) or after media begins to flow (to find modify existing candidates, find superior candidates, or adjust to changing network conditions).</li>
</ul>
</section1>
<section1 topic='Glossary' anchor='terms'>
<p>The reader is referred to &icecore; for a description of various terms used in the context of ICE. Those terms are not reproduced here.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>The Jingle transport method defined herein are designed to meet the following requirements:</p>
<p>The Jingle transport method defined herein is designed to meet the following requirements:</p>
<ol>
<li>Make it possible to establish and manage out-of-band connections between two XMPP entities, even if they are behind Network Address Translators (NATs) or firewalls.</li>
<li>Enable use of UDP as the transport protocol.</li>
@ -241,7 +246,6 @@ INITIATOR RESPONDER
| multiple STUN Binding Results |
|<====================================>|
|<=========MEDIA NOW FLOWS============>|
| |
| optional Jingle transport-info |
| stanzas (one candidate per stanaza) |
|<------------------------------------>|
@ -250,13 +254,13 @@ INITIATOR RESPONDER
<p>Note: The examples in this document follow the scenario described in Section 17 of &icecore;, except that we substitute the Shakespearean characters "Romeo" and "Juliet" for the generic entities "L" and "R".</p>
</section2>
<section2 topic='Session Initiation' anchor='protocol-initiate'>
<p>In order for the initiator in a Jingle exchange to start the negotiation, it sends a Jingle "session-initiate" stanza that includes at least one content type, as described in <cite>XEP-0166</cite>. If the initiator wishes to negotiate the ice-udp transport method for an application format, it MUST include a &TRANSPORT; child element qualified by the 'urn:xmpp:jingle:transports:ice-udp:1' namespace &VNOTE;. This element SHOULD in turn contain one &CANDIDATE; element for each of the higher-priority transport candidates as determined in accordance with the ICE methodology, but MAY instead be empty (with each candidate to be sent as the payload of a transport-info message).</p>
<p>In order for the initiator in a Jingle exchange to start the negotiation, it sends a Jingle "session-initiate" stanza that includes at least one content type, as described in <cite>XEP-0166</cite>. If the initiator wishes to negotiate the ice-udp transport method for an application format, it MUST include a &TRANSPORT; child element qualified by the 'urn:xmpp:jingle:transports:ice-udp:1' namespace &VNOTE;. This element SHOULD in turn contain one &CANDIDATE; element for each of the initiator's higher-priority transport candidates as determined in accordance with the ICE methodology, but MAY instead be empty (with each candidate to be sent as the payload of a transport-info message).</p>
<example caption="Initiation"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='jingle1'
id='ixt174g9'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='session-initiate'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -301,7 +305,7 @@ INITIATOR RESPONDER
]]></example>
</section2>
<section2 topic='Syntax' anchor='protocol-syntax'>
<p>The &TRANSPORT; element's 'pwd' and 'ufrag' attributes MUST be included whenever sending one or more candidates to the other party, e.g. in a session-initiate, session-accept, transport-info, content-add, or transport-replace message. The values for these attributes are separately generated for both the initiator and the responder, in accordance with &icecore; and as shown in the examples. The attributes are defined as follows.</p>
<p>The &TRANSPORT; element's 'pwd' and 'ufrag' attributes MUST be included whenever sending one or more candidates to the other party, e.g. in a session-initiate, session-accept, transport-info, content-add, or transport-replace message. The values for these attributes are separately generated for both the initiator and the responder, in accordance with &icecore; and as shown in the examples. The attributes of the &lt;transport/&gt; element are as follows.</p>
<table caption='Transport Attributes'>
<tr>
<th>Name</th>
@ -322,7 +326,7 @@ INITIATOR RESPONDER
<td>8hhy</td>
</tr>
</table>
<p>The attributes of the &lt;candidate/&gt; element are described in the following table:</p>
<p>The attributes of the &lt;candidate/&gt; element are as follows.</p>
<table caption='Candidate Attributes'>
<tr>
<th>Name</th>
@ -356,7 +360,7 @@ INITIATOR RESPONDER
</tr>
<tr>
<td>ip</td>
<td>The Internet Protocol (IP) address for the candidate transport mechanism; this may be either an IPv4 address or an IPv6 address.</td>
<td>The Internet Protocol (IP) address for the candidate transport mechanism; this can be either an IPv4 address or an IPv6 address.</td>
<td>IP Address value in a=candidate line</td>
<td>192.0.2.3</td>
</tr>
@ -374,7 +378,7 @@ INITIATOR RESPONDER
</tr>
<tr>
<td>priority</td>
<td>A Priority as defined in &icecore;
<td>A Priority as defined in &icecore;.
<note>In accordance with the rules specified in Section 4.1.1 of &icecore;, the priority values shown in the examples within this document have been calculated as follows. The "type preference" for host candidates is stipulated to be "126" and for server reflexive candidates "100". The "local preference" for network 0 is stipulated to be "4096", for network 1 "2048", and for network 2 "1024".</note>
</td>
<td>Priority value in a=candidate line</td>
@ -382,7 +386,7 @@ INITIATOR RESPONDER
</tr>
<tr>
<td>protocol</td>
<td>The protocol to be used. The only value defined by this specification is "udp".</td>
<td>The protocol to be used. The only value defined by this specification is "udp". <note>Future specifications might define other values such as "tcp".</note></td>
<td>Transport protocol field in a=candidate line</td>
<td>udp</td>
</tr>
@ -410,18 +414,18 @@ INITIATOR RESPONDER
<p>As described in <cite>XEP-0166</cite>, to acknowledge receipt of the session initiation request, the responder immediately returns an IQ-result.</p>
<example caption="Responder acknowledges receipt of session-initiate request"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
id='ixt174g9'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>Depending on the application type, a user agent controlled by a human user might need to wait for the user to affirm a desire to proceed with the session before continuing. When the user agent has received such affirmation (or if the user agent can automatically proceed for any reason, e.g. because no human intervention is expected or because a human user has configured the user agent to automatically accept sessions with a given entity), it returns a Jingle session-accept message. This message MUST contain a &TRANSPORT; element qualified by the 'urn:xmpp:jingle:transports:ice-udp:1' namespace, which SHOULD in turn contain one &CANDIDATE; element for each ICE-UDP candidate generated by or known to the responder, but MAY instead be empty (with each candidate to be sent as the payload of a transport-info message).</p>
<p>Note: See the <link url='#security'>Security Considerations</link> section of this document regarding the exposure of IP addresses on behalf by the responder's client.</p>
<p>Note: See the <link url='#security'>Security Considerations</link> section of this document regarding the exposure of IP addresses by the responder's client.</p>
<example caption="Responder accepts the session request"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
id='rw782g55'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='session-accept'
initiator='romeo@montague.lit/orchard'
responder='juliet@capulet.lit/balcony'
@ -451,13 +455,13 @@ INITIATOR RESPONDER
<section2 topic='Candidate Negotiation' anchor='protocol-candidates'>
<p>The initiator and responder negotiate connectivity over ICE by exchanging XML-formatted transport candidates for the channel. This negotiation proceeds immediately in order to maximize the possibility that connectivity can be established (and therefore media can be exchanged) as quickly as possible. In order to expedite session establishment, the initiator SHOULD include transport candidates in its session-initiate message but MAY also send additional transport candidates as soon as it learns of them, even before receiving acknowledgement of the session-initiate message (i.e., the initiator MUST consider the session to be live as soon as it sends the session-initiate message). <note>Given in-order delivery as mandated by &xmppcore;, the responder will receive such transport-info messages after receiving the session-initiate message; if not, it is appropriate for the responder to return &lt;unknown-session/&gt; errors since according to its state machine the session does not exist.</note></p>
<p>The first step in negotiating connectivity is for each party to send transport candidates to the other party. <note>The fact that both parties send candidates means that Jingle requires each party to be a full implementation of ICE, not a lite implementation as specified in &icecore;.</note> These candidates SHOULD be gathered by following the procedure specified in Section 4.1.1 of &icecore; (typically by communicating with a standalone STUN server in order to discover the client's public IP address and port) and prioritized by following the procedure specified in Section 4.1.2 of &icecore;.</p>
<p>Each candidate or set of candidates shall be sent as &lt;candidate/&gt; children of a &TRANSPORT; element qualified by the 'urn:xmpp:jingle:transports:ice-udp:1' namespace. The &TRANSPORT; element is sent via a Jingle message of type session-initiate, session-accept, or transport-info.</p>
<p>Each candidate shall be sent as a &lt;candidate/&gt; child of a &TRANSPORT; element qualified by the 'urn:xmpp:jingle:transports:ice-udp:1' namespace. The &TRANSPORT; element is sent via a Jingle message of type session-initiate, session-accept, or transport-info.</p>
<p>Either party MAY include multiple &lt;candidate/&gt; elements in one &TRANSPORT; element, especially in the session-initiate and session-accept messages sent at the beginning of the session negotiation. Including multiple candidates in the session-initiate and session-accept messages can help to ensure interoperability with entities that implement the SDP offer/answer model described in <cite>RFC 3264</cite>; in particular, an entity SHOULD include multiple candidates in its session-initiate or session-accept message if the other party advertises support for the "urn:ietf:rfc:3264" service discovery feature as described in the <link url='#support-sdp'>SDP Offer / Answer Support</link> section of this document. However, including one candidate per subsequent transport-info message typically results in a faster negotiation because the candidates most likely to succeed are sent first (in the session-info and session-accept messages) and it is not necessary to gather all candidates before beginning to send any candidates; furthermore, because certain candidates can be more "expensive" in terms of bandwidth or processing power, either party might not want to advertise the existence of such candidates unless it is necessary to do so after other candidates have failed.</p>
<p>If the party that receives a candidate in a Jingle message can successfully process a given candidate or set of candidates, it returns an IQ-result (if not, for example because the candidate data is improperly formatted, it returns an IQ-error). At this point, the receiving entity is only indicating receipt of the candidate or set of candidates, not telling the other party that the candidate will be used.</p>
<p>The initiator can keep sending candidates (without stopping to receive an acknowledgement of receipt from the responder for each candidate) until it has exhausted its supply of possible or desirable transport candidates; for each candidate or set of candidates, the responder acknowledges receipt. The responder can also keep sending potential candidates, which the initiator will acknowledge.</p>
<p>The initiator can keep sending candidates (without stopping to receive an acknowledgement of receipt from the responder for each candidate) until it has exhausted its supply of possible or desirable transport candidates. The responder can also keep sending potential candidates, which the initiator will acknowledge.</p>
</section2>
<section2 topic='Connectivity Checks' anchor='protocol-checks'>
<p>As the initiator and responder receive candidates, they probe the various transport candidates for connectivity. In performing these connectivity checks, each party SHOULD follow the procedure specified in Section 7 of &icecore;. The following business rules apply:</p>
<p>As the initiator and responder receive candidates, they probe the candidates for connectivity. In performing these connectivity checks, each party SHOULD follow the procedure specified in Section 7 of &icecore;. The following business rules apply:</p>
<ol>
<li>Each party sends a STUN Binding Request (see &rfc5389;) from each local candidate it generated to each remote candidate it received.</li>
<li>In accordance with &icecore;, the STUN Binding Requests MUST include the PRIORITY attribute (computed according to Section 7.1.1.1. of &icecore;).</li>
@ -536,7 +540,7 @@ INITIATOR NAT RESPONDER
id='pd81b49s'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-info'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -560,10 +564,10 @@ INITIATOR NAT RESPONDER
<p>An example follows (change to IP address and port).</p>
<example caption="Initiator modifies the in-use candidate"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='rep2'
id='kl23fs71'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-replace'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -589,17 +593,17 @@ INITIATOR NAT RESPONDER
<p>The recipient then acknowledges receipt.</p>
<example caption="Recipient acknowledges transport-replace"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='rep2'
id='kl23fs71'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>If the transport-replace is acceptable, the recipient then sends a transport-accept message (if not, the recipient sends a transport-reject message).</p>
<example caption="Responder definitively accepts the replaced candidate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept2'
id='jh329df7'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-accept'
initiator='romeo@montague.lit/orchard'
responder='juliet@capulet.lit/balcony'
@ -626,20 +630,20 @@ INITIATOR NAT RESPONDER
<p>The initiator then acknowledges the responder's acceptance:</p>
<example caption="Initiator acknowledges content acceptance"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept2'
id='jh329df7'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<p>The parties then use the modified candidate in subsequent communications.</p>
</section2>
<section2 topic='Negotiating a New Candidate' anchor='protocol-renegotiate'>
<p>Even after media has begun to flow, either party MAY continue to send additional candidates to the other party (e.g., because the user agent has become aware of a new media proxy or network interface card). As above, such candidates are shared by sending a transport-info message.</p>
<p>Even after media has begun to flow, either party MAY continue to send additional candidates to the other party (e.g., because the user agent has become aware of a new media proxy or network interface card). Such candidates are shared by sending a transport-info message.</p>
<example caption="Initiator sends a subsequent candidate"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='info4'
id='uh3g1f48'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-info'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -651,7 +655,7 @@ INITIATOR NAT RESPONDER
foundation='1'
generation='0'
id='m3110wc4nd'
ip='10.0.1.2'
ip='2001:db8::9:1'
network='0'
port='9001'
priority='21149780477'
@ -665,17 +669,17 @@ INITIATOR NAT RESPONDER
<p>The receiving party MUST acknowledge receipt of the candidate.</p>
<example caption="Recipient acknowledges receipt"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='info4'
id='uh3g1f48'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>The parties SHOULD check the newly-offered candidate for connectivity, as described previously. If the parties determine that media can flow over the candidate, the initiating party MAY send a transport-replace message to the responder in order to use the new candidate.</p>
<example caption="Initiator sends transport-replace"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='rep3'
id='zx81d0l4'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-replace'
initiator='romeo@montague.lit/orchard'
responder='juliet@capulet.lit/balcony'
@ -688,7 +692,7 @@ INITIATOR NAT RESPONDER
foundation='1'
generation='0'
id='m3110wc4nd'
ip='10.0.1.2'
ip='2001:db8::9:1'
network='0'
port='9001'
priority='21149780477'
@ -702,17 +706,17 @@ INITIATOR NAT RESPONDER
<p>The responder then acknowledges the replaced transport definition.</p>
<example caption="Responder acknowledges transport-replace"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='rep3'
id='zx81d0l4'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>The responder then accepts the replaced transport definition.</p>
<example caption="Responder definitively accepts the replaced transport definition"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept3'
id='gk2gd617'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-accept'
initiator='romeo@montague.lit/orchard'
responder='juliet@capulet.lit/balcony'
@ -736,10 +740,10 @@ INITIATOR NAT RESPONDER
</jingle>
</iq>
]]></example>
<p>The initiator then acknowledges content acceptance.</p>
<example caption="Initiator acknowledges content acceptance"><![CDATA[
<p>The initiator then acknowledges transport acceptance.</p>
<example caption="Initiator acknowledges transport acceptance"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept3'
id='gk2gd617'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
@ -753,8 +757,7 @@ INITIATOR NAT RESPONDER
<li>The Jingle endpoint sends a session-initiate request to the SIP endpoint, specifying a transport method of ICE-UDP.</li>
<li>Based on capabilities information, the gateway knows that the SIP endpoint does not support ICE, so it enables the endpoints to use its media relay. It does this by:
<ul>
<li>Sending a content-add request to the Jingle endpoint on behalf of the SIP endpoint, specifying a transport method of Raw UDP and a candidate whose IP address and port are hosted at the gateway.</li>
<li>Sending a content-remove request to the Jingle endpoint on behalf of the SIP endpoint, specifying a transport method of ICE-UDP.</li>
<li>Sending a transport-replace message to the Jingle endpoint on behalf of the SIP endpoint, specifying a transport method of Raw UDP and a candidate whose IP address and port are hosted at the gateway.</li>
<li>Sending SIP INVITE to the SIP endpoint on behalf of the Jingle endpoint, speciying an IP address and port at the gateway.</li>
</ul>
</li>
@ -798,10 +801,10 @@ Romeo Gateway Juliet
<p>The protocol flow is as follows, showing only the stanzas sent between Romeo and the gateway (acting on Juliet's behalf).</p>
<example caption="Initiator sends session-initiate"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='jingle1'
id='p01hf63x'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='session-initiate'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -813,24 +816,47 @@ Romeo Gateway Juliet
<payload-type id='103' name='L16' clockrate='16000' channels='2'/>
<payload-type id='98' name='x-ISAC' clockrate='8000'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'/>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'>
<candidate component='1'
foundation='1'
generation='0'
id='el0747fg11'
ip='10.0.1.1'
network='1'
port='8998'
priority='2130706431'
protocol='udp'
type='host'/>
<candidate component='1'
foundation='2'
generation='0'
id='y3s2b30v3r'
ip='192.0.2.3'
network='1'
port='45664'
priority='1694498815'
protocol='udp'
rel-addr='10.0.1.1'
rel-port='8998'
type='srflx'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
id='p01hf63x'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>Immediately the gateway sends a transport-replace message to Romeo, specifying a transport of Raw UDP with a candidate whose IP address and port identify a media relay at the gateway.</p>
<example caption="Gateway sends transport-replace on behalf of responder"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='replace1'
id='hy2gd714'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-replace'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -848,16 +874,16 @@ Romeo Gateway Juliet
<p>Romeo then acknowledges the transport-replace message and immediately also sends a transport-accept.</p>
<example caption="Initiator acknowledges transport-replace"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='replace1'
id='hy2gd714'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<example caption="Initiator accepts new transport"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept1'
id='rb391gs5'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='transport-accept'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
@ -875,17 +901,17 @@ Romeo Gateway Juliet
<p>The gateway then acknowledges the acceptance on behalf of Juliet.</p>
<example caption="Gateway acknowledges transport-accept"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
id='rb391gs5'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>Eventually, the responder sends a session-accept through the gateway.</p>
<p>The responder then sends a session-accept through the gateway.</p>
<example caption="Responder sends session-accept"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
id='ijf61d43'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
<jingle xmlns='urn:xmpp:jingle:1'
action='session-accept'
initiator='romeo@montague.lit/orchard'
responder='juliet@capulet.lit/balcony'
@ -901,43 +927,19 @@ Romeo Gateway Juliet
]]></example>
<example caption="Initiator acknowledges session-accept"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept1'
id='ijf61d43'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<p>The endpoints now begin to exchange session media, and can continue the session as long as desired.</p>
<p>Eventually, one of the endpoints terminates the session.</p>
<example caption="Responder terminates the session"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='term1'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='session-terminate'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<reason>
<success/>
<text>Sorry, gotta go!</text>
</reason>
</jingle>
</iq>
]]></example>
<p>The other party then acknowledges termination of the session:</p>
<example caption="Initiator acknowledges termination"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='term1'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
</section1>
<section1 topic='Determining Support' anchor='support'>
<section2 topic='ICE Support' anchor='support-ice'>
<p>If an entity supports the Jingle ice-udp transport, it MUST return a feature of "urn:xmpp:jingle:transports:ice-udp:1" &VNOTE; in response to &xep0030; information requests.</p>
<p>To advertise its support for the Jingle ICE-UDP Transport Method, when replying to &xep0030; information requests an entity MUST return URNs for any version of this protocol that the entity supports -- e.g., "urn:xmpp:jingle:transports:ice-udp:1" for this version and "urn:xmpp:jingle:transports:ice-udp:0" for the previous version &VNOTE;.</p>
<example caption="Service discovery information request"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='disco1'
id='cv5x41g9'
to='juliet@capulet.lit/balcony'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
@ -945,11 +947,16 @@ Romeo Gateway Juliet
]]></example>
<example caption="Service discovery information response"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='disco1'
id='cv5x41g9'
to='romeo@montague.lit/orchard'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:jingle:1'/>
<feature var='urn:xmpp:jingle:transports:ice-udp:0'/>
<feature var='urn:xmpp:jingle:transports:ice-udp:1'/>
<feature var='urn:xmpp:jingle:apps:rtp:1'/>
<feature var='urn:xmpp:jingle:apps:rtp:audio'/>
<feature var='urn:xmpp:jingle:apps:rtp:video'/>
</query>
</iq>
]]></example>
@ -959,7 +966,7 @@ Romeo Gateway Juliet
<p>If an entity supports the SDP offer / answer model described in <cite>RFC 3264</cite> and therefore prefers to receive multiple candidates in a single transport-info message, it MUST advertise support for the "urn:ietf:rfc:3264" service discovery feature. Typically this feature will be advertised only by gateways between Jingle and SIP.</p>
<example caption="Service discovery information request"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='disco2'
id='ce81f5d6'
to='sip.shakespeare.lit'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
@ -967,14 +974,17 @@ Romeo Gateway Juliet
]]></example>
<example caption="Service discovery information response"><![CDATA[
<iq from='sip.shakespeare.lit'
id='disco2'
id='ce81f5d6'
to='romeo@montague.lit/orchard'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:ietf:rfc:3264'/>
<feature var='urn:xmpp:jingle:1'/>
<feature var='urn:xmpp:jingle:transports:ice-udp:0'/>
<feature var='urn:xmpp:jingle:transports:ice-udp:1'/>
...
<feature var='urn:xmpp:jingle:apps:rtp:1'/>
<feature var='urn:xmpp:jingle:apps:rtp:audio'/>
<feature var='urn:xmpp:jingle:apps:rtp:video'/>
</query>
</iq>
]]></example>
@ -986,7 +996,7 @@ Romeo Gateway Juliet
</section1>
<section1 topic='Deployment Notes' anchor='deploy'>
<p>This specification applies exclusively to Jabber/XMPP clients and places no additional requirements on Jabber/XMPP servers. However, service administrators might wish to deploy a STUN server in order to ease the client-to-client negotiation process, and a TURN server for media relaying (see &turn;).</p>
<p>This specification applies exclusively to Jingle clients and places no additional requirements on XMPP servers. However, service administrators might wish to deploy a STUN server in order to ease the client-to-client negotiation process, and a TURN server for media relaying (see &turn;).</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
@ -999,7 +1009,8 @@ Romeo Gateway Juliet
</ol>
</section2>
<section2 topic='Encryption of Media' anchor='security-media'>
<p>In order to secure the data stream that is negotiated via the Jingle ICE transport, implementations SHOULD use encryption methods appropriate to the transport method and media being exchanged (for details regarding RTP exchanges, refer to &xep0167;).</p>
<p>A Jingle implementation SHOULD support security preconditions that are enforced before application media is allowed to flow over a UDP association, such as those described in &xtls;.</p>
<p>Application types that use the Jingle ICE-UDP transport method MAY also define their own application-specific encryption methods, such as the Secure Real-time Transport Protocol (SRTP) for RTP exchanges as described in &xep0167;.</p>
</section2>
</section1>