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-0176.xml 57KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. <!ENTITY icecore "<cite>ICE-CORE</cite>">
  6. ]>
  7. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  8. <xep>
  9. <header>
  10. <title>Jingle ICE-UDP Transport Method</title>
  11. <abstract>This specification defines a Jingle transport method that results in sending media data using raw datagram associations via the User Datagram Protocol (UDP). This transport method is negotiated via the Interactive Connectivity Establishment (ICE) methodology, which provides robust NAT traversal for media traffic.</abstract>
  13. <number>0176</number>
  14. <status>Draft</status>
  15. <type>Standards Track</type>
  16. <sig>Standards</sig>
  17. <approver>Council</approver>
  18. <dependencies>
  19. <spec>XMPP Core</spec>
  20. <spec>XEP-0166</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>jingle-ice-udp</shortname>
  25. <schemaloc>
  26. <ns>jingle:transports:ice-udp</ns>
  27. <url></url>
  28. </schemaloc>
  29. <discuss>jingle</discuss>
  30. &joebeda;
  31. &scottlu;
  32. &stpeter;
  33. &hildjj;
  34. &seanegan;
  35. &robmcqueen;
  36. <revision>
  37. <version>1.0</version>
  38. <date>2009-06-10</date>
  39. <initials>psa</initials>
  40. <remark><p>Per a vote of the XMPP Council, advanced specification from Experimental to Draft.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.27</version>
  44. <date>2009-05-27</date>
  45. <initials>psa</initials>
  46. <remark><p>Clarified ICE restarts and use of the generation attribute, in accordance with the ICE specification.</p></remark>
  47. </revision>
  48. <revision>
  49. <version>0.26</version>
  50. <date>2009-03-09</date>
  51. <initials>psa</initials>
  52. <remark><p>Minor changes to track modifications to XEP-0166.</p></remark>
  53. </revision>
  54. <revision>
  55. <version>0.25</version>
  56. <date>2009-02-26</date>
  57. <initials>psa</initials>
  58. <remark><p>Specified that pwd and ufrag attributes must be included when sending the first candidate; removed rem-addr and rem-port attributes and instead defined transport-info payload for communication of the remote candidate.</p></remark>
  59. </revision>
  60. <revision>
  61. <version>0.24</version>
  62. <date>2009-02-17</date>
  63. <initials>psa/rm</initials>
  64. <remark><p>Simplified flow by including candidates in session-initiate and session-accept.</p></remark>
  65. </revision>
  66. <revision>
  67. <version>0.23</version>
  68. <date>2008-12-19</date>
  69. <initials>psa</initials>
  70. <remark><p>Specified id attribute and added it to the examples; updated namespaces to reflect changes to other Jingle specifications; completed editorial review.</p></remark>
  71. </revision>
  72. <revision>
  73. <version>0.22</version>
  74. <date>2008-09-30</date>
  75. <initials>psa</initials>
  76. <remark><p>Corrected fallback scenario to use transport-replace and transport-accept.</p></remark>
  77. </revision>
  78. <revision>
  79. <version>0.21</version>
  80. <date>2008-09-25</date>
  81. <initials>psa</initials>
  82. <remark>
  83. <ul>
  84. <li>Added section on fallback to Raw UDP transport method.</li>
  85. <li>Modified namespaces to incorporate namespace versioning.</li>
  86. <li>Cleaned up XML schemas.</li>
  87. </ul>
  88. </remark>
  89. </revision>
  90. <revision>
  91. <version>0.20</version>
  92. <date>2008-07-31</date>
  93. <initials>psa</initials>
  94. <remark><p>For consistency with XEP-0166, removed profile attribute, changed content-replace to transport-replace, and changed content-accept to transport-accept.</p></remark>
  95. </revision>
  96. <revision>
  97. <version>0.19</version>
  98. <date>2008-06-04</date>
  99. <initials>psa</initials>
  100. <remark><p>Allowed batching of multiple candidates in a single transport-info message for optional interworking with the SDP offer-answer model, and added urn:ietf:rfc:3264 service discovery feature to advertise such support; updated security considerations regarding sharing of IP addresses.</p></remark>
  101. </revision>
  102. <revision>
  103. <version>0.18</version>
  104. <date>2008-05-28</date>
  105. <initials>psa</initials>
  106. <remark><p>Removed content-replace message from acceptance flow, since in ICE that information is sent via STUN, not in the signalling channel.</p></remark>
  107. </revision>
  108. <revision>
  109. <version>0.17</version>
  110. <date>2008-03-20</date>
  111. <initials>psa</initials>
  112. <remark><p>Moved pwd and ufrag attributes from candidate element to transport element since they describe session-level or media-level information.</p></remark>
  113. </revision>
  114. <revision>
  115. <version>0.16</version>
  116. <date>2008-02-29</date>
  117. <initials>psa</initials>
  118. <remark><p>Changed content-modify to content-replace per XEP-0166.</p></remark>
  119. </revision>
  120. <revision>
  121. <version>0.15</version>
  122. <date>2008-01-06</date>
  123. <initials>psa</initials>
  124. <remark><p>Clarified several small points regarding candidate gathering procedures and STUN connectivity checks.</p></remark>
  125. </revision>
  126. <revision>
  127. <version>0.14</version>
  128. <date>2008-01-02</date>
  129. <initials>psa</initials>
  130. <remark><p>Modified flow for ICE completion to require content-modify from initiator to responder, thus mapping to sending of revised offer in SIP; added rem-addr and rem-port attributes to map to a=remote-candidates information in SDP; changed raddr and rport attributes to rel-addr and rel-port to prevent confusion with rem-addr and rem-port attributes.</p></remark>
  131. </revision>
  132. <revision>
  133. <version>0.13</version>
  134. <date>2007-12-28</date>
  135. <initials>psa</initials>
  136. <remark><p>Added further details about connectivity checks; defined raddr and rport attributes for complete mapping to SDP.</p></remark>
  137. </revision>
  138. <revision>
  139. <version>0.12</version>
  140. <date>2007-11-28</date>
  141. <initials>psa</initials>
  142. <remark><p>Moved ice-tcp definition to a separate specification.</p></remark>
  143. </revision>
  144. <revision>
  145. <version>0.11</version>
  146. <date>2007-11-27</date>
  147. <initials>psa</initials>
  148. <remark><p>Further editorial review; also added sections on modification of existing candidates and exchange of subsequent candidates.</p></remark>
  149. </revision>
  150. <revision>
  151. <version>0.10</version>
  152. <date>2007-11-15</date>
  153. <initials>psa</initials>
  154. <remark><p>Editorial review and consistency check.</p></remark>
  155. </revision>
  156. <revision>
  157. <version>0.9</version>
  158. <date>2007-06-28</date>
  159. <initials>psa</initials>
  160. <remark><p>Updated to track ICE-16.</p></remark>
  161. </revision>
  162. <revision>
  163. <version>0.8</version>
  164. <date>2007-04-17</date>
  165. <initials>psa</initials>
  166. <remark><p>Separately defined ice-tcp and ice-udp transport methods to enable clearer definition of transport methods and reuse by application types; specified Jingle conformance, including definition of ice-udp as datagram and ice-tcp as streaming.</p></remark>
  167. </revision>
  168. <revision>
  169. <version>0.7</version>
  170. <date>2007-03-23</date>
  171. <initials>psa</initials>
  172. <remark><p>Updated to track ICE-14 and ICE-TCP-03; moved text on discovery of STUN servers to separate specification.</p></remark>
  173. </revision>
  174. <revision>
  175. <version>0.6</version>
  176. <date>2006-12-21</date>
  177. <initials>psa</initials>
  178. <remark><p>Modified spec to use provisional namespace before advancement to Draft (per XEP-0053).</p></remark>
  179. </revision>
  180. <revision>
  181. <version>0.5</version>
  182. <date>2006-10-31</date>
  183. <initials>psa</initials>
  184. <remark><p>Updated to track ICE-12; corrected service discovery process; completed editorial review; removed mention of DTMF, which is for audio only.</p></remark>
  185. </revision>
  186. <revision>
  187. <version>0.4</version>
  188. <date>2006-09-13</date>
  189. <initials>psa</initials>
  190. <remark><p>Updated to track ICE-10; added section on service discovery.</p></remark>
  191. </revision>
  192. <revision>
  193. <version>0.3</version>
  194. <date>2006-07-12</date>
  195. <initials>se/psa</initials>
  196. <remark><p>Specified that DTMF must use in-band signalling (XEP-0181).</p></remark>
  197. </revision>
  198. <revision>
  199. <version>0.2</version>
  200. <date>2006-03-24</date>
  201. <initials>psa</initials>
  202. <remark><p>Recommended use of RTP-native methods for DTMF.</p></remark>
  203. </revision>
  204. <revision>
  205. <version>0.1</version>
  206. <date>2006-03-01</date>
  207. <initials>psa/jb</initials>
  208. <remark><p>Initial version (split from XEP-0166).</p></remark>
  209. </revision>
  210. </header>
  211. <section1 topic='Introduction' anchor='intro'>
  212. <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>
  213. <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>
  214. <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>
  215. <p>The process for ICE negotiation is largely the same in Jingle as it is in ICE. There are several differences:</p>
  216. <ul>
  217. <li>Instead of using the Session Initiation Protocol (SIP) as the signalling channel, Jingle uses XMPP as the signalling channel.</li>
  218. <li>Syntax from the Session Description Protocol (see &rfc4566;) is mapped to an XML syntax suitable for sending over the XMPP signalling channel.</li>
  219. <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>
  220. <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>
  221. </ul>
  222. </section1>
  223. <section1 topic='Glossary' anchor='terms'>
  224. <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>
  225. </section1>
  226. <section1 topic='Requirements' anchor='reqs'>
  227. <p>The Jingle transport method defined herein is designed to meet the following requirements:</p>
  228. <ol>
  229. <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>
  230. <li>Enable use of UDP as the transport protocol.</li>
  231. <li>Make it relatively easy to implement support in standard Jabber/XMPP clients.</li>
  232. <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>
  233. </ol>
  234. </section1>
  235. <section1 topic='Jingle Conformance' anchor='conformance'>
  236. <p>In accordance with Section 10 of <cite>XEP-0166</cite>, this document specifies the following information related to the Jingle ice-udp transport method:</p>
  237. <ol>
  238. <li><p>The transport negotiation process is defined in the <link url='#protocol'>Protocol Description</link> section of this document.</p></li>
  239. <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>
  240. <li><p>Successful negotiation of the ice-udp method results in use of a datagram transport that is suitable for applications where some packet loss is tolerable, such as audio and video.</p></li>
  241. <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>
  242. </ol>
  243. </section1>
  244. <section1 topic='Protocol Description' anchor='protocol'>
  245. <section2 topic='Overall Flow' anchor='protocol-flow'>
  246. <p>The overall protocol flow for negotiation of the Jingle ICE-UDP Transport Method is as follows (note: many of these events happen simultaneously, not in sequence).</p>
  247. <code><![CDATA[
  249. | |
  250. | Jingle session-initiate stanza |
  251. | (with zero or more candidates) |
  252. |------------------------------------->|
  253. | Jingle ack (XMPP IQ-result) |
  254. |<-------------------------------------|
  255. | Jingle session-accept stanza |
  256. | (with one or more candidates) |
  257. |<-------------------------------------|
  258. | Jingle ack (XMPP IQ-result) |
  259. |------------------------------------->|
  260. | multiple STUN Binding Requests |
  261. |<====================================>|
  262. | multiple STUN Binding Results |
  263. |<====================================>|
  264. |<=========MEDIA NOW FLOWS============>|
  265. | optional Jingle transport-info |
  266. | stanzas (one candidate per stanaza) |
  267. |<------------------------------------>|
  268. | |
  269. ]]></code>
  270. <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>
  271. </section2>
  272. <section2 topic='Session Initiation' anchor='protocol-initiate'>
  273. <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>
  274. <example caption="Initiation"><![CDATA[
  275. <iq from='romeo@montague.lit/orchard'
  276. id='ixt174g9'
  277. to='juliet@capulet.lit/balcony'
  278. type='set'>
  279. <jingle xmlns='urn:xmpp:jingle:1'
  280. action='session-initiate'
  281. initiator='romeo@montague.lit/orchard'
  282. sid='a73sjjvkla37jfea'>
  283. <content creator='initiator' name='this-is-the-audio-content'>
  284. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  285. <payload-type id='96' name='speex' clockrate='16000'/>
  286. <payload-type id='97' name='speex' clockrate='8000'/>
  287. <payload-type id='18' name='G729'/>
  288. <payload-type id='0' name='PCMU' />
  289. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  290. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  291. </description>
  292. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  293. pwd='asd88fgpdd777uzjYhagZg'
  294. ufrag='8hhy'>
  295. <candidate component='1'
  296. foundation='1'
  297. generation='0'
  298. id='el0747fg11'
  299. ip=''
  300. network='1'
  301. port='8998'
  302. priority='2130706431'
  303. protocol='udp'
  304. type='host'/>
  305. <candidate component='1'
  306. foundation='2'
  307. generation='0'
  308. id='y3s2b30v3r'
  309. ip=''
  310. network='1'
  311. port='45664'
  312. priority='1694498815'
  313. protocol='udp'
  314. rel-addr=''
  315. rel-port='8998'
  316. type='srflx'/>
  317. </transport>
  318. </content>
  319. </jingle>
  320. </iq>
  321. ]]></example>
  322. </section2>
  323. <section2 topic='Syntax' anchor='protocol-syntax'>
  324. <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>
  325. <table caption='Transport Attributes'>
  326. <tr>
  327. <th>Name</th>
  328. <th>Description</th>
  329. <th>SDP Syntax</th>
  330. <th>Example</th>
  331. </tr>
  332. <tr>
  333. <td>pwd</td>
  334. <td>A Password as defined in &icecore;.</td>
  335. <td>a=ice-pwd line</td>
  336. <td>asd88fgpdd777uzjYhagZg</td>
  337. </tr>
  338. <tr>
  339. <td>ufrag</td>
  340. <td>A User Fragment as defined in &icecore;.</td>
  341. <td>a=ice-ufrag line</td>
  342. <td>8hhy</td>
  343. </tr>
  344. </table>
  345. <p>The attributes of the &lt;candidate/&gt; element are as follows.</p>
  346. <table caption='Candidate Attributes'>
  347. <tr>
  348. <th>Name</th>
  349. <th>Description</th>
  350. <th>SDP Syntax</th>
  351. <th>Example</th>
  352. </tr>
  353. <tr>
  354. <td>component</td>
  355. <td>A Component ID as defined in &icecore;.</td>
  356. <td>Component ID value in a=candidate line</td>
  357. <td>1</td>
  358. </tr>
  359. <tr>
  360. <td>foundation</td>
  361. <td>A Foundation as defined in &icecore;.</td>
  362. <td>Foundation value in a=candidate line</td>
  363. <td>1</td>
  364. </tr>
  365. <tr>
  366. <td>generation</td>
  367. <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>
  368. <td>extended name/value pair in a=candidate line</td>
  369. <td>0</td>
  370. </tr>
  371. <tr>
  372. <td>id</td>
  373. <td>A unique identifier for the candidate.</td>
  374. <td>N/A</td>
  375. <td>el0747fg11</td>
  376. </tr>
  377. <tr>
  378. <td>ip</td>
  379. <td>The Internet Protocol (IP) address for the candidate transport mechanism; this can be either an IPv4 address or an IPv6 address.</td>
  380. <td>IP Address value in a=candidate line</td>
  381. <td></td>
  382. </tr>
  383. <tr>
  384. <td>network</td>
  385. <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>
  386. <td>N/A</td>
  387. <td>0</td>
  388. </tr>
  389. <tr>
  390. <td>port</td>
  391. <td>The port at the candidate IP address.</td>
  392. <td>Port value in a=candidate line</td>
  393. <td>45664</td>
  394. </tr>
  395. <tr>
  396. <td>priority</td>
  397. <td>A Priority as defined in &icecore;.
  398. <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>
  399. </td>
  400. <td>Priority value in a=candidate line</td>
  401. <td>2130706431</td>
  402. </tr>
  403. <tr>
  404. <td>protocol</td>
  405. <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>
  406. <td>Transport protocol field in a=candidate line</td>
  407. <td>udp</td>
  408. </tr>
  409. <tr>
  410. <td>rel-addr</td>
  411. <td>A related address as defined in &icecore;.</td>
  412. <td>raddr value in a=candidate line</td>
  413. <td></td>
  414. </tr>
  415. <tr>
  416. <td>rel-port</td>
  417. <td>A related port as defined in &icecore;.</td>
  418. <td>rport value in a=candidate line</td>
  419. <td>8998</td>
  420. </tr>
  421. <tr>
  422. <td>type</td>
  423. <td>A Candidate Type as defined in &icecore;. The allowable values are "host" for host candidates, "prflx" for peer reflexive candidates, "relay" for relayed candidates, and "srflx" for server reflexive candidates.</td>
  424. <td>Typ field in a=candidate line</td>
  425. <td>srflx</td>
  426. </tr>
  427. </table>
  428. </section2>
  429. <section2 topic='Response' anchor='protocol-response'>
  430. <p>As described in <cite>XEP-0166</cite>, to acknowledge receipt of the session initiation request, the responder immediately returns an IQ-result.</p>
  431. <example caption="Responder acknowledges receipt of session-initiate request"><![CDATA[
  432. <iq from='juliet@capulet.lit/balcony'
  433. id='ixt174g9'
  434. to='romeo@montague.lit/orchard'
  435. type='result'/>
  436. ]]></example>
  437. <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>
  438. <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>
  439. <example caption="Responder accepts the session request"><![CDATA[
  440. <iq from='juliet@capulet.lit/balcony'
  441. id='rw782g55'
  442. to='romeo@montague.lit/orchard'
  443. type='set'>
  444. <jingle xmlns='urn:xmpp:jingle:1'
  445. action='session-accept'
  446. initiator='romeo@montague.lit/orchard'
  447. responder='juliet@capulet.lit/balcony'
  448. sid='a73sjjvkla37jfea'>
  449. <content creator='initiator' name='this-is-the-audio-content'>
  450. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  451. <payload-type id='97' name='speex' clockrate='8000'/>
  452. <payload-type id='18' name='G729'/>
  453. </description>
  454. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  455. pwd='YH75Fviy6338Vbrhrlp8Yh'
  456. ufrag='9uB6'>
  457. <candidate component='1'
  458. foundation='1'
  459. generation='0'
  460. id='or2ii2syr1'
  461. ip=''
  462. network='0'
  463. port='3478'
  464. priority='2130706431'
  465. protocol='udp'
  466. type='host'/>
  467. </transport>
  468. </content>
  469. </jingle>
  470. </iq>
  471. ]]></example>
  472. </section2>
  473. <section2 topic='Candidate Negotiation' anchor='protocol-candidates'>
  474. <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>
  475. <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>
  476. <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>
  477. <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>
  478. <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>
  479. <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>
  480. </section2>
  481. <section2 topic='Connectivity Checks' anchor='protocol-checks'>
  482. <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>
  483. <ol>
  484. <li>Each party sends a STUN Binding Request (see &rfc5389;) from each local candidate it generated to each remote candidate it received.</li>
  485. <li>In accordance with &icecore;, the STUN Binding Requests MUST include the PRIORITY attribute (computed according to Section of &icecore;).</li>
  486. <li>For the purposes of the Jingle ICE-UDP 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>
  487. <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>
  488. <li>The STUN Binding Requests generated by the initiator MUST include the ICE-CONTROLLING attribute.</li>
  489. <li>The STUN Binding Requests generated by the responder MUST include the ICE-CONTROLLED attribute.</li>
  490. <li>The parties MUST use STUN short term credentials to authenticate requests and perform message integrity checks. As in &icecore;, 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>
  491. </ol>
  492. <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 &icecore;, a connectivity check succeeds if <em>all</em> of the following are true:</p>
  493. <ol>
  494. <li>The STUN transaction generated a success response.</li>
  495. <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>
  496. <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>
  497. </ol>
  498. <p>For the candidates exchanged in the previous section, the connectivity checks would be as follows (this diagram mirrors the example in &icecore;).</p>
  499. <code><![CDATA[
  501. | | |
  502. | | STUN Binding Request |
  503. | | from |
  504. | | to |
  505. | | (dropped) |
  506. | | x====================|
  507. | STUN Binding Request | |
  508. | from | |
  509. | to | |
  510. | USE-CANDIDATE | |
  511. |======================>| |
  512. | | STUN Binding Request |
  513. | | from |
  514. | | to |
  515. | | USE-CANDIDATE |
  516. | |======================>|
  517. | | STUN Binding Response |
  518. | | from |
  519. | | to |
  520. | |<======================|
  521. | STUN Binding Response | |
  522. | from | |
  523. | to | |
  524. | map | |
  525. |<======================| |
  526. | | |
  527. |<==Media Now Can Flow==| |
  528. | | |
  529. | | STUN Binding Request |
  530. | | from |
  531. | | to |
  532. | |<======================|
  533. | STUN Binding Request | |
  534. | from | |
  535. | to | |
  536. |<======================| |
  537. | STUN Binding Response | |
  538. | from | |
  539. | to | |
  540. | map | |
  541. |======================>| |
  542. | | STUN Binding Response |
  543. | | from |
  544. | | to |
  545. | | map |
  546. | |======================>|
  547. | | |
  548. | |==Media Now Can Flow==>|
  549. | | |
  550. ]]></code>
  551. <p>Note: Here the initiator (controlling agent) is using "aggressive nomination" as described in Section of &icecore; and therefore includes the USE-CANDIDATE attribute in the STUN Binding Requests it sends.</p>
  552. </section2>
  553. <section2 topic='Acceptance of Successful Candidate' anchor='protocol-acceptance'>
  554. <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>
  555. <p>Once the parties have connectivity and therefore the initiator has completed ICE as explained in &icecore;, 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 &icecore;, 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-UDP negotiation).</p>
  556. <example caption="Initiator communicates in-use candidate"><![CDATA[
  557. <iq from='romeo@montague.lit/orchard'
  558. id='pd81b49s'
  559. to='juliet@capulet.lit/balcony'
  560. type='set'>
  561. <jingle xmlns='urn:xmpp:jingle:1'
  562. action='transport-info'
  563. initiator='romeo@montague.lit/orchard'
  564. sid='a73sjjvkla37jfea'>
  565. <content creator='initiator' name='this-is-the-audio-content'>
  566. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  567. pwd='asd88fgpdd777uzjYhagZg'
  568. ufrag='8hhy'>
  569. <remote-candidate component='1'
  570. ip=''
  571. port='9001'/>
  572. </transport>
  573. </content>
  574. </jingle>
  575. </iq>
  576. ]]></example>
  577. <p>(In accordance with Jingle core, the responder will also acknowledge the transport-info message.)</p>
  578. <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>
  579. </section2>
  580. <section2 topic='Negotiating a New Candidate' anchor='protocol-renegotiate'>
  581. <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>
  582. <example caption="Initiator sends a subsequent candidate"><![CDATA[
  583. <iq from='romeo@montague.lit/orchard'
  584. id='uh3g1f48'
  585. to='juliet@capulet.lit/balcony'
  586. type='set'>
  587. <jingle xmlns='urn:xmpp:jingle:1'
  588. action='transport-info'
  589. initiator='romeo@montague.lit/orchard'
  590. sid='a73sjjvkla37jfea'>
  591. <content creator='initiator' name='this-is-the-audio-content'>
  592. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  593. pwd='asd88fgpdd777uzjYhagZg'
  594. ufrag='8hhy'>
  595. <candidate component='1'
  596. foundation='1'
  597. generation='0'
  598. id='m3110wc4nd'
  599. ip='2001:db8::9:1'
  600. network='0'
  601. port='9001'
  602. priority='21149780477'
  603. protocol='udp'
  604. type='host'/>
  605. </transport>
  606. </content>
  607. </jingle>
  608. </iq>
  609. ]]></example>
  610. <p>The receiving party MUST acknowledge receipt of the candidate.</p>
  611. <example caption="Recipient acknowledges receipt"><![CDATA[
  612. <iq from='juliet@capulet.lit/balcony'
  613. id='uh3g1f48'
  614. to='romeo@montague.lit/orchard'
  615. type='result'/>
  616. ]]></example>
  617. <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>
  618. </section2>
  619. <section2 topic='ICE Restarts' anchor='protocol-restarts'>
  620. <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 &icecore;. As explained in &icecore;, 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>
  621. <example caption="Initiator restarts ICE negotiation"><![CDATA[
  622. <iq from='romeo@montague.lit/orchard'
  623. id='kl23fs71'
  624. to='juliet@capulet.lit/balcony'
  625. type='set'>
  626. <jingle xmlns='urn:xmpp:jingle:1'
  627. action='transport-info'
  628. initiator='romeo@montague.lit/orchard'
  629. sid='a73sjjvkla37jfea'>
  630. <content creator='initiator' name='this-is-the-audio-content'>
  631. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  632. pwd='bv71hdn38hgb39hf6xlk33'
  633. ufrag='g7qs'>
  634. <candidate component='1'
  635. foundation='1'
  636. generation='1'
  637. id='y3s2b30v3r'
  638. ip=''
  639. network='1'
  640. port='45665'
  641. priority='1694498815'
  642. protocol='udp'
  643. type='srflx'/>
  644. </transport>
  645. </content>
  646. </jingle>
  647. </iq>
  648. ]]></example>
  649. <p>The recipient then acknowledges receipt.</p>
  650. <example caption="Recipient acknowledges transport-info"><![CDATA[
  651. <iq from='juliet@capulet.lit/balcony'
  652. id='kl23fs71'
  653. to='romeo@montague.lit/orchard'
  654. type='result'/>
  655. ]]></example>
  656. <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>
  657. </section2>
  658. </section1>
  659. <section1 topic='Fallback to Raw UDP' anchor='fallback'>
  660. <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>
  661. <ol>
  662. <li>The Jingle endpoint sends a session-initiate request to the SIP endpoint, specifying a transport method of ICE-UDP.</li>
  663. <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:
  664. <ul>
  665. <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>
  666. <li>Sending SIP INVITE to the SIP endpoint on behalf of the Jingle endpoint, speciying an IP address and port at the gateway.</li>
  667. </ul>
  668. </li>
  669. </ol>
  670. <p>The session flow is as follows.</p>
  671. <code><![CDATA[
  672. Romeo Gateway Juliet
  673. | | |
  674. | session-initiate | |
  675. | (audio definition) | |
  676. |------------------------>| |
  677. | ack | |
  678. |<------------------------| |
  679. | transport-replace | |
  680. | (Raw UDP) | |
  681. |<------------------------| |
  682. | ack | |
  683. |------------------------>| |
  684. | transport-accept | |
  685. |------------------------>| |
  686. | ack | |
  687. |<------------------------| SIP INVITE |
  688. | |------------------------>|
  689. | | 200 OK |
  690. | |<------------------------|
  691. | session-accept | |
  692. |<------------------------| |
  693. | ack | |
  694. |------------------------>| |
  695. | MEDIA SESSION |
  696. |<=================================================>|
  697. | | SIP BYE |
  698. | |<------------------------|
  699. | session-terminate | |
  700. |<------------------------| |
  701. | ack | |
  702. |------------------------>| ack |
  703. | |------------------------>|
  704. | | |
  705. ]]></code>
  706. <p>The protocol flow is as follows, showing only the stanzas sent between Romeo and the gateway (acting on Juliet's behalf).</p>
  707. <example caption="Initiator sends session-initiate"><![CDATA[
  708. <iq from='romeo@montague.lit/orchard'
  709. id='p01hf63x'
  710. to='juliet@capulet.lit/balcony'
  711. type='set'>
  712. <jingle xmlns='urn:xmpp:jingle:1'
  713. action='session-initiate'
  714. initiator='romeo@montague.lit/orchard'
  715. sid='a73sjjvkla37jfea'>
  716. <content creator='initiator' name='voice'>
  717. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  718. <payload-type id='96' name='speex' clockrate='16000'/>
  719. <payload-type id='97' name='speex' clockrate='8000'/>
  720. <payload-type id='18' name='G729'/>
  721. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  722. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  723. </description>
  724. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  725. pwd='asd88fgpdd777uzjYhagZg'
  726. ufrag='8hhy'>
  727. <candidate component='1'
  728. foundation='1'
  729. generation='0'
  730. id='el0747fg11'
  731. ip=''
  732. network='1'
  733. port='8998'
  734. priority='2130706431'
  735. protocol='udp'
  736. type='host'/>
  737. <candidate component='1'
  738. foundation='2'
  739. generation='0'
  740. id='y3s2b30v3r'
  741. ip=''
  742. network='1'
  743. port='45664'
  744. priority='1694498815'
  745. protocol='udp'
  746. rel-addr=''
  747. rel-port='8998'
  748. type='srflx'/>
  749. </transport>
  750. </content>
  751. </jingle>
  752. </iq>
  753. ]]></example>
  754. <example caption="Responder acknowledges session-initiate"><![CDATA[
  755. <iq from='juliet@capulet.lit/balcony'
  756. id='p01hf63x'
  757. to='romeo@montague.lit/orchard'
  758. type='result'/>
  759. ]]></example>
  760. <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>
  761. <example caption="Gateway sends transport-replace on behalf of responder"><![CDATA[
  762. <iq from='juliet@capulet.lit/balcony'
  763. id='hy2gd714'
  764. to='romeo@montague.lit/orchard'
  765. type='set'>
  766. <jingle xmlns='urn:xmpp:jingle:1'
  767. action='transport-replace'
  768. initiator='romeo@montague.lit/orchard'
  769. sid='a73sjjvkla37jfea'>
  770. <content creator='initiator' name='voice1'>
  771. <transport xmlns='urn:xmpp:jingle:transports:raw-udp:1'>
  772. <candidate generation='0'
  773. id='a9j3mnbtu1'
  774. ip=''
  775. port='13540'/>
  776. </transport>
  777. </content>
  778. </jingle>
  779. </iq>
  780. ]]></example>
  781. <p>Romeo then acknowledges the transport-replace message and immediately also sends a transport-accept.</p>
  782. <example caption="Initiator acknowledges transport-replace"><![CDATA[
  783. <iq from='romeo@montague.lit/orchard'
  784. id='hy2gd714'
  785. to='juliet@capulet.lit/balcony'
  786. type='result'/>
  787. ]]></example>
  788. <example caption="Initiator accepts new transport"><![CDATA[
  789. <iq from='romeo@montague.lit/orchard'
  790. id='rb391gs5'
  791. to='juliet@capulet.lit/balcony'
  792. type='set'>
  793. <jingle xmlns='urn:xmpp:jingle:1'
  794. action='transport-accept'
  795. initiator='romeo@montague.lit/orchard'
  796. sid='a73sjjvkla37jfea'>
  797. <content creator='responder' name='voice2'>
  798. <transport xmlns='urn:xmpp:jingle:transports:raw-udp:1'>
  799. <candidate generation='0'
  800. id='a9j3mnbtu1'
  801. ip=''
  802. port='13540'/>
  803. </transport>
  804. </content>
  805. </jingle>
  806. </iq>
  807. ]]></example>
  808. <p>The gateway then acknowledges the acceptance on behalf of Juliet.</p>
  809. <example caption="Gateway acknowledges transport-accept"><![CDATA[
  810. <iq from='juliet@capulet.lit/balcony'
  811. id='rb391gs5'
  812. to='romeo@montague.lit/orchard'
  813. type='result'/>
  814. ]]></example>
  815. <p>The responder then sends a session-accept through the gateway.</p>
  816. <example caption="Responder sends session-accept"><![CDATA[
  817. <iq from='juliet@capulet.lit/balcony'
  818. id='ijf61d43'
  819. to='romeo@montague.lit/orchard'
  820. type='set'>
  821. <jingle xmlns='urn:xmpp:jingle:1'
  822. action='session-accept'
  823. initiator='romeo@montague.lit/orchard'
  824. responder='juliet@capulet.lit/balcony'
  825. sid='a73sjjvkla37jfea'>
  826. <content creator='initiator' name='voice'>
  827. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  828. <payload-type id='18' name='G729'/>
  829. </description>
  830. <transport xmlns='urn:xmpp:jingle:transports:raw-udp:1'/>
  831. </content>
  832. </jingle>
  833. </iq>
  834. ]]></example>
  835. <example caption="Initiator acknowledges session-accept"><![CDATA[
  836. <iq from='romeo@montague.lit/orchard'
  837. id='ijf61d43'
  838. to='juliet@capulet.lit/balcony'
  839. type='result'/>
  840. ]]></example>
  841. <p>The endpoints now begin to exchange session media, and can continue the session as long as desired.</p>
  842. </section1>
  843. <section1 topic='Determining Support' anchor='support'>
  844. <section2 topic='ICE Support' anchor='support-ice'>
  845. <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>
  846. <example caption="Service discovery information request"><![CDATA[
  847. <iq from='romeo@montague.lit/orchard'
  848. id='cv5x41g9'
  849. to='juliet@capulet.lit/balcony'
  850. type='get'>
  851. <query xmlns=''/>
  852. </iq>
  853. ]]></example>
  854. <example caption="Service discovery information response"><![CDATA[
  855. <iq from='juliet@capulet.lit/balcony'
  856. id='cv5x41g9'
  857. to='romeo@montague.lit/orchard'
  858. type='result'>
  859. <query xmlns=''>
  860. <feature var='urn:xmpp:jingle:1'/>
  861. <feature var='urn:xmpp:jingle:transports:ice-udp:0'/>
  862. <feature var='urn:xmpp:jingle:transports:ice-udp:1'/>
  863. <feature var='urn:xmpp:jingle:apps:rtp:1'/>
  864. <feature var='urn:xmpp:jingle:apps:rtp:audio'/>
  865. <feature var='urn:xmpp:jingle:apps:rtp:video'/>
  866. </query>
  867. </iq>
  868. ]]></example>
  869. <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>
  870. </section2>
  871. <section2 topic='SDP Offer / Answer Support' anchor='support-sdp'>
  872. <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>
  873. <example caption="Service discovery information request"><![CDATA[
  874. <iq from='romeo@montague.lit/orchard'
  875. id='ce81f5d6'
  876. to='sip.shakespeare.lit'
  877. type='get'>
  878. <query xmlns=''/>
  879. </iq>
  880. ]]></example>
  881. <example caption="Service discovery information response"><![CDATA[
  882. <iq from='sip.shakespeare.lit'
  883. id='ce81f5d6'
  884. to='romeo@montague.lit/orchard'
  885. type='result'>
  886. <query xmlns=''>
  887. <feature var='urn:ietf:rfc:3264'/>
  888. <feature var='urn:xmpp:jingle:1'/>
  889. <feature var='urn:xmpp:jingle:transports:ice-udp:0'/>
  890. <feature var='urn:xmpp:jingle:transports:ice-udp:1'/>
  891. <feature var='urn:xmpp:jingle:apps:rtp:1'/>
  892. <feature var='urn:xmpp:jingle:apps:rtp:audio'/>
  893. <feature var='urn:xmpp:jingle:apps:rtp:video'/>
  894. </query>
  895. </iq>
  896. ]]></example>
  897. </section2>
  898. </section1>
  899. <section1 topic='Implementation Notes' anchor='impl'>
  900. <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>
  901. </section1>
  902. <section1 topic='Deployment Notes' anchor='deploy'>
  903. <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>
  904. </section1>
  905. <section1 topic='Security Considerations' anchor='security'>
  906. <section2 topic='Sharing IP Addresses' anchor='security-sharing'>
  907. <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>
  908. <ol>
  909. <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>
  910. <li>The user has temporarily and dynamically shared presence with the contact via "directed presence" as described in <cite>RFC 3921</cite>.</li>
  911. <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>
  912. </ol>
  913. </section2>
  914. <section2 topic='Encryption of Media' anchor='security-media'>
  915. <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>
  916. <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>
  917. </section2>
  918. </section1>
  919. <section1 topic='IANA Considerations' anchor='iana'>
  920. <p>This document requires no interaction with &IANA;.</p>
  921. </section1>
  922. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  923. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  924. <p>This specification defines the following XML namespace:</p>
  925. <ul>
  926. <li>urn:xmpp:jingle:transports:ice-udp:1</li>
  927. </ul>
  928. <p>The &REGISTRAR; includes the foregoing namespace in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
  929. </section2>
  930. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  931. &NSVER;
  932. </section2>
  933. <section2 topic='Service Discovery Features' anchor='registrar-features'>
  934. <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>
  935. <p>The registry submission is as follows.</p>
  936. <code caption='Registry Submission'><![CDATA[
  937. <var>
  938. <name>urn:ietf:rfc:3264</name>
  939. <desc>
  940. Signals support for the SDP offer / answer model
  941. described in RFC 3264
  942. </desc>
  943. <doc>XEP-0176</doc>
  944. </var>
  945. ]]></code>
  946. </section2>
  947. <section2 topic='Jingle Transport Methods' anchor='registrar-transports'>
  948. <p>The XMPP Registrar includes "ice-udp" in its registry of Jingle transport methods at &JINGLETRANSPORTS;. The registry submission is as follows:</p>
  949. <code><![CDATA[
  950. <transport>
  951. <name>ice-udp</name>
  952. <desc>
  953. A method for negotiation of out-of-band UDP connections
  954. with built-in NAT and firewall traversal, equivalent to
  955. the IETF's Interactive Connectivity Establishment (ICE)
  956. methodology when resulting in the use of UDP as the
  957. transport protocol.
  958. </desc>
  959. <type>datagram</type>
  960. <doc>XEP-0176</doc>
  961. </transport>
  962. ]]></code>
  963. </section2>
  964. </section1>
  965. <section1 topic='XML Schema' anchor='schema'>
  966. <code><![CDATA[
  967. <?xml version='1.0' encoding='UTF-8'?>
  968. <xs:schema
  969. xmlns:xs=''
  970. targetNamespace='urn:xmpp:jingle:transports:ice-udp:1'
  971. xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  972. elementFormDefault='qualified'>
  973. <xs:annotation>
  974. <xs:documentation>
  975. The protocol documented by this schema is defined in
  976. XEP-0176:
  977. </xs:documentation>
  978. </xs:annotation>
  979. <xs:element name='transport'>
  980. <xs:complexType>
  981. <xs:choice minOccurs='0'>
  982. <xs:sequence>
  983. <xs:element name='candidate'
  984. type='candidateElementType'
  985. minOccurs='1'
  986. maxOccurs='unbounded'/>
  987. </xs:sequence>
  988. <xs:sequence>
  989. <xs:element name='remote-candidate'
  990. type='remoteCandidateElementType'
  991. minOccurs='1'
  992. maxOccurs='1'/>
  993. </xs:sequence>
  994. </xs:choice>
  995. <xs:attribute name='pwd' type='xs:string' use='optional'/>
  996. <xs:attribute name='ufrag' type='xs:string' use='optional'/>
  997. </xs:complexType>
  998. </xs:element>
  999. <xs:complexType name='candidateElementType'>
  1000. <xs:simpleContent>
  1001. <xs:extension base='empty'>
  1002. <xs:attribute name='component' type='xs:unsignedByte' use='required'/>
  1003. <xs:attribute name='foundation' type='xs:unsignedByte' use='required'/>
  1004. <xs:attribute name='generation' type='xs:unsignedByte' use='required'/>
  1005. <xs:attribute name='id' type='xs:NCName' use='required'/>
  1006. <xs:attribute name='ip' type='xs:string' use='required'/>
  1007. <xs:attribute name='network' type='xs:unsignedByte' use='required'/>
  1008. <xs:attribute name='port' type='xs:unsignedShort' use='required'/>
  1009. <xs:attribute name='priority' type='xs:positiveInteger' use='required'/>
  1010. <xs:attribute name='protocol' type='xs:NCName' use='required'/>
  1011. <xs:attribute name='rel-addr' type='xs:string' use='optional'/>
  1012. <xs:attribute name='rel-port' type='xs:unsignedShort' use='optional'/>
  1013. <xs:attribute name='type' use='required'>
  1014. <xs:simpleType>
  1015. <xs:restriction base='xs:NCName'>
  1016. <xs:enumeration value='host'/>
  1017. <xs:enumeration value='prflx'/>
  1018. <xs:enumeration value='relay'/>
  1019. <xs:enumeration value='srflx'/>
  1020. </xs:restriction>
  1021. </xs:simpleType>
  1022. </xs:attribute>
  1023. </xs:extension>
  1024. </xs:simpleContent>
  1025. </xs:complexType>
  1026. <xs:complexType name='remoteCandidateElementType'>
  1027. <xs:simpleContent>
  1028. <xs:extension base='empty'>
  1029. <xs:attribute name='component' type='xs:unsignedByte' use='required'/>
  1030. <xs:attribute name='ip' type='xs:string' use='required'/>
  1031. <xs:attribute name='port' type='xs:unsignedShort' use='required'/>
  1032. </xs:extension>
  1033. </xs:simpleContent>
  1034. </xs:complexType>
  1035. <xs:simpleType name='empty'>
  1036. <xs:restriction base='xs:string'>
  1037. <xs:enumeration value=''/>
  1038. </xs:restriction>
  1039. </xs:simpleType>
  1040. </xs:schema>
  1041. ]]></code>
  1042. </section1>
  1043. <section1 topic='Acknowledgements' anchor='ack'>
  1044. <p>Thanks to Diana Cionoiu, Olivier Cr&#234;te, Tim Julien, Steffen Larsen, Robert McQueen, Mike Ruprecht, Justin Uberti, Unnikrishnan Vikrama Panicker, and Paul Witty for their feedback.</p>
  1045. </section1>
  1046. </xep>