No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0371.xml 58KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Jingle ICE Transport Method</title>
  10. <abstract>This specification defines a Jingle transport method that results in sending media data using datagram associations via the User Datagram Protocol (UDP) or using end-to-end connections via the Transport Control Protocol (TCP). This transport method is negotiated via the Interactive Connectivity Establishment (ICE) methodology (which provides robust NAT traversal for media traffic) and also supports the ability to exchange candidates throughout the life of the session, consistent with so-called "Trickle ICE" (draft-ietf-ice-trickle).</abstract>
  12. <number>0371</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0166</spec>
  20. <spec>RFC 5245</spec>
  21. <spec>RFC 6544</spec>
  22. <spec>draft-ietf-ice-trickle</spec>
  23. </dependencies>
  24. <supersedes>
  25. <spec>XEP-0176</spec>
  26. </supersedes>
  27. <supersededby/>
  28. <shortname>jingle-ice</shortname>
  29. &stpeter;
  30. <revision>
  31. <version>0.2</version>
  32. <date>2017-09-11</date>
  33. <initials>XEP Editor (jwi)</initials>
  34. <remark>Defer due to lack of activity.</remark>
  35. </revision>
  36. <revision>
  37. <version>0.1</version>
  38. <date>2016-01-21</date>
  39. <initials>XEP Editor (asw)</initials>
  40. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.0.2</version>
  44. <date>2015-12-30</date>
  45. <initials>psa</initials>
  46. <remark>
  47. <ul>
  48. <li>Added a 'tcptype' attribute to support ICE-TCP (RFC 6544) instead of overloading the existing 'type' attribute, with values of "active", "passive", and "so".</li>
  49. <li>Modified the syntax of the end-of-candidates indication so that it is wrapped in a &lt;transport/&gt; element in the same namespace.</li>
  50. </ul>
  51. </remark>
  52. </revision>
  53. <revision>
  54. <version>0.0.1</version>
  55. <date>2015-12-16</date>
  56. <initials>psa</initials>
  57. <remark>
  58. <ul>
  59. <li>Forked from XEP-0176 (see that specification for older revision history).</li>
  60. <li>Added support for ICE-TCP (RFC 6544), specifically by allowing a value of "tcp" for the 'protocol' attribute and values of "tcp-active", "tcp-passive", and "tcp-so" for the 'type' attribute.</li>
  61. <li>Changed title from ICE-UDP to ICE, but retained namespace name for backward compatibility.</li>
  62. <li>Corrected data type of foundation attribute from xs:unsignedByte to xs:string.</li>
  63. <li>Added a note about not mapping ice-options because it is not needed in XMPP.</li>
  64. <li>Specified that the &lt;transport/&gt; element is extensible by adding xs:any to the schema.</li>
  65. <li>Changed the normativity of the 'generation' attribute from required to optional because it is not absolutely necessary for ICE restarts.</li>
  66. <li>Added informational message to indicate completion of sending ICE candidates (the "end-of-candidates indication") as in WebRTC and ORTC.</li>
  67. <li>Verified compatibility with IETF "Trickle ICE" specification.</li>
  68. </ul>
  69. </remark>
  70. </revision>
  71. </header>
  72. <section1 topic='Introduction' anchor='intro'>
  73. <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>
  74. <p>The current document defines a transport method for establishing and managing data exchanges between XMPP entities by means of the Interactive Connectivity Establishment (ICE) methodology specified in &rfc5245;. The Jingle usage of ICE was also the first technology to send ICE candidates incrementally, a technique that has since become known as "Trickle ICE" &trickle;.</p>
  75. <p>The process for ICE negotiation is largely the same in Jingle as it is in RFC 5245. There are several differences:</p>
  76. <ul>
  77. <li>Instead of using the Session Initiation Protocol (SIP) as the signalling channel, Jingle uses XMPP as the signalling channel.</li>
  78. <li>Syntax from the Session Description Protocol (see &rfc4566;) is mapped to an XML syntax suitable for sending over the XMPP signalling channel.</li>
  79. <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 RFC 5245.</li>
  80. <li>Candidates can also be sent in separate transport-info messages either before sending or receiving 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). This usage, which has been part of the Jingle ICE transport method since 2005, has since come to be known as "Trickle ICE"; as defined here the usage is consistent with the IETF specification for Trickle ICE &trickle;.</li>
  81. </ul>
  82. <p>As originally defined in XEP-0166 and then &xep0176; the use of ICE in Jingle applied only to negotiations that established a User Datagram Protocol association (see &rfc0768;) and thus resulted in a Jingle datagram transport suitable for media applications where some packet loss is tolerable (e.g., audio and video). However, since the publication of &rfc6544; in 2012 it has also been possible to exchange Transmission Control Protocol (see &rfc0793;) candidates during ICE negotiation. Therefore this document expands the use of ICE in Jingle to also establish a TCP connection and thus result in a Jingle stream transport suitable for media applications where packet loss cannot be tolerated (e.g., file transfer). To reduce the possibility of confusion, the expanded definition provided here is specified in a new XEP, which is intended to supersede XEP-0176.</p>
  83. </section1>
  84. <section1 topic='Glossary' anchor='terms'>
  85. <p>The reader is referred to RFC 5245 and draft-ietf-ice-trickle for a description of various terms used in the context of ICE. Those terms are not reproduced here.</p>
  86. </section1>
  87. <section1 topic='Requirements' anchor='reqs'>
  88. <p>The Jingle transport method defined herein is designed to meet the following requirements:</p>
  89. <ol>
  90. <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>
  91. <li>Enable use of UDP or TCP as the transport protocol.</li>
  92. <li>Make it relatively easy to implement support in standard Jabber/XMPP clients.</li>
  93. <li>Where communication with non-XMPP entities is needed, push as much complexity as possible onto server-side gateways between the XMPP network and the non-XMPP network.</li>
  94. </ol>
  95. </section1>
  96. <section1 topic='Jingle Conformance' anchor='conformance'>
  97. <p>In accordance with Section 10 of <cite>XEP-0166</cite>, this document specifies the following information related to the Jingle ICE transport method:</p>
  98. <ol>
  99. <li><p>The transport negotiation process is defined in the <link url='#protocol'>Protocol Description</link> section of this document.</p></li>
  100. <li><p>The semantics of the &TRANSPORT; element are defined in the <link url='#protocol-negotiate'>ICE Negotiation</link> section of this document.</p></li>
  101. <li><p>Depending on the kinds of candidates exchanged, successful negotiation of this method results in use of a datagram transport (suitable for applications where some packet loss is tolerable, such as audio and video) or of a streaming transport (suitable for applications where packet loss is not tolerable, such as file transfer).</p></li>
  102. <li><p>If multiple components are to be communicated by the application type that uses the transport, the transport shall support those components and assign identifiers for them as described in the specification that defines the application type.</p></li>
  103. </ol>
  104. </section1>
  105. <section1 topic='Protocol Description' anchor='protocol'>
  106. <section2 topic='Overall Flow' anchor='protocol-flow'>
  107. <p>The overall protocol flow for negotiation of the Jingle ICE Transport Method is as follows (note: many of these events happen simultaneously, not in sequence).</p>
  108. <code><![CDATA[
  110. | |
  111. | Jingle session-initiate stanza |
  112. | (with zero or more candidates) |
  113. |------------------------------------->|
  114. | Jingle ack (XMPP IQ-result) |
  115. |<-------------------------------------|
  116. | Jingle session-accept stanza |
  117. | (with one or more candidates) |
  118. |<-------------------------------------|
  119. | Jingle ack (XMPP IQ-result) |
  120. |------------------------------------->|
  121. | multiple STUN Binding Requests |
  122. |<====================================>|
  123. | multiple STUN Binding Results |
  124. |<====================================>|
  125. |<=========MEDIA NOW FLOWS============>|
  126. | optional Jingle transport-info |
  127. | stanzas (one candidate per stanza) |
  128. |<------------------------------------>|
  129. | |
  130. ]]></code>
  131. <p>Note: The examples in this document follow the scenario described in Section 17 of RFC 5245, except that we substitute the Shakespearean characters "Romeo" and "Juliet" for the generic entities "L" and "R".</p>
  132. </section2>
  133. <section2 topic='Session Initiation' anchor='protocol-initiate'>
  134. <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 transport method for an application format, it MUST include a &TRANSPORT; child element qualified by the 'urn:xmpp:jingle:transports:ice:0' 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>
  135. <example caption="Initiation"><![CDATA[
  136. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  137. id='ixt174g9'
  138. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  139. type='set'>
  140. <jingle xmlns='urn:xmpp:jingle:1'
  141. action='session-initiate'
  142. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  143. sid='a73sjjvkla37jfea'>
  144. <content creator='initiator' name='this-is-the-audio-content'>
  145. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  146. <payload-type id='96' name='speex' clockrate='16000'/>
  147. <payload-type id='97' name='speex' clockrate='8000'/>
  148. <payload-type id='18' name='G729'/>
  149. <payload-type id='0' name='PCMU' />
  150. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  151. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  152. </description>
  153. <transport xmlns='urn:xmpp:jingle:transports:ice:0'
  154. pwd='asd88fgpdd777uzjYhagZg'
  155. ufrag='8hhy'>
  156. <candidate component='1'
  157. foundation='2B78DADC1A9E'
  158. generation='0'
  159. id='el0747fg11'
  160. ip=''
  161. network='1'
  162. port='8998'
  163. priority='2130706431'
  164. protocol='udp'
  165. type='host'/>
  166. <candidate component='1'
  167. foundation='58AA96B8FA5A'
  168. generation='0'
  169. id='y3s2b30v3r'
  170. ip=''
  171. network='1'
  172. port='45664'
  173. priority='1694498815'
  174. protocol='udp'
  175. rel-addr=''
  176. rel-port='8998'
  177. type='srflx'/>
  178. </transport>
  179. </content>
  180. </jingle>
  181. </iq>
  182. ]]></example>
  183. </section2>
  184. <section2 topic='Syntax' anchor='protocol-syntax'>
  185. <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 RFC 5245 and as shown in the examples. The attributes of the &lt;transport/&gt; element are as follows.</p>
  186. <table caption='Transport Attributes'>
  187. <tr>
  188. <th>Name</th>
  189. <th>Description</th>
  190. <th>SDP Syntax</th>
  191. <th>Example</th>
  192. </tr>
  193. <tr>
  194. <td>pwd</td>
  195. <td>A Password as defined in RFC 5245.</td>
  196. <td>a=ice-pwd line</td>
  197. <td>asd88fgpdd777uzjYhagZg</td>
  198. </tr>
  199. <tr>
  200. <td>ufrag</td>
  201. <td>A User Fragment as defined in RFC 5245.</td>
  202. <td>a=ice-ufrag line</td>
  203. <td>8hhy</td>
  204. </tr>
  205. </table>
  206. <p>The attributes of the &lt;candidate/&gt; element are as follows.</p>
  207. <table caption='Candidate Attributes'>
  208. <tr>
  209. <th>Name</th>
  210. <th>Description</th>
  211. <th>SDP Syntax</th>
  212. <th>Example</th>
  213. </tr>
  214. <tr>
  215. <td>component</td>
  216. <td>A Component ID as defined in RFC 5245.</td>
  217. <td>Component ID value in a=candidate line</td>
  218. <td>1</td>
  219. </tr>
  220. <tr>
  221. <td>foundation</td>
  222. <td>A Foundation as defined in RFC 5245. (Note that version 1.0 of this specification container an error, whereby the data type for the Jingle 'foundation' attribute was defined as xs:unsignedByte; in version 1.1 this was corrected to xs:string, however some existing implementations might not use or expect strings.)</td>
  223. <td>Foundation value in a=candidate line</td>
  224. <td>2B78DADC1A9E</td>
  225. </tr>
  226. <tr>
  227. <td>generation</td>
  228. <td>An index, starting at 0, that enables the parties to keep track of updates to the candidate throughout the life of the session. For details, see the <link url='#protocol-restarts'>ICE Restarts</link> section of this document.</td>
  229. <td>extended name/value pair in a=candidate line</td>
  230. <td>0</td>
  231. </tr>
  232. <tr>
  233. <td>id</td>
  234. <td>A unique identifier for the candidate.</td>
  235. <td>N/A</td>
  236. <td>el0747fg11</td>
  237. </tr>
  238. <tr>
  239. <td>ip</td>
  240. <td>The Internet Protocol (IP) address for the candidate transport mechanism; this can be either an IPv4 address or an IPv6 address.</td>
  241. <td>IP Address value in a=candidate line</td>
  242. <td></td>
  243. </tr>
  244. <tr>
  245. <td>network</td>
  246. <td>An index, starting at 0, referencing which network this candidate is on for a given peer (used for diagnostic purposes if the calling hardware has more than one Network Interface Card).</td>
  247. <td>N/A</td>
  248. <td>0</td>
  249. </tr>
  250. <tr>
  251. <td>port</td>
  252. <td>The port at the candidate IP address.</td>
  253. <td>Port value in a=candidate line</td>
  254. <td>45664</td>
  255. </tr>
  256. <tr>
  257. <td>priority</td>
  258. <td>A Priority as defined in RFC 5245.
  259. <note>In accordance with the rules specified in Section 4.1.1 of RFC 5245, 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>
  260. </td>
  261. <td>Priority value in a=candidate line</td>
  262. <td>2130706431</td>
  263. </tr>
  264. <tr>
  265. <td>protocol</td>
  266. <td>The protocol to be used. The values allowed by this specification are "udp" (see RFC 5245) and "tcp" (see RFC 6455).</td>
  267. <td>Transport protocol field in a=candidate line</td>
  268. <td>udp</td>
  269. </tr>
  270. <tr>
  271. <td>rel-addr</td>
  272. <td>A related address as defined in RFC 5245.</td>
  273. <td>Value of raddr attribute in a=candidate line</td>
  274. <td></td>
  275. </tr>
  276. <tr>
  277. <td>rel-port</td>
  278. <td>A related port as defined in RFC 5245.</td>
  279. <td>Value of rport attribute in a=candidate line</td>
  280. <td>8998</td>
  281. </tr>
  282. <tr>
  283. <td>tcptype</td>
  284. <td>A TCP candidate type as defined in RFC 6455. The allowable values are "active" for TCP active candidates, "passive" for TCP passive candidates, and "so" for TCP simultaneous-open candidates.</td>
  285. <td>Value of tcptype attribute in a=candidate line</td>
  286. <td>so</td>
  287. </tr>
  288. <tr>
  289. <td>type</td>
  290. <td>An ICE candidate type as defined in RFC 5245. The allowable values are "host" for host candidates, "prflx" for peer reflexive candidates, "relay" for relayed candidates, and "srflx" for server reflexive candidates. Note that TCP candidate types (RFC 6455) are handled via the 'tcptype' attribute.</td>
  291. <td>Value of typ attribute in a=candidate line</td>
  292. <td>srflx</td>
  293. </tr>
  294. </table>
  295. <p>Note this specification does not provide an equivalent of the "ice-options" attribute defined in Section 15.5 of RFC 5245, since it is not needed in XMPP given the existence of the Service Discovery extension (XEP-0030).</p>
  296. </section2>
  297. <section2 topic='Response' anchor='protocol-response'>
  298. <p>As described in <cite>XEP-0166</cite>, to acknowledge receipt of the session initiation request, the responder immediately returns an IQ-result.</p>
  299. <example caption="Responder acknowledges receipt of session-initiate request"><![CDATA[
  300. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  301. id='ixt174g9'
  302. to='romeo@montague.example/dr4hcr0st3lup4c'
  303. type='result'/>
  304. ]]></example>
  305. <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:0' namespace, which SHOULD in turn contain one &CANDIDATE; element for each ICE 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>
  306. <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>
  307. <example caption="Responder accepts the session request"><![CDATA[
  308. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  309. id='rw782g55'
  310. to='romeo@montague.example/dr4hcr0st3lup4c'
  311. type='set'>
  312. <jingle xmlns='urn:xmpp:jingle:1'
  313. action='session-accept'
  314. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  315. responder='juliet@capulet.example/yn0cl4bnw0yr3vym'
  316. sid='a73sjjvkla37jfea'>
  317. <content creator='initiator' name='this-is-the-audio-content'>
  318. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  319. <payload-type id='97' name='speex' clockrate='8000'/>
  320. <payload-type id='18' name='G729'/>
  321. </description>
  322. <transport xmlns='urn:xmpp:jingle:transports:ice:0'
  323. pwd='YH75Fviy6338Vbrhrlp8Yh'
  324. ufrag='9uB6'>
  325. <candidate component='1'
  326. foundation='2B78DADC1A9E'
  327. generation='0'
  328. id='or2ii2syr1'
  329. ip=''
  330. network='0'
  331. port='3478'
  332. priority='2130706431'
  333. protocol='udp'
  334. type='host'/>
  335. </transport>
  336. </content>
  337. </jingle>
  338. </iq>
  339. ]]></example>
  340. </section2>
  341. <section2 topic='Candidate Negotiation' anchor='protocol-candidates'>
  342. <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 the IQ-result that acknowledges 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>
  343. <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 RFC 5245.</note> These candidates SHOULD be gathered by following the procedure specified in Section 4.1.1 of RFC 5245 (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 RFC 5245.</p>
  344. <p>Each candidate shall be sent as a &lt;candidate/&gt; child of a &TRANSPORT; element qualified by the 'urn:xmpp:jingle:transports:ice:0' namespace. The &TRANSPORT; element is sent via a Jingle message of type session-initiate, session-accept, or transport-info.</p>
  345. <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>
  346. <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>
  347. <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>
  348. </section2>
  349. <section2 topic='Connectivity Checks' anchor='protocol-checks'>
  350. <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 RFC 5245. The following business rules apply:</p>
  351. <ol>
  352. <li>Each party sends a STUN Binding Request (see &rfc5389;) from each local candidate it generated to each remote candidate it received.</li>
  353. <li>In accordance with RFC 5245, the STUN Binding Requests MUST include the PRIORITY attribute (computed according to Section of RFC 5245).</li>
  354. <li>For the purposes of the Jingle ICE Transport Method, both parties are full ICE implementations and therefore the controlling role MUST be assumed by the initiator and the controlled role MUST be assumed by the responder.</li>
  355. <li>The STUN Binding Requests generated by the initiator MAY include the USE-CANDIDATE attribute to indicate that the initiator wishes to cease checks for this component.</li>
  356. <li>The STUN Binding Requests generated by the initiator MUST include the ICE-CONTROLLING attribute.</li>
  357. <li>The STUN Binding Requests generated by the responder MUST include the ICE-CONTROLLED attribute.</li>
  358. <li>The parties MUST use STUN short term credentials to authenticate requests and perform message integrity checks. As in RFC 5245, the username in the STUN Binding Request is of the form "ufrag-of-peer:ufrag-of-sender" and the password is the value of the 'pwd' attribute provided by the peer. <note>Thus when Romeo sends a STUN Binding Request to Juliet the credentials will be STUN username "9uB6:8hhy" (ufrag provided by Juliet concatenated with ufrag provided by Romeo) and password "YH75Fviy6338Vbrhrlp8Yh" (pwd provided by Juliet) whereas when Juliet sends a STUN Binding Request to Romeo the credentials will be STUN username "8hhy:9uB6" (ufrag provided by Romeo concatenated with ufrag provided by Juliet) and password "asd88fgpdd777uzjYhagZg" (pwd provided by Romeo).</note></li>
  359. </ol>
  360. <p>When it receives a STUN Binding Request, each party MUST return a STUN Binding Response, which indicates either an error case or the success case. As described in Section of RFC 5245, a connectivity check succeeds if <em>all</em> of the following are true:</p>
  361. <ol>
  362. <li>The STUN transaction generated a success response.</li>
  363. <li>The source IP address and port of the response equals the destination IP address and port to which the Binding Request was sent.</li>
  364. <li>The destination IP address and port of the response match the source IP address and port from which the Binding Request was sent.</li>
  365. </ol>
  366. <p>For the candidates exchanged in the previous section, the connectivity checks would be as follows (this diagram mirrors the example in RFC 5245).</p>
  367. <code><![CDATA[
  369. | | |
  370. | | STUN Binding Request |
  371. | | from |
  372. | | to |
  373. | | (dropped) |
  374. | | x====================|
  375. | STUN Binding Request | |
  376. | from | |
  377. | to | |
  378. | USE-CANDIDATE | |
  379. |======================>| |
  380. | | STUN Binding Request |
  381. | | from |
  382. | | to |
  383. | | USE-CANDIDATE |
  384. | |======================>|
  385. | | STUN Binding Response |
  386. | | from |
  387. | | to |
  388. | |<======================|
  389. | STUN Binding Response | |
  390. | from | |
  391. | to | |
  392. | map | |
  393. |<======================| |
  394. | | |
  395. |<==Media Now Can Flow==| |
  396. | | |
  397. | | STUN Binding Request |
  398. | | from |
  399. | | to |
  400. | |<======================|
  401. | STUN Binding Request | |
  402. | from | |
  403. | to | |
  404. |<======================| |
  405. | STUN Binding Response | |
  406. | from | |
  407. | to | |
  408. | map | |
  409. |======================>| |
  410. | | STUN Binding Response |
  411. | | from |
  412. | | to |
  413. | | map |
  414. | |======================>|
  415. | | |
  416. | |==Media Now Can Flow==>|
  417. | | |
  418. ]]></code>
  419. <p>Note: Here the initiator (controlling agent) is using "aggressive nomination" as described in Section of RFC 5245 and therefore includes the USE-CANDIDATE attribute in the STUN Binding Requests it sends.</p>
  420. </section2>
  421. <section2 topic='End-of-Candidates Indication' anchor='protocol-end'>
  422. <p>As explained in the Trickle ICE specification, when a party has completed gathering of ICE candidates it will send an "end-of-candidates indication" to the other party. In Jingle, this takes the form of an informational message as described under <link url='#info'>Informational Messages</link>. This specificaton defines only a standalone "end-of-candidates indication" (i.e., not a way to indicate ICE completion in an offer or answer).</p>
  423. </section2>
  424. <section2 topic='Acceptance of Successful Candidate' anchor='protocol-acceptance'>
  425. <p>If, based on STUN connectivity checks, the parties determine that they will be able to exchange media between a given pair of local candidates and remote candidates (i.e., the pair is "nominated" and ICE processing is "completed"), they can then begin using that candidate pair to exchange media.</p>
  426. <p>Once the parties have connectivity and therefore the initiator has completed ICE as explained in RFC 5245, the initiator MAY communicate the in-use candidate pair in the signalling channel by sending a transport-info message that contains a &lt;remote-candidate/&gt; element (this maps to the SDP "remote-candidates" attribute as described in Section B.6 of RFC 5245, i.e., remote candidates are "the actual candidates at R that were selected by the offerer", of which there will be only one at this stage of the ICE negotiation).</p>
  427. <example caption="Initiator communicates in-use candidate"><![CDATA[
  428. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  429. id='pd81b49s'
  430. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  431. type='set'>
  432. <jingle xmlns='urn:xmpp:jingle:1'
  433. action='transport-info'
  434. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  435. sid='a73sjjvkla37jfea'>
  436. <content creator='initiator' name='this-is-the-audio-content'>
  437. <transport xmlns='urn:xmpp:jingle:transports:ice:0'
  438. pwd='asd88fgpdd777uzjYhagZg'
  439. ufrag='8hhy'>
  440. <remote-candidate component='1'
  441. ip=''
  442. port='9001'/>
  443. </transport>
  444. </content>
  445. </jingle>
  446. </iq>
  447. ]]></example>
  448. <p>(In accordance with Jingle core, the responder will also acknowledge the transport-info message.)</p>
  449. <p>In the unlikely event that one of the parties determines that it cannot establish connectivity even after sending and checking lower-priority candidates, it SHOULD terminate the session as described in <cite>XEP-0166</cite>.</p>
  450. </section2>
  451. <section2 topic='Negotiating a New Candidate' anchor='protocol-renegotiate'>
  452. <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>
  453. <example caption="Initiator sends a subsequent candidate"><![CDATA[
  454. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  455. id='uh3g1f48'
  456. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  457. type='set'>
  458. <jingle xmlns='urn:xmpp:jingle:1'
  459. action='transport-info'
  460. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  461. sid='a73sjjvkla37jfea'>
  462. <content creator='initiator' name='this-is-the-audio-content'>
  463. <transport xmlns='urn:xmpp:jingle:transports:ice:0'
  464. pwd='asd88fgpdd777uzjYhagZg'
  465. ufrag='8hhy'>
  466. <candidate component='1'
  467. foundation='2B78DADC1A9E'
  468. generation='0'
  469. id='m3110wc4nd'
  470. ip='2001:db8::9:1'
  471. network='0'
  472. port='9001'
  473. priority='21149780477'
  474. protocol='udp'
  475. type='host'/>
  476. </transport>
  477. </content>
  478. </jingle>
  479. </iq>
  480. ]]></example>
  481. <p>The receiving party MUST acknowledge receipt of the candidate.</p>
  482. <example caption="Recipient acknowledges receipt"><![CDATA[
  483. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  484. id='uh3g1f48'
  485. to='romeo@montague.example/dr4hcr0st3lup4c'
  486. type='result'/>
  487. ]]></example>
  488. <p>The parties would check the newly-offered candidate for connectivity, as described previously. If the parties determine that media can flow over the candidate, they MAY then use the new candidate in subsequent communications.</p>
  489. </section2>
  490. <section2 topic='ICE Restarts' anchor='protocol-restarts'>
  491. <p>At any time, either party MAY restart the process of ICE negotiation by sending a candidate with a 'generation' value that is greater than the previous generation of candidates; when it does so, it MUST generate new values for the 'pwd' and 'ufrag' attributes, consistent with the definition of an ICE restart in Section of RFC 5245 (because an ICE restart is signalled by a change in the 'pwd' and 'ufrag' attributes, strictly speaking the 'generation' attribute is not absolutely necessary). As explained in RFC 5245, typically the ICE negotiation would be restarted to change the media target (e.g., an IP address change for one of the parties) and certain third-party-call-control scenarios.</p>
  492. <example caption="Initiator restarts ICE negotiation"><![CDATA[
  493. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  494. id='kl23fs71'
  495. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  496. type='set'>
  497. <jingle xmlns='urn:xmpp:jingle:1'
  498. action='transport-info'
  499. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  500. sid='a73sjjvkla37jfea'>
  501. <content creator='initiator' name='this-is-the-audio-content'>
  502. <transport xmlns='urn:xmpp:jingle:transports:ice:0'
  503. pwd='bv71hdn38hgb39hf6xlk33'
  504. ufrag='g7qs'>
  505. <candidate component='1'
  506. foundation='2B78DADC1A9E'
  507. generation='1'
  508. id='y3s2b30v3r'
  509. ip=''
  510. network='1'
  511. port='45665'
  512. priority='1694498815'
  513. protocol='udp'
  514. type='srflx'/>
  515. </transport>
  516. </content>
  517. </jingle>
  518. </iq>
  519. ]]></example>
  520. <p>The recipient then acknowledges receipt.</p>
  521. <example caption="Recipient acknowledges transport-info"><![CDATA[
  522. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  523. id='kl23fs71'
  524. to='romeo@montague.example/dr4hcr0st3lup4c'
  525. type='result'/>
  526. ]]></example>
  527. <p>The parties would then exchange new candidates to renegotiate connectivity and would check the new candidates for connectivity, as described previously. If the parties determine that media can flow over one of the new candidates, they can then use the successful candidate in subsequent communications. However, while ICE is being renegotiated the parties can continue to send media with the existing candidate-in-use.</p>
  528. </section2>
  529. </section1>
  530. <section1 topic='Fallback to Raw UDP' anchor='fallback'>
  531. <p>It can happen that the responder does not support ICE, in which case it can be necessary to fall back to use of the &xep0177;. One typical scenario is communication between an ICE-aware Jingle endpoint and a non-ICE-aware SIP endpoint through a Jingle-to-SIP gateway, as follows:</p>
  532. <ol>
  533. <li>The Jingle endpoint sends a session-initiate request to the SIP endpoint, specifying a transport method of ICE.</li>
  534. <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:
  535. <ul>
  536. <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>
  537. <li>Sending SIP INVITE to the SIP endpoint on behalf of the Jingle endpoint, speciying an IP address and port at the gateway.</li>
  538. </ul>
  539. </li>
  540. </ol>
  541. <p>The session flow is as follows.</p>
  542. <code><![CDATA[
  543. Romeo Gateway Juliet
  544. | | |
  545. | session-initiate | |
  546. | (audio definition) | |
  547. |------------------------>| |
  548. | ack | |
  549. |<------------------------| |
  550. | transport-replace | |
  551. | (Raw UDP) | |
  552. |<------------------------| |
  553. | ack | |
  554. |------------------------>| |
  555. | transport-accept | |
  556. |------------------------>| |
  557. | ack | |
  558. |<------------------------| SIP INVITE |
  559. | |------------------------>|
  560. | | 200 OK |
  561. | |<------------------------|
  562. | session-accept | |
  563. |<------------------------| |
  564. | ack | |
  565. |------------------------>| |
  566. | MEDIA SESSION |
  567. |<=================================================>|
  568. | | SIP BYE |
  569. | |<------------------------|
  570. | session-terminate | |
  571. |<------------------------| |
  572. | ack | |
  573. |------------------------>| ack |
  574. | |------------------------>|
  575. | | |
  576. ]]></code>
  577. <p>The protocol flow is as follows, showing only the stanzas sent between Romeo and the gateway (acting on Juliet's behalf).</p>
  578. <example caption="Initiator sends session-initiate"><![CDATA[
  579. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  580. id='p01hf63x'
  581. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  582. type='set'>
  583. <jingle xmlns='urn:xmpp:jingle:1'
  584. action='session-initiate'
  585. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  586. sid='a73sjjvkla37jfea'>
  587. <content creator='initiator' name='voice'>
  588. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  589. <payload-type id='96' name='speex' clockrate='16000'/>
  590. <payload-type id='97' name='speex' clockrate='8000'/>
  591. <payload-type id='18' name='G729'/>
  592. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  593. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  594. </description>
  595. <transport xmlns='urn:xmpp:jingle:transports:ice:0'
  596. pwd='asd88fgpdd777uzjYhagZg'
  597. ufrag='8hhy'>
  598. <candidate component='1'
  599. foundation='2B78DADC1A9E'
  600. generation='0'
  601. id='el0747fg11'
  602. ip=''
  603. network='1'
  604. port='8998'
  605. priority='2130706431'
  606. protocol='udp'
  607. type='host'/>
  608. <candidate component='1'
  609. foundation='58AA96B8FA5A'
  610. generation='0'
  611. id='y3s2b30v3r'
  612. ip=''
  613. network='1'
  614. port='45664'
  615. priority='1694498815'
  616. protocol='udp'
  617. rel-addr=''
  618. rel-port='8998'
  619. type='srflx'/>
  620. </transport>
  621. </content>
  622. </jingle>
  623. </iq>
  624. ]]></example>
  625. <example caption="Responder acknowledges session-initiate"><![CDATA[
  626. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  627. id='p01hf63x'
  628. to='romeo@montague.example/dr4hcr0st3lup4c'
  629. type='result'/>
  630. ]]></example>
  631. <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>
  632. <example caption="Gateway sends transport-replace on behalf of responder"><![CDATA[
  633. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  634. id='hy2gd714'
  635. to='romeo@montague.example/dr4hcr0st3lup4c'
  636. type='set'>
  637. <jingle xmlns='urn:xmpp:jingle:1'
  638. action='transport-replace'
  639. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  640. sid='a73sjjvkla37jfea'>
  641. <content creator='initiator' name='voice1'>
  642. <transport xmlns='urn:xmpp:jingle:transports:raw-udp:1'>
  643. <candidate generation='0'
  644. id='a9j3mnbtu1'
  645. ip=''
  646. port='13540'/>
  647. </transport>
  648. </content>
  649. </jingle>
  650. </iq>
  651. ]]></example>
  652. <p>Romeo then acknowledges the transport-replace message and immediately also sends a transport-accept.</p>
  653. <example caption="Initiator acknowledges transport-replace"><![CDATA[
  654. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  655. id='hy2gd714'
  656. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  657. type='result'/>
  658. ]]></example>
  659. <example caption="Initiator accepts new transport"><![CDATA[
  660. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  661. id='rb391gs5'
  662. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  663. type='set'>
  664. <jingle xmlns='urn:xmpp:jingle:1'
  665. action='transport-accept'
  666. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  667. sid='a73sjjvkla37jfea'>
  668. <content creator='responder' name='voice2'>
  669. <transport xmlns='urn:xmpp:jingle:transports:raw-udp:1'>
  670. <candidate generation='0'
  671. id='a9j3mnbtu1'
  672. ip=''
  673. port='13540'/>
  674. </transport>
  675. </content>
  676. </jingle>
  677. </iq>
  678. ]]></example>
  679. <p>The gateway then acknowledges the acceptance on behalf of Juliet.</p>
  680. <example caption="Gateway acknowledges transport-accept"><![CDATA[
  681. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  682. id='rb391gs5'
  683. to='romeo@montague.example/dr4hcr0st3lup4c'
  684. type='result'/>
  685. ]]></example>
  686. <p>The responder then sends a session-accept through the gateway.</p>
  687. <example caption="Responder sends session-accept"><![CDATA[
  688. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  689. id='ijf61d43'
  690. to='romeo@montague.example/dr4hcr0st3lup4c'
  691. type='set'>
  692. <jingle xmlns='urn:xmpp:jingle:1'
  693. action='session-accept'
  694. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  695. responder='juliet@capulet.example/yn0cl4bnw0yr3vym'
  696. sid='a73sjjvkla37jfea'>
  697. <content creator='initiator' name='voice'>
  698. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  699. <payload-type id='18' name='G729'/>
  700. </description>
  701. <transport xmlns='urn:xmpp:jingle:transports:raw-udp:1'/>
  702. </content>
  703. </jingle>
  704. </iq>
  705. ]]></example>
  706. <example caption="Initiator acknowledges session-accept"><![CDATA[
  707. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  708. id='ijf61d43'
  709. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  710. type='result'/>
  711. ]]></example>
  712. <p>The endpoints now begin to exchange session media, and can continue the session as long as desired.</p>
  713. </section1>
  714. <section1 topic='Informational Messages' anchor='info'>
  715. <p>Informational messages can be sent by either party within the context of Jingle to communicate the status of a Jingle ICE "session". The informational message MUST be an IQ-set containing a &JINGLE; element of type "transport-info", where the informational message is a payload element qualified by the 'urn:xmpp:jingle:transports:ice:info:0' namespace.</p>
  716. <p>The only payload element defined so far is the &lt;ice-gathering-complete/&gt; element. This element is used only to signal that gathering of ICE candidates has been completed (i.e., to send an "end-of-candidates indication"), as in the following example.</p>
  717. <example caption="Responder sends end-of-candidates indication"><![CDATA[
  718. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  719. id='xv39z423'
  720. to='romeo@montague.example/dr4hcr0st3lup4c'
  721. type='set'>
  722. <jingle xmlns='urn:xmpp:jingle:1'
  723. action='transport-info'
  724. initiator='romeo@montague.example/dr4hcr0st3lup4c'
  725. sid='a73sjjvkla37jfea'>
  726. <content creator='initiator' name='this-is-the-audio-content'>
  727. <transport xmlns='urn:xmpp:jingle:transports:ice:0'>
  728. <gathering-complete/>
  729. </transport>
  730. </content>
  731. </jingle>
  732. </iq>
  733. ]]></example>
  734. </section1>
  735. <section1 topic='Determining Support' anchor='support'>
  736. <section2 topic='ICE Support' anchor='support-ice'>
  737. <p>To advertise its support for the Jingle ICE 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:0" for this version (and "urn:xmpp:jingle:transports:ice-udp:1" for the "ICE-UDP" version previously specified in XEP-0176 &VNOTE;.</p>
  738. <example caption="Service discovery information request"><![CDATA[
  739. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  740. id='cv5x41g9'
  741. to='juliet@capulet.example/yn0cl4bnw0yr3vym'
  742. type='get'>
  743. <query xmlns=''/>
  744. </iq>
  745. ]]></example>
  746. <example caption="Service discovery information response"><![CDATA[
  747. <iq from='juliet@capulet.example/yn0cl4bnw0yr3vym'
  748. id='cv5x41g9'
  749. to='romeo@montague.example/dr4hcr0st3lup4c'
  750. type='result'>
  751. <query xmlns=''>
  752. <feature var='urn:xmpp:jingle:1'/>
  753. <feature var='urn:xmpp:jingle:transports:ice:0'/>
  754. <feature var='urn:xmpp:jingle:transports:ice-udp:1'/>
  755. <feature var='urn:xmpp:jingle:apps:rtp:1'/>
  756. <feature var='urn:xmpp:jingle:apps:rtp:audio'/>
  757. <feature var='urn:xmpp:jingle:apps:rtp:video'/>
  758. </query>
  759. </iq>
  760. ]]></example>
  761. <p>In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
  762. </section2>
  763. <section2 topic='SDP Offer / Answer Support' anchor='support-sdp'>
  764. <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>
  765. <example caption="Service discovery information request"><![CDATA[
  766. <iq from='romeo@montague.example/dr4hcr0st3lup4c'
  767. id='ce81f5d6'
  768. to='sip.shakespeare.lit'
  769. type='get'>
  770. <query xmlns=''/>
  771. </iq>
  772. ]]></example>
  773. <example caption="Service discovery information response"><![CDATA[
  774. <iq from='sip.shakespeare.lit'
  775. id='ce81f5d6'
  776. to='romeo@montague.example/dr4hcr0st3lup4c'
  777. type='result'>
  778. <query xmlns=''>
  779. <feature var='urn:ietf:rfc:3264'/>
  780. <feature var='urn:xmpp:jingle:1'/>
  781. <feature var='urn:xmpp:jingle:transports:ice:0'/>
  782. <feature var='urn:xmpp:jingle:transports:ice-udp:1'/>
  783. <feature var='urn:xmpp:jingle:apps:rtp:1'/>
  784. <feature var='urn:xmpp:jingle:apps:rtp:audio'/>
  785. <feature var='urn:xmpp:jingle:apps:rtp:video'/>
  786. </query>
  787. </iq>
  788. ]]></example>
  789. </section2>
  790. </section1>
  791. <section1 topic='Implementation Notes' anchor='impl'>
  792. <p>In order to speed the negotiation process so that media can flow as quickly as possible, the initiator SHOULD gather and prioritize candidates in advance, or as soon as the principal begins the process of initiating a session.</p>
  793. </section1>
  794. <section1 topic='Deployment Notes' anchor='deploy'>
  795. <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;). Deployment of support for &xep0215; might also be helpful.</p>
  796. </section1>
  797. <section1 topic='Security Considerations' anchor='security'>
  798. <section2 topic='Sharing IP Addresses' anchor='security-sharing'>
  799. <p>By definition, the exchange of transport candidates results in exposure of the sender's IP addresses, which comprise a form of personally identifying information. A Jingle client MUST enable a user to control which entities will be allowed to receive such information. If a human user explicitly accepts a session request, then the client SHOULD consider that action to imply approval of IP address sharing. However, waiting for a human user to explicitly accept the session request can result in delays during session setup, since it is more efficient to immediately begin sharing transport candidates. Therefore, it is RECOMMENDED for the client to immediately send transport candidates to a contact (without waiting for explicit user approval of the session request) in the following cases:</p>
  800. <ol>
  801. <li>The user has permanently and formally authorized the contact to view the user's presence information via a presence subscription as reflected in an XMPP roster item (see &xmppim;).</li>
  802. <li>The user has temporarily and dynamically shared presence with the contact via "directed presence" as described in <cite>RFC 3921</cite>.</li>
  803. <li>The user has explicitly added the contact to a "whitelist" of entities who are allowed to access the user's personally-identifying information.</li>
  804. </ol>
  805. </section2>
  806. <section2 topic='Encryption of Media' anchor='security-media'>
  807. <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>
  808. <p>Application types that use the Jingle ICE 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>
  809. </section2>
  810. </section1>
  811. <section1 topic='IANA Considerations' anchor='iana'>
  812. <p>This document requires no interaction with &IANA;.</p>
  813. </section1>
  814. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  815. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  816. <p>This specification defines the following XML namespace:</p>
  817. <ul>
  818. <li>urn:xmpp:jingle:transports:ice:0</li>
  819. </ul>
  820. <p>The &REGISTRAR; includes the foregoing namespace in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
  821. </section2>
  822. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  823. &NSVER;
  824. </section2>
  825. <section2 topic='Service Discovery Features' anchor='registrar-features'>
  826. <p>If an entity supports the SDP offer / answer model described in <cite>RFC 3264</cite> and therefore prefers to receive one transport-info message with multiple candidates, it MUST advertise support for the "urn:ietf:rfc:3264" feature.</p>
  827. <p>The registry submission is as follows.</p>
  828. <code caption='Registry Submission'><![CDATA[
  829. <var>
  830. <name>urn:ietf:rfc:3264</name>
  831. <desc>
  832. Signals support for the SDP offer / answer model
  833. described in RFC 3264
  834. </desc>
  835. <doc>XEP-0176</doc>
  836. </var>
  837. ]]></code>
  838. </section2>
  839. <section2 topic='Jingle Transport Methods' anchor='registrar-transports'>
  840. <p>The XMPP Registrar includes "ice" in its registry of Jingle transport methods at &JINGLETRANSPORTS;. The registry submission is as follows:</p>
  841. <code><![CDATA[
  842. <transport>
  843. <name>ice</name>
  844. <desc>
  845. A method for negotiation of out-of-band UDP associations
  846. or TCP connections with built-in NAT and firewall traversal
  847. using the IETF's Interactive Connectivity Establishment (ICE)
  848. methodology.
  849. </desc>
  850. <type>datagram or streaming</type>
  851. <doc>XEP-0176</doc>
  852. </transport>
  853. ]]></code>
  854. </section2>
  855. </section1>
  856. <section1 topic='XML Schema' anchor='schema'>
  857. <code><![CDATA[
  858. <?xml version='1.0' encoding='UTF-8'?>
  859. <xs:schema
  860. xmlns:xs=''
  861. targetNamespace='urn:xmpp:jingle:transports:ice:0'
  862. xmlns='urn:xmpp:jingle:transports:ice:0'
  863. elementFormDefault='qualified'>
  864. <xs:annotation>
  865. <xs:documentation>
  866. The protocol documented by this schema is defined in
  867. XEP-0176:
  868. </xs:documentation>
  869. </xs:annotation>
  870. <xs:element name='transport'>
  871. <xs:complexType>
  872. <xs:choice minOccurs='0'>
  873. <xs:sequence>
  874. <xs:element name='candidate'
  875. type='candidateElementType'
  876. minOccurs='1'
  877. maxOccurs='unbounded'/>
  878. </xs:sequence>
  879. <xs:sequence>
  880. <xs:element name='remote-candidate'
  881. type='remoteCandidateElementType'
  882. minOccurs='1'
  883. maxOccurs='1'/>
  884. </xs:sequence>
  885. <xs:sequence>
  886. <xs:any namespace="##other"
  887. processContents="lax"
  888. minOccurs="0"
  889. maxOccurs="unbounded"/>
  890. </xs:sequence>
  891. </xs:choice>
  892. <xs:attribute name='pwd' type='xs:string' use='optional'/>
  893. <xs:attribute name='ufrag' type='xs:string' use='optional'/>
  894. </xs:complexType>
  895. </xs:element>
  896. <xs:complexType name='candidateElementType'>
  897. <xs:simpleContent>
  898. <xs:extension base='empty'>
  899. <xs:attribute name='component' type='xs:unsignedByte' use='required'/>
  900. <xs:attribute name='foundation' type='xs:string' use='required'/>
  901. <xs:attribute name='generation' type='xs:unsignedByte' use='optional'/>
  902. <xs:attribute name='id' type='xs:NCName' use='optional'/>
  903. <xs:attribute name='ip' type='xs:string' use='required'/>
  904. <xs:attribute name='network' type='xs:unsignedByte' use='required'/>
  905. <xs:attribute name='port' type='xs:unsignedShort' use='required'/>
  906. <xs:attribute name='priority' type='xs:positiveInteger' use='required'/>
  907. <xs:attribute name='protocol' type='xs:NCName' use='required'/>
  908. <xs:attribute name='rel-addr' type='xs:string' use='optional'/>
  909. <xs:attribute name='rel-port' type='xs:unsignedShort' use='optional'/>
  910. <xs:attribute name='tcptype' use='optional'>
  911. <xs:simpleType>
  912. <xs:restriction base='xs:NCName'>
  913. <xs:enumeration value='active'/>
  914. <xs:enumeration value='passive'/>
  915. <xs:enumeration value='so'/>
  916. </xs:restriction>
  917. </xs:simpleType>
  918. </xs:attribute>
  919. <xs:attribute name='type' use='required'>
  920. <xs:simpleType>
  921. <xs:restriction base='xs:NCName'>
  922. <xs:enumeration value='host'/>
  923. <xs:enumeration value='prflx'/>
  924. <xs:enumeration value='relay'/>
  925. <xs:enumeration value='srflx'/>
  926. </xs:restriction>
  927. </xs:simpleType>
  928. </xs:attribute>
  929. </xs:extension>
  930. </xs:simpleContent>
  931. </xs:complexType>
  932. <xs:complexType name='remoteCandidateElementType'>
  933. <xs:simpleContent>
  934. <xs:extension base='empty'>
  935. <xs:attribute name='component' type='xs:unsignedByte' use='required'/>
  936. <xs:attribute name='ip' type='xs:string' use='required'/>
  937. <xs:attribute name='port' type='xs:unsignedShort' use='required'/>
  938. </xs:extension>
  939. </xs:simpleContent>
  940. </xs:complexType>
  941. <xs:element name='gathering-complete' type='empty'/>
  942. <xs:simpleType name='empty'>
  943. <xs:restriction base='xs:string'>
  944. <xs:enumeration value=''/>
  945. </xs:restriction>
  946. </xs:simpleType>
  947. </xs:schema>
  948. ]]></code>
  949. </section1>
  950. <section1 topic='Acknowledgements' anchor='ack'>
  951. <p>Special thanks to Joe Beda, Scott Ludwig, Joe Hildebrand, Sean Egan, and Robert McQueen for co-authoring XEP-0176, from which this document was forked.</p>
  952. <p>Thanks also to Diana Cionoiu, Olivier Cr&#234;te, Philipp Hancke, Tim Julien, Steffen Larsen, Unnikrishnan Vikrama Panicker, Mike Ruprecht, Lance Stout, Justin Uberti, and Paul Witty for their feedback.</p>
  953. </section1>
  954. </xep>