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-0166.xml 105KB

  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</title>
  10. <abstract>This specification defines an XMPP protocol extension for initiating and managing peer-to-peer media sessions between two XMPP entities in a way that is interoperable with existing Internet standards. The protocol provides a pluggable model that enables the core session management semantics (compatible with SIP) to be used for a wide variety of application types (e.g., voice chat, video chat, file transfer) and with a wide variety of transport methods (e.g., TCP, UDP, ICE, application-specific transports).</abstract>
  12. <number>0166</number>
  13. <status>Draft</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes><spec>XEP-0095</spec></supersedes>
  21. <supersededby/>
  22. <shortname>jingle</shortname>
  23. <schemaloc>
  24. <ns>jingle</ns>
  25. <url></url>
  26. </schemaloc>
  27. <schemaloc>
  28. <ns>jingle:errors</ns>
  29. <url></url>
  30. </schemaloc>
  31. <registry/>
  32. <discuss>jingle</discuss>
  33. &scottlu;
  34. &joebeda;
  35. &stpeter;
  36. &robmcqueen;
  37. &seanegan;
  38. &hildjj;
  39. <revision>
  40. <version>1.1.1</version>
  41. <date>2016-05-17</date>
  42. <initials>ssw</initials>
  43. <remark><p>Fix broken reference to draft-ietf-stox-media</p></remark>
  44. </revision>
  45. <revision>
  46. <version>1.1</version>
  47. <date>2009-12-23</date>
  48. <initials>psa/jjh</initials>
  49. <remark><p>Specified handling of duplicate name attributes on content element; clarified recommended usage of Jingle when exchanging multiple content-types; declared the principle that application types ought not to be mixed beyond necessity within a single session; clarified use of the reason element in cases other than termination.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>1.0</version>
  53. <date>2009-06-10</date>
  54. <initials>psa</initials>
  55. <remark><p>Per a vote of the XMPP Council, advanced specification from Experimental to Draft; also required inclusion of the creator attribute per list consensus.</p></remark>
  56. </revision>
  57. <revision>
  58. <version>0.38</version>
  59. <date>2009-05-27</date>
  60. <initials>psa</initials>
  61. <remark><p>Clarified and tightened handling of the initiator, responder, creator, and senders attributes.</p></remark>
  62. </revision>
  63. <revision>
  64. <version>0.37</version>
  65. <date>2009-04-20</date>
  66. <initials>psa</initials>
  67. <remark><p>Specified tie-breaking for session-initiate action; incremented errors namespace to match core namespace; clarified some ambiguities in the text, examples, and state machine.</p></remark>
  68. </revision>
  69. <revision>
  70. <version>0.36</version>
  71. <date>2009-03-11</date>
  72. <initials>psa</initials>
  73. <remark><p>Added none value for senders attribute.</p></remark>
  74. </revision>
  75. <revision>
  76. <version>0.35</version>
  77. <date>2009-03-06</date>
  78. <initials>psa</initials>
  79. <remark>
  80. <ul>
  81. <li>Added the concept of a security precondition to the Jingle framework, where preconditions are defined in separate specifications (just as application types and transport methods are).</li>
  82. <li>Defined a new Jingle action of security-info.</li>
  83. <li>Incremented the namespace to urn:xmpp:jingle:1 in order to reflect the addition of security preconditions and the security-info action.</li>
  84. <li>Clarified a number of points about the overall session flow and state machine.</li>
  85. <li>Added Jingle reasons for failed-application, failed-transport, and incompatible-parameters.</li>
  86. </ul>
  87. </remark>
  88. </revision>
  89. <revision>
  90. <version>0.34</version>
  91. <date>2009-02-17</date>
  92. <initials>psa</initials>
  93. <remark><p>Clarified the definitions and conformance requirements for datagram and streaming transports; tightened the security requirements regarding the initiator and responder attributes; updated examples to reflect changes to XEP-0176.</p></remark>
  94. </revision>
  95. <revision>
  96. <version>0.33</version>
  97. <date>2008-12-18</date>
  98. <initials>psa</initials>
  99. <remark>
  100. <ul>
  101. <li>Clarified handling of session timeouts.</li>
  102. <li>Added description-info action.</li>
  103. <li>Added cancel, expired, gone, security-error, and timeout reason conditions.</li>
  104. <li>Changed XMPP error condition for Jingle &lt;unknown-session/&gt; condition from &lt;bad-request/&gt; to &lt;item-not-found/&gt;.</li>
  105. <li>Changed XMPP error condition for Jingle tie breaks from &lt;unexpected-request/&gt; to &lt;conflict/&gt; and defined Jingle-specific condition of &lt;tie-break/&gt;.</li>
  106. <li>Corrected schema.</li>
  107. </ul>
  108. </remark>
  109. </revision>
  110. <revision>
  111. <version>0.32</version>
  112. <date>2008-10-07</date>
  113. <initials>psa</initials>
  114. <remark><p>Added content-reject action to mirror content-accept for replies to content-add; also added transport-reject action to mirror transport-accept for replies to transport-replace.</p></remark>
  115. </revision>
  116. <revision>
  117. <version>0.31</version>
  118. <date>2008-09-25</date>
  119. <initials>psa</initials>
  120. <remark><p>Added disposition attribute to content element for mapping to SIP Content-Disposition header.</p></remark>
  121. </revision>
  122. <revision>
  123. <version>0.30</version>
  124. <date>2008-09-23</date>
  125. <initials>ram/psa</initials>
  126. <remark>
  127. <ul>
  128. <li>Allowed content-add in PENDING state.</li>
  129. <li>Clarified that session-accept action accepts only the content definition(s) in the session-initiate.</li>
  130. <li>Added optional thread element.</li>
  131. <li>Clarified tie breaks for transport-replace.</li>
  132. <li>Modified namespaces to incorporate namespace versioning.</li>
  133. <li>Cleaned up XML schemas.</li>
  134. </ul>
  135. </remark>
  136. </revision>
  137. <revision>
  138. <version>0.29</version>
  139. <date>2008-07-31</date>
  140. <initials>psa/ram</initials>
  141. <remark>
  142. <ul>
  143. <li>Changed "reliable" vs. "lossy" to "streaming" vs. "datagram", since reliability or dependability is orthogonal to the streaming nature of the transport.</li>
  144. <li>Deleted the "content-remove" action.</li>
  145. <li>Added "transport-replace" action (answered by "transport-accept").</li>
  146. <li>Removed &lt;condition/&gt; element as container for Jingle condition elements inside &lt;reason/&gt;, since it introduced an unnecessary layer of indirection.</li>
  147. <li>Modified state machine to allow content removal during PENDING state.</li>
  148. <li>Noted that a session can have more than one content instance of the same type.</li>
  149. <li>Noted that the 'name' attribute is unique to a creator.</li>
  150. <li>Changed examples to once again use voice chat instead of file transfer.</li>
  151. </ul>
  152. </remark>
  153. </revision>
  154. <revision>
  155. <version>0.28</version>
  156. <date>2008-06-16</date>
  157. <initials>psa</initials>
  158. <remark><p>Modified state machine to allow content-replace during PENDING state for more seamless handling of fallback scenarios.</p></remark>
  159. </revision>
  160. <revision>
  161. <version>0.27</version>
  162. <date>2008-06-04</date>
  163. <initials>psa</initials>
  164. <remark><p>Updated examples to track changes to XEP-0167 and retraction of XEP-0180; corrected definition of name attribute to allow semantic meaning.</p></remark>
  165. </revision>
  166. <revision>
  167. <version>0.26</version>
  168. <date>2008-05-28</date>
  169. <initials>psa</initials>
  170. <remark><p>Corrected several errors in the state diagrams.</p></remark>
  171. </revision>
  172. <revision>
  173. <version>0.25</version>
  174. <date>2008-02-29</date>
  175. <initials>psa</initials>
  176. <remark><p>More clearly specified the content-replace action (essentially similar to content-add); specified that content-accept shall be sent in response to content-replace; removed content-modify and content-accept from PENDING state; adjusted text regarding initial session negotiation.</p></remark>
  177. </revision>
  178. <revision>
  179. <version>0.24</version>
  180. <date>2008-02-28</date>
  181. <initials>ram/psa</initials>
  182. <remark><p>Added content-replace action; modified reasoncode and reasontext to use elements instead of attributes; added sid element to handle alternative-session condition; modified examples to use file transfer instead of voice chat; moved profile element to XEP-0167 and XEP-0180.</p></remark>
  183. </revision>
  184. <revision>
  185. <version>0.23</version>
  186. <date>2008-01-11</date>
  187. <initials>psa</initials>
  188. <remark><p>Removed content-accept after content-remove; removed errors for unsupported-content and unsupported-transports since they are handled via session-terminate; clarified handling of responder attribute.</p></remark>
  189. </revision>
  190. <revision>
  191. <version>0.22</version>
  192. <date>2007-12-06</date>
  193. <initials>psa</initials>
  194. <remark><p>Modified session flows for busy, unsupported application formats, and unsupported transport methods to enable separation between Jingle core and distinct modules for applications and transports; moved resource determination recommendations to XEP-208.</p></remark>
  195. </revision>
  196. <revision>
  197. <version>0.21</version>
  198. <date>2007-11-27</date>
  199. <initials>psa</initials>
  200. <remark><p>Further editorial review.</p></remark>
  201. </revision>
  202. <revision>
  203. <version>0.20</version>
  204. <date>2007-11-15</date>
  205. <initials>psa</initials>
  206. <remark><p>Editorial review and consistency check; moved voice chat scenarios to XEP-0167.</p></remark>
  207. </revision>
  208. <revision>
  209. <version>0.19</version>
  210. <date>2007-11-13</date>
  211. <initials>psa</initials>
  212. <remark><p>Added scenario for handling of busy state, including Jingle-specific error code and modified error flow (no longer an instance of decline).</p></remark>
  213. </revision>
  214. <revision>
  215. <version>0.18</version>
  216. <date>2007-11-08</date>
  217. <initials>psa</initials>
  218. <remark><p>Added scenarios for various session flows; clarified handling of content-add, content-modify, and content-remove actions; clarified rules for codec priority.</p></remark>
  219. </revision>
  220. <revision>
  221. <version>0.17</version>
  222. <date>2007-06-20</date>
  223. <initials>psa</initials>
  224. <remark><p>Added &lt;unsupported-info/&gt; error.</p></remark>
  225. </revision>
  226. <revision>
  227. <version>0.16</version>
  228. <date>2007-06-06</date>
  229. <initials>psa</initials>
  230. <remark><p>Clarified resource determination process and updated text to reflect modifications to XEP-0168.</p></remark>
  231. </revision>
  232. <revision>
  233. <version>0.15</version>
  234. <date>2007-05-25</date>
  235. <initials>psa</initials>
  236. <remark><p>Rewrote introduction and moved historical text to separate section.</p></remark>
  237. </revision>
  238. <revision>
  239. <version>0.14</version>
  240. <date>2007-04-17</date>
  241. <initials>psa</initials>
  242. <remark><p>Clarified session lifetime; defined reason attribute and associated registry; further specified conformance requirements.</p></remark>
  243. </revision>
  244. <revision>
  245. <version>0.13</version>
  246. <date>2007-03-23</date>
  247. <initials>psa/ram</initials>
  248. <remark><p>Simplified signalling process and state chart; Removed session-redirect action (use redirect error instead); removed content-decline action; removed transport-* actions (except transport-info for ICE negotiation); removed description-* actions; simplified syntax to allow only one transport per content type; corrected syntax of creator attribute to be either initiator or responder (not JIDs); added profile attribute to content element in order to specify RTP profile in use.</p></remark>
  249. </revision>
  250. <revision>
  251. <version>0.12</version>
  252. <date>2006-12-21</date>
  253. <initials>psa/ram</initials>
  254. <remark><p>Added creator attribute to content element for prevention of race condition; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).</p></remark>
  255. </revision>
  256. <revision>
  257. <version>0.11</version>
  258. <date>2006-10-31</date>
  259. <initials>psa</initials>
  260. <remark><p>Completed clarifications and corrections throughout; added section on Jingle Actions.</p></remark>
  261. </revision>
  262. <revision>
  263. <version>0.10</version>
  264. <date>2006-09-29</date>
  265. <initials>ram/psa</initials>
  266. <remark><p>Made several corrections to the state machines and examples.</p></remark>
  267. </revision>
  268. <revision>
  269. <version>0.9</version>
  270. <date>2006-09-08</date>
  271. <initials>ram/psa</initials>
  272. <remark><p>Further cleaned up state machines and state-related actions.</p></remark>
  273. </revision>
  274. <revision>
  275. <version>0.8</version>
  276. <date>2006-08-23</date>
  277. <initials>ram/psa</initials>
  278. <remark><p>Changed channels to components in line with ICE; changed various action names for consistency; added session-extend and session-reduce actions to add and remove description/transport pairs; added description-modify action; added sender attribute to specify directionality.</p></remark>
  279. </revision>
  280. <revision>
  281. <version>0.7</version>
  282. <date>2006-07-17</date>
  283. <initials>psa</initials>
  284. <remark><p>Added implementation note about handling multiple content types.</p></remark>
  285. </revision>
  286. <revision>
  287. <version>0.6</version>
  288. <date>2006-07-12</date>
  289. <initials>se/psa</initials>
  290. <remark><p>Changed media type to content type.</p></remark>
  291. </revision>
  292. <revision>
  293. <version>0.5</version>
  294. <date>2006-03-20</date>
  295. <initials>psa/jb</initials>
  296. <remark><p>Further clarified state machine diagrams; specified that session accept must include agreed-upon media format and transport description; moved deployment notes to appropriate transport spec.</p></remark>
  297. </revision>
  298. <revision>
  299. <version>0.4</version>
  300. <date>2006-03-01</date>
  301. <initials>psa/jb</initials>
  302. <remark><p>Added glossary; clarified state machines; updated to reflect publication of XEP-0176 and XEP-0177.</p></remark>
  303. </revision>
  304. <revision>
  305. <version>0.3</version>
  306. <date>2006-02-24</date>
  307. <initials>psa/jb</initials>
  308. <remark><p>Provided more detail about modify scenarios; defined media-specific and transport-specific actions and adjusted state machine accordingly.</p></remark>
  309. </revision>
  310. <revision>
  311. <version>0.2</version>
  312. <date>2006-02-13</date>
  313. <initials>psa/jb</initials>
  314. <remark><p>Per agreement among the co-authors, moved transport definition to separate specification, simplified state machine, and made other associated changes to the text, examples, and schemas; also harmonized redirect, decline, and terminate processes.</p></remark>
  315. </revision>
  316. <revision>
  317. <version>0.1</version>
  318. <date>2005-12-15</date>
  319. <initials>psa</initials>
  320. <remark><p>Initial version.</p></remark>
  321. </revision>
  322. <revision>
  323. <version>0.0.10</version>
  324. <date>2005-12-11</date>
  325. <initials>psa</initials>
  326. <remark><p>More fully documented burst mode, connectivity checks, error cases, etc.</p></remark>
  327. </revision>
  328. <revision>
  329. <version>0.0.9</version>
  330. <date>2005-12-08</date>
  331. <initials>psa</initials>
  332. <remark><p>Restructured document flow; provided example of burst mode.</p></remark>
  333. </revision>
  334. <revision>
  335. <version>0.0.8</version>
  336. <date>2005-12-05</date>
  337. <initials>psa/sl/jb</initials>
  338. <remark><p>Distinguished between dribble mode and burst mode, including mode attribute, service discovery features, and implementation notes; provided detailed resource discovery examples; corrected state chart; specified session termination; specified error conditions; specified semantics of informational messages; began to define security considerations; added Joe Beda as co-author.</p></remark>
  339. </revision>
  340. <revision>
  341. <version>0.0.7</version>
  342. <date>2005-11-08</date>
  343. <initials>psa</initials>
  344. <remark><p>Added more detail to basic session flow; harmonized candidate negotiation process with ICE.</p></remark>
  345. </revision>
  346. <revision>
  347. <version>0.0.6</version>
  348. <date>2005-10-27</date>
  349. <initials>psa</initials>
  350. <remark><p>Added XMPP Registrar considerations; defined schema; completed slight syntax cleanup.</p></remark>
  351. </revision>
  352. <revision>
  353. <version>0.0.5</version>
  354. <date>2005-10-21</date>
  355. <initials>psa/sl</initials>
  356. <remark><p>Separated method description formats from signalling protocol.</p></remark>
  357. </revision>
  358. <revision>
  359. <version>0.0.4</version>
  360. <date>2005-10-19</date>
  361. <initials>psa/sl</initials>
  362. <remark><p>Harmonized basic session flow with Google Talk protocol; added Scott Ludwig as co-author.</p></remark>
  363. </revision>
  364. <revision>
  365. <version>0.0.3</version>
  366. <date>2005-10-10</date>
  367. <initials>psa</initials>
  368. <remark><p>Added more detail to basic session flow.</p></remark>
  369. </revision>
  370. <revision>
  371. <version>0.0.2</version>
  372. <date>2005-10-07</date>
  373. <initials>psa/jjh</initials>
  374. <remark><p>Protocol cleanup.</p></remark>
  375. </revision>
  376. <revision>
  377. <version>0.0.1</version>
  378. <date>2005-10-06</date>
  379. <initials>psa/jjh</initials>
  380. <remark><p>First draft.</p></remark>
  381. </revision>
  382. </header>
  383. <section1 topic='Introduction' anchor='intro'>
  384. <p>The purpose of Jingle is to enable one-to-one, peer-to-peer media sessions between XMPP entities, where the negotiation occurs over the XMPP signalling channel and the media is exchanged over a data channel that is usually a dedicated non-XMPP transport. Jingle is designed in a modular way:</p>
  385. <ul>
  386. <li><p>Developers can easily plug in support for a wide variety of application types, such as voice and video chat (see &xep0167;), file transfer (see &xep0234;), application sharing, collaborative editing, whiteboarding, and secure transmission of end-to-end XML streams (see &xep0247;).</p></li>
  387. <li><p>The transport methods are also pluggable, so that Jingle implementations can use any appropriate datagram transport such as User Datagram Protocol (UDP; &rfc0768;) as negotiated via &xep0177; or &xep0176;, or any appropriate streaming transport such as Transmission Control Protocol (TCP; &rfc0793;), &xep0065; as negotiated via &xep0260;, and &xep0047; as negotiated via &xep0261;.</p></li>
  388. <li><p>This modular approach also extends to the security preconditions that need to be met before application data can be exchanged over a given transport, such as negotiation of Transport Layer Security (TLS; &rfc5246;) for streaming transports and negotiation of Datagram Transport Layer Security (DTLS; &rfc4347;) for datagram transports.</p></li>
  389. </ul>
  390. <p>It is expected that most application types, transport methods, and security preconditions will be documented in specifications produced by the &XSF; or the &IETF;; however, developers can also define proprietary methods for custom functionality.</p>
  391. <p>Although Jingle provides a general framework for session management, the original target application for Jingle was simple voice and video chat. We stress the word "simple". The purpose of Jingle was not to build a full-fledged telephony application that supports call waiting, call forwarding, call transfer, hold music, IVR systems, find-me-follow-me functionality, conference calls, and the like. These features are of interest to some user populations, but adding support for them to the core Jingle layer would introduce unnecessary complexity into a technology that is designed for simple but generalized session negotiation.</p>
  392. <p>Furthermore, Jingle is not intended to supplant or replace existing Internet technologies based on the Session Initiation Protocol (SIP; &rfc3261;). Because dual-stack XMPP+SIP clients are difficult to build, Jingle was designed as a pure XMPP signalling protocol. However, Jingle is at the same time designed to interwork with SIP so that the millions of deployed XMPP clients can be added onto existing Voice over Internet Protocol (VoIP) networks, rather than limiting XMPP users to a separate and distinct network.</p>
  393. </section1>
  394. <section1 topic='How It Works' anchor='howitworks'>
  395. <p>This section provides a friendly introduction to Jingle.</p>
  396. <p>In essence, Jingle enables two XMPP entities (e.g., romeo@montague.lit and juliet@capulet.lit) to set up, manage, and tear down a multimedia session. The negotiation takes place over XMPP, and the media transfer typically takes place outside of XMPP. A simplified session flow would be as follows: <note>Naturally, more complex scenarios are possible; such scenarios are described in other specifications, such as <cite>Jingle RTP Sessions</cite> for voice and video chat.</note></p>
  397. <code><![CDATA[
  398. Romeo Juliet
  399. | |
  400. | session-initiate |
  401. |---------------------------->|
  402. | ack |
  403. |<----------------------------|
  404. | session-accept |
  405. |<----------------------------|
  406. | ack |
  407. |---------------------------->|
  408. | MEDIA SESSION |
  409. |<===========================>|
  410. | session-terminate |
  411. |<----------------------------|
  412. | ack |
  413. |---------------------------->|
  414. | |
  415. ]]></code>
  416. <p>To illustrate the basic flow, we show a truncated example with a "stub" application format and transport method (skipping non-essential steps to enforce the most essential concepts and ignoring security preconditions for now).</p>
  417. <example caption="Initiator sends session-initiate (stub)"><![CDATA[
  418. <iq from='romeo@montague.lit/orchard'
  419. id='zid615d9'
  420. to='juliet@capulet.lit/balcony'
  421. type='set'>
  422. <jingle xmlns='urn:xmpp:jingle:1'
  423. action='session-initiate'
  424. initiator='romeo@montague.lit/orchard'
  425. sid='a73sjjvkla37jfea'>
  426. <content creator='initiator' name='this-is-a-stub'>
  427. <description xmlns='urn:xmpp:jingle:apps:stub:0'/>
  428. <transport xmlns='urn:xmpp:jingle:transports:stub:0'/>
  429. </content>
  430. </jingle>
  431. </iq>
  432. ]]></example>
  433. <p>In this example, the initiator (romeo@montague.lit/orchard) sends a session initiation offer to the responder (juliet@capulet.lit/balcony), where the session is defined as the exchange of "stub" media over a "stub" transport.</p>
  434. <p>After the responding client acknowledges receipt of the session-initiate message (not shown here), it prompts the responding user (if any) to choose whether she wants to proceed with the session (however, it does not need to prompt the user if for example she has configured her client to automatically accept session requests from this particular initiator). If she wants to proceed she selects the appropriate interface element and her client sends a session-accept message to the initiator.</p>
  435. <example caption="Responder definitively accepts the session"><![CDATA[
  436. <iq from='juliet@capulet.lit/balcony'
  437. id='rc61n59s'
  438. to='romeo@montague.lit/orchard'
  439. type='set'>
  440. <jingle xmlns='urn:xmpp:jingle:1'
  441. action='session-accept'
  442. responder='juliet@capulet.lit/balcony'
  443. sid='a73sjjvkla37jfea'>
  444. <content creator='initiator' name='this-is-a-stub'>
  445. <description xmlns='urn:xmpp:jingle:apps:stub:0'/>
  446. <transport xmlns='urn:xmpp:jingle:transports:stub:0'/>
  447. </content>
  448. </jingle>
  449. </iq>
  450. ]]></example>
  451. <p>The initiating client acknowledges receipt of the session-accept message (not shown here) and the parties can exchange "stub" media data over the "stub" transport.</p>
  452. <p>Eventually, one of the parties (here the responder) will terminate the session.</p>
  453. <example caption="Responder terminates the session"><![CDATA[
  454. <iq from='juliet@capulet.lit/balcony'
  455. id='le71fa63'
  456. to='romeo@montague.lit/orchard'
  457. type='set'>
  458. <jingle xmlns='urn:xmpp:jingle:1'
  459. action='session-terminate'
  460. sid='a73sjjvkla37jfea'>
  461. <reason>
  462. <success/>
  463. </reason>
  464. </jingle>
  465. </iq>
  466. ]]></example>
  467. <p>The initiating client acknowledges receipt of the session-terminate message (not shown here) and the session is ended.</p>
  468. <p>We now "fill in the blanks" for the &DESCRIPTION; and &TRANSPORT; elements with a more complex example: a voice chat session, where the application type is a Jingle RTP session (with several different codec possibilities) and the transport method is ICE-UDP.</p>
  469. <example caption="Initiator sends session-initiate"><![CDATA[
  470. <iq from='romeo@montague.lit/orchard'
  471. id='ph37a419'
  472. to='juliet@capulet.lit/balcony'
  473. type='set'>
  474. <jingle xmlns='urn:xmpp:jingle:1'
  475. action='session-initiate'
  476. initiator='romeo@montague.lit/orchard'
  477. sid='a73sjjvkla37jfea'>
  478. <content creator='initiator' name='voice'>
  479. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  480. <payload-type id='96' name='speex' clockrate='16000'/>
  481. <payload-type id='97' name='speex' clockrate='8000'/>
  482. <payload-type id='18' name='G729'/>
  483. <payload-type id='0' name='PCMU' />
  484. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  485. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  486. </description>
  487. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  488. pwd='asd88fgpdd777uzjYhagZg'
  489. ufrag='8hhy'>
  490. <candidate component='1'
  491. foundation='1'
  492. generation='0'
  493. id='el0747fg11'
  494. ip=''
  495. network='1'
  496. port='8998'
  497. priority='2130706431'
  498. protocol='udp'
  499. type='host'/>
  500. <candidate component='1'
  501. foundation='2'
  502. generation='0'
  503. id='y3s2b30v3r'
  504. ip=''
  505. network='1'
  506. port='45664'
  507. priority='1694498815'
  508. protocol='udp'
  509. rel-addr=''
  510. rel-port='8998'
  511. type='srflx'/>
  512. </transport>
  513. </content>
  514. </jingle>
  515. </iq>
  516. ]]></example>
  517. <p>Upon receiving the session-initiate message, the responder determines whether it can proceed with the negotiation. If there is no error, the responder acknowledges the session initiation request.</p>
  518. <example caption="Responder acknowledges session-initiate"><![CDATA[
  519. <iq from='juliet@capulet.lit/balcony'
  520. id='ph37a419'
  521. to='romeo@montague.lit/orchard'
  522. type='result'/>
  523. ]]></example>
  524. <p>When the responding user affirms that she would like to proceed with the session, the responding client sends a session-accept message to the initiator (including in this example the subset of offered codecs that the responding client supports and one or more transport candidates generated by the responder).</p>
  525. <example caption="Responder definitively accepts the session"><![CDATA[
  526. <iq from='juliet@capulet.lit/balcony'
  527. id='yd71f495'
  528. to='romeo@montague.lit/orchard'
  529. type='set'>
  530. <jingle xmlns='urn:xmpp:jingle:1'
  531. action='session-accept'
  532. responder='juliet@capulet.lit/balcony'
  533. sid='a73sjjvkla37jfea'>
  534. <content creator='initiator' name='voice'>
  535. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  536. <payload-type id='97' name='speex' clockrate='8000'/>
  537. <payload-type id='18' name='G729'/>
  538. </description>
  539. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'>
  540. <candidate component='1'
  541. foundation='1'
  542. generation='0'
  543. id='or2ii2syr1'
  544. ip=''
  545. network='0'
  546. port='3478'
  547. priority='2130706431'
  548. protocol='udp'
  549. type='host'/>
  550. </transport>
  551. </content>
  552. </jingle>
  553. </iq>
  554. ]]></example>
  555. <p>And the initiating client acknowledges session acceptance:</p>
  556. <example caption="Initiator acknowledges session acceptance"><![CDATA[
  557. <iq from='romeo@montague.lit/orchard'
  558. id='yd71f495'
  559. to='juliet@capulet.lit/balcony'
  560. type='result'/>
  561. ]]></example>
  562. <p>Once the parties finish the transport negotiation, they would then exchange media using any of the acceptable codecs.</p>
  563. <p>Eventually, one of the parties (here the responder) will terminate the session.</p>
  564. <example caption="Responder terminates the session"><![CDATA[
  565. <iq from='juliet@capulet.lit/balcony'
  566. id='vua614d9'
  567. to='romeo@montague.lit/orchard'
  568. type='set'>
  569. <jingle xmlns='urn:xmpp:jingle:1'
  570. action='session-terminate'
  571. sid='a73sjjvkla37jfea'>
  572. <reason>
  573. <success/>
  574. <text>Sorry, gotta go!</text>
  575. </reason>
  576. </jingle>
  577. </iq>
  578. ]]></example>
  579. <p>The other party then acknowledges termination of the session:</p>
  580. <example caption="Initiator acknowledges termination"><![CDATA[
  581. <iq from='romeo@montague.lit/orchard'
  582. id='vua614d9'
  583. to='juliet@capulet.lit/balcony'
  584. type='result'/>
  585. ]]></example>
  586. </section1>
  587. <section1 topic='Requirements' anchor='reqs'>
  588. <p>The protocol defined herein is designed to meet the following requirements:</p>
  589. <ol>
  590. <li>Make it possible to manage a wide variety of peer-to-peer sessions (including but not limited to voice and video) within XMPP.</li>
  591. <li>When a peer-to-peer connection cannot be negotiated, make it possible to fall back to relayed communications.</li>
  592. <li>Clearly separate the signalling channel (XMPP) from the data channel.</li>
  593. <li>Clearly separate the application format (e.g., RTP audio) from the transport method (e.g., UDP).</li>
  594. <li>Make it possible to add, modify, and remove both application types and transport methods in an existing session.</li>
  595. <li>Make it relatively easy to implement support for the protocol in standard Jabber/XMPP clients.</li>
  596. <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>
  597. </ol>
  598. <p>This document defines the signalling protocol only. Additional documents specify the following:</p>
  599. <ul>
  600. <li><p>Various application formats (audio, video, etc.) and, where possible, mapping of those types to the Session Description Protocol (SDP; see &rfc4566;); examples include <cite>Jingle RTP Sessions</cite> and <cite>Jingle File Transfer</cite>.</p></li>
  601. <li><p>Various transport methods; examples include <cite>Jingle ICE-UDP Transport Method</cite>, <cite>Jingle Raw UDP Transport Method</cite>, <cite>Jingle In-Band Bytestreams Transport Method</cite>, and <cite>Jingle SOCKS5 Bytestreams Transport Method</cite>.</p></li>
  602. <li><p>Various methods of securing the transport before using it to send application data; the only method defined so far is Transport Layer Security as described in &xtls;.</p></li>
  603. <li><p>Procedures for mapping the Jingle signalling protocol to existing signalling standards such as the IETF's Session Initiation Protocol (SIP) and the ITU's H.323 protocol (see &H.323;); see for example &stoxmedia;.</p></li>
  604. </ul>
  605. </section1>
  606. <section1 topic='Terminology' anchor='terms'>
  607. <section2 topic='Glossary' anchor='terms-glossary'>
  608. <dl>
  609. <di>
  610. <dt>Application Format</dt>
  611. <dd>The data format of the content type being established, which formally declares one purpose of the session (e.g., "audio" or "video"). This is the 'what' of the session (i.e., the bits to be transferred), such as the acceptable codecs when establishing a voice conversation. In Jingle XML syntax the application format is the namespace of the &DESCRIPTION; element.</dd>
  612. </di>
  613. <di>
  614. <dt>Component</dt>
  615. <dd>A numbered stream of data that needs to be transmitted between the endpoints for a given content type in the context of a given session. It is up to the transport to negotiate the details of each component. Depending on the content type, multiple components might be needed (e.g., one to transmit an RTP stream and another to transmit RTCP timing information).</dd>
  616. </di>
  617. <di>
  618. <dt>Content Type</dt>
  619. <dd>A pair formed by the combination of one application format and one transport method.</dd>
  620. </di>
  621. <di>
  622. <dt>Session</dt>
  623. <dd>One or more content types negotiated between two entities. It is delimited in time by a session-initiate action and a session-terminate action. During the lifetime of a session, content types can be added or removed. A session consists of at least one content type at a time.</dd>
  624. </di>
  625. <di>
  626. <dt>Transport Method</dt>
  627. <dd>The method for establishing data stream(s) between entities. Possible transports might include ICE-UDP, ICE-TCP, Raw UDP, In-Band Bytestreams, SOCKS5 Bytestreams, etc. This is the 'how' of the session. In Jingle XML syntax this is the namespace of the &TRANSPORT; element. The transport method defines how to transfer bits from one host to another. Each transport method MUST specify whether it is "datagram" or "streaming" as described in the <link url='#transports'>Transport Types</link> section of this document.</dd>
  628. </di>
  629. </dl>
  630. </section2>
  631. <section2 topic='Conventions' anchor='terms-conventions'>
  632. <p>In diagrams, the following conventions are used:</p>
  633. <ul>
  634. <li>Single-dashed lines (---) represent Jingle stanzas that are sent via the XMPP signalling channel.</li>
  635. <li>Double-dashed lines (===) represent media packets that are sent via the data channel, which typically is not an XMPP channel (although the <cite>Jingle In-Band Bytestreams Transport Method</cite> is an exception) but instead is a direct or mediated channel between the endpoints.</li>
  636. </ul>
  637. </section2>
  638. </section1>
  639. <section1 topic='Concepts and Approach' anchor='concepts'>
  640. <p>Jingle consists of three parts, each with its own syntax and semantics:</p>
  641. <ol>
  642. <li>Overall session management</li>
  643. <li>Application types (the "what")</li>
  644. <li>Transport methods (the "how")</li>
  645. </ol>
  646. <p>This document defines the semantics and syntax for overall session management. It also provides pluggable "slots" for application formats and transport methods, which are specified in separate documents.</p>
  647. <p>At the most basic level, the process for initial negotiation of a Jingle session is as follows:</p>
  648. <ol>
  649. <li>One user (the "initiator") sends to another user (the "responder") a session-initiate message containing at least one content definition, each of which defines one application type, one transport method, and optionally one security precondition.</li>
  650. <li>If the responder wishes to proceed, it sends a session-accept message to the initiator, optionally including one or more transport candidates (depending on the transport method specified in the session-initiate message).</li>
  651. <li>The parties attempt to establish connectivity over the offered transport method as defined in the relevant specification, which might involve the exchange of transport-info messages for additional transport candidates; if connectivity cannot be established then the parties might attempt to fall back to another transport method using the transport-replace and transport-accept messages.</li>
  652. <li>Optionally, the parties attempt to establish security for the transport method before using it to exchange application data.</li>
  653. <li>Optionally, either party can add or remove content definitions, or change the direction of the media flow, using the content-add, content-remove, and content-modify messages.</li>
  654. <li>Optionally, either party can send session-info messages (e.g., to inform the other party that its device is ringing).</li>
  655. <li>As soon as the initiator and responder determine that data can flow over the negotiated transport (potentially only after a security precondition has been met), they start sending application data over the transport.</li>
  656. </ol>
  657. <p>Even after application data is being exchanged, the parties can adjust the session definition by sending additional Jingle messages, such as content-modify, content-remove, content-add, description-info, security-info, session-info, and transport-replace.</p>
  658. <section2 topic='Overall Session Management' anchor='concepts-session'>
  659. <p>The state machine for overall session management (i.e., the state per Session ID) is as follows:</p>
  660. <code>
  661. o
  662. |
  663. | session-initiate
  664. |
  665. | +---------->--------------+
  666. |/ |
  667. PENDING o-----------------------+ |
  668. | | content-accept, | |
  669. | | content-add, | |
  670. | | content-modify, | |
  671. | | content-reject, | |
  672. | | content-remove, | |
  673. | | description-info, | |
  674. \|/ | session-info, | |
  675. | | transport-accept, | |
  676. | | transport-info, | |
  677. | | transport-reject, | |
  678. | | transport-replace | |
  679. | +-------------------+ |
  680. | |
  681. | session-accept \|/
  682. | |
  683. ACTIVE o-----------------------+ |
  684. | | content-accept, | |
  685. | | content-add, | |
  686. | | content-modify, | |
  687. | | content-reject, | |
  688. | | content-remove, | |
  689. | | description-info, | |
  690. \|/ | session-info, | |
  691. | | transport-accept, | |
  692. | | transport-info, | |
  693. | | transport-reject, | |
  694. | | transport-replace | |
  695. | +-------------------+ |
  696. | |
  697. +------------>--------------+
  698. |
  699. | session-terminate
  700. |
  701. o ENDED
  702. </code>
  703. <p>As shown, there are three overall session states:</p>
  704. <ol>
  705. <li>PENDING</li>
  706. <li>ACTIVE</li>
  707. <li>ENDED</li>
  708. </ol>
  709. <p>Note: While it is allowed to send all actions while in the PENDING state, typically the responder will send a session-accept message as quickly as possible in order to expedite the transport negotiation; see the <link url='#sec'>Security Considerations</link> section of this document regarding information exposure when the responder sends transport candidates to the initiator.</p>
  710. <p>The actions related to management of the overall Jingle session are as follows (detailed definitions are provided in the <link url='#def-action'>Action Attribute</link> section of this document).</p>
  711. <dl>
  712. <di><dt>content-accept</dt><dd>Accept a content-add action received from another party.</dd></di>
  713. <di><dt>content-add</dt><dd>Add one or more new content definitions to the session.</dd></di>
  714. <di><dt>content-modify</dt><dd>Change the directionality of media sending.</dd></di>
  715. <di><dt>content-reject</dt><dd>Reject a content-add action received from another party.</dd></di>
  716. <di><dt>content-remove</dt><dd>Remove one or more content definitions from the session.</dd></di>
  717. <di><dt>description-info</dt><dd>Exchange information about parameters for an application type.</dd></di>
  718. <di><dt>session-accept</dt><dd>Definitively accept a session negotiation.</dd></di>
  719. <di><dt>session-info</dt><dd>Send session-level information, such as a ping or a ringing message.</dd></di>
  720. <di><dt>session-initiate</dt><dd>Request negotiation of a new Jingle session.</dd></di>
  721. <di><dt>session-terminate</dt><dd>End an existing session.</dd></di>
  722. <di><dt>transport-accept</dt><dd>Accept a transport-replace action received from another party.</dd></di>
  723. <di><dt>transport-info</dt><dd>Exchange transport candidates.</dd></di>
  724. <di><dt>transport-reject</dt><dd>Reject a transport-replace action received from another party.</dd></di>
  725. <di><dt>transport-replace</dt><dd>Redefine a transport method or replace it with a different method.</dd></di>
  726. </dl>
  727. </section2>
  728. </section1>
  729. <section1 topic='Session Flow' anchor='session'>
  730. <p>This section defines the high-level flow of a Jingle session. More detailed descriptions are provided in the specifications for Jingle application formats and transport methods.</p>
  731. <section2 topic='Resource Determination' anchor='session-resource'>
  732. <p>In order to initiate a Jingle session, the initiator needs to determine which of the responder's XMPP resources is best for the desired application format. Methods for doing so are out of scope for this specification. However, see the <link url='#support'>Determining Support</link> section of this document for relevant information.</p>
  733. </section2>
  734. <section2 topic='Initiation' anchor='protocol-initiate'>
  735. <p>Once the initiator has discovered which of the responder's XMPP resources is ideal for the desired application format, it sends a session initiation request to the responder. This request is an IQ-set containing a &JINGLE; element qualified by the 'urn:xmpp:jingle:1' namespace &VNOTE;, where the value of the 'action' attribute is "session-initiate" and where the &JINGLE; element contains one or more &CONTENT; elements. Each &CONTENT; element defines a content type to be transferred during the session, and each &CONTENT; element in turn contains one &DESCRIPTION; child element that specifies a desired application format and one &TRANSPORT; child element that specifies a potential transport method, as well as (optionally) one &lt;security/&gt; element that specifies a security precondition that needs to be met before the parties can exchange application data over the negotiated transport.</p>
  736. <example caption="Initiator sends session-initiate"><![CDATA[
  737. <iq from='romeo@montague.lit/orchard'
  738. id='xs51r0k4'
  739. to='juliet@capulet.lit/balcony'
  740. type='set'>
  741. <jingle xmlns='urn:xmpp:jingle:1'
  742. action='session-initiate'
  743. initiator='romeo@montague.lit/orchard'
  744. sid='a73sjjvkla37jfea'>
  745. <content creator='initiator' name='voice'>
  746. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  747. <payload-type id='96' name='speex' clockrate='16000'/>
  748. <payload-type id='97' name='speex' clockrate='8000'/>
  749. <payload-type id='18' name='G729'/>
  750. <payload-type id='0' name='PCMU' />
  751. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  752. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  753. </description>
  754. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  755. pwd='asd88fgpdd777uzjYhagZg'
  756. ufrag='8hhy'>
  757. <candidate component='1'
  758. foundation='1'
  759. generation='0'
  760. id='el0747fg11'
  761. ip=''
  762. network='1'
  763. port='8998'
  764. priority='2130706431'
  765. protocol='udp'
  766. type='host'/>
  767. <candidate component='1'
  768. foundation='2'
  769. generation='0'
  770. id='y3s2b30v3r'
  771. ip=''
  772. network='1'
  773. port='45664'
  774. priority='1694498815'
  775. protocol='udp'
  776. rel-addr=''
  777. rel-port='8998'
  778. type='srflx'/>
  779. </transport>
  780. </content>
  781. </jingle>
  782. </iq>
  783. ]]></example>
  784. <p>Application types ought not to be mixed beyond necessity within a single session. Therefore the session initiation request (along with subsequent additions) will include only content-types that can be grouped together into a coherent session within a given Jingle application. For example, two parties might start an audio call but then add a video aspect to that call. If one of the parties decides to send a file to the other party as a result of discussion over the audio/video session or a text chat conversation, conceptually that is probably a separate session (unless file exchange or screen sharing or some other application type is an integral part of a broader collaboration experience and needs to be calibrated with the audio/video session).</p>
  785. <p>Note: The syntax and semantics of the &DESCRIPTION;, &TRANSPORT;, and &lt;security/&gt; elements are out of scope for this document, since they are defined in related specifications. The syntax and semantics of the &JINGLE; and &CONTENT; elements are specified in this document under <link url='#def'>Formal Definition</link>.</p>
  786. </section2>
  787. <section2 topic='Responder Response' anchor='protocol-response'>
  788. <section3 topic='Acknowledgement' anchor='protocol-response-ack'>
  789. <p>Unless one of the following errors occurs, the responder MUST acknowledge receipt of the initiation request.</p>
  790. <example caption="Responder acknowledges session-initiate"><![CDATA[
  791. <iq from='juliet@capulet.lit/balcony'
  792. id='xs51r0k4'
  793. to='romeo@montague.lit/orchard'
  794. type='result'/>
  795. ]]></example>
  796. <p>However, after acknowledging the session initiation request, the responder might subsequently determine that it cannot proceed with negotiation of the session (e.g., because it does not support any of the offered application formats or transport methods, because a human user is busy or unable to accept the session, because a human user wishes to formally decline the session, etc.). In these cases, the responder SHOULD immediately acknowledge the session initiation request but then terminate the session with an appropriate reason as described in the <link url='#session-terminate'>Termination</link> section of this document.</p>
  797. </section3>
  798. <section3 topic='Errors' anchor='protocol-response-errors'>
  799. <p>There are several reasons why the responder might immediately return an error instead of acknowledging receipt of the initiation request:</p>
  800. <ul>
  801. <li>The initiator is unknown to the responder and the responder does not communicate with unknown entities.</li>
  802. <li>The responder does not support Jingle.</li>
  803. <li>The responder wishes to redirect the request to another address.</li>
  804. <li>The responder does not have sufficient resources to participate in a session.</li>
  805. <li>The initiation request was malformed.</li>
  806. </ul>
  807. <p>If the initiator is unknown to the responder (e.g., via presence subscription as defined in &rfc3921;) and the responder has a policy of not communicating via Jingle with unknown entities, it MUST return a &unavailable; error.</p>
  808. <example caption="Initiator is unknown to responder"><![CDATA[
  809. <iq from='juliet@capulet.lit/balcony'
  810. id='xs51r0k4'
  811. to='romeo@montague.lit/orchard'
  812. type='error'>
  813. <error type='cancel'>
  814. <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  815. </error>
  816. </iq>
  817. ]]></example>
  818. <p>If the responder does not support Jingle, it MUST return a &unavailable; error.</p>
  819. <example caption="Responder does not support Jingle"><![CDATA[
  820. <iq from='juliet@capulet.lit/balcony'
  821. id='xs51r0k4'
  822. to='romeo@montague.lit/orchard'
  823. type='error'>
  824. <error type='cancel'>
  825. <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  826. </error>
  827. </iq>
  828. ]]></example>
  829. <p>If the responder wishes to redirect the request to another address, it MUST return a &redirect; error.</p>
  830. <example caption="Responder redirection"><![CDATA[
  831. <iq from='juliet@capulet.lit/balcony'
  832. id='xs51r0k4'
  833. to='romeo@montague.lit/orchard'
  834. type='error'>
  835. <error type='modify'>
  836. <redirect xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
  837. xmpp:voicemail@capulet.lit
  838. </redirect>
  839. </error>
  840. </iq>
  841. ]]></example>
  842. <p>If the responder does not have sufficient resources to participate in a session, it MUST return a &constraint; error.</p>
  843. <example caption="Responder has insufficent resources"><![CDATA[
  844. <iq from='juliet@capulet.lit/balcony'
  845. id='xs51r0k4'
  846. to='romeo@montague.lit/orchard'
  847. type='error'>
  848. <error type='wait'>
  849. <resource-constraint xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  850. </error>
  851. </iq>
  852. ]]></example>
  853. <p>If the initiation request was malformed, the responder MUST return a &badrequest; error.</p>
  854. <example caption="Initiation request malformed"><![CDATA[
  855. <iq from='juliet@capulet.lit/balcony'
  856. id='xs51r0k4'
  857. to='romeo@montague.lit/orchard'
  858. type='error'>
  859. <error type='cancel'>
  860. <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  861. </error>
  862. </iq>
  863. ]]></example>
  864. </section3>
  865. </section2>
  866. <section2 topic='Negotiation' anchor='session-negotiation'>
  867. <p>Although in general it is preferable for the responder to send a session-accept message as soon as possible, some forms of negotiation might be necessary before the parties can agree on an acceptable set of application formats and transport methods. There are many potential parameter combinations, as defined in the relevant specifications for various application formats and transport methods.</p>
  868. <p>The allowable negotiations (e.g., content-level and transport-level negotiations) include:</p>
  869. <ul>
  870. <li>Exchanging particular transport candidates via the transport-info action.</li>
  871. <li>Modifying the communication direction for a content type via the content-modify action.</li>
  872. <li>Changing the definition of a content type via the transport-replace action (typically to fall back to a more suitable transport).</li>
  873. <li>Adding a content type via the content-add action.</li>
  874. <li>Removing a content type via the content-remove action.</li>
  875. </ul>
  876. <p>These forms of negotiation can also occur after the session has been accepted.</p>
  877. </section2>
  878. <section2 topic='Acceptance' anchor='session-acceptance'>
  879. <p>As soon as possible after receiving the session-initiate message, the responder informs the initiator that she wishes to proceed with the session by sending a session-accept message.</p>
  880. <example caption="Responder accepts the session"><![CDATA[
  881. <iq from='juliet@capulet.lit/balcony'
  882. id='jd82f517'
  883. to='romeo@montague.lit/orchard'
  884. type='set'>
  885. <jingle xmlns='urn:xmpp:jingle:1'
  886. action='session-accept'
  887. responder='juliet@capulet.lit/balcony'
  888. sid='a73sjjvkla37jfea'>
  889. <content creator='initiator' name='voice'>
  890. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  891. <payload-type id='97' name='speex' clockrate='8000'/>
  892. <payload-type id='18' name='G729'/>
  893. </description>
  894. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'>
  895. <candidate component='1'
  896. foundation='1'
  897. generation='0'
  898. id='or2ii2syr1'
  899. ip=''
  900. network='0'
  901. port='3478'
  902. priority='2130706431'
  903. protocol='udp'
  904. type='host'/>
  905. </transport>
  906. </content>
  907. </jingle>
  908. </iq>
  909. ]]></example>
  910. <p class='box'>Note: After receiving and acknowledging the "session-initiate" action received from the initiator, the responding client SHOULD present an interface element that enables a human user to explicitly agree to proceeding with the session (e.g., an "Accept Incoming Call?" pop-up window including "Yes" and "No" buttons). However, the responding client SHOULD NOT return a "session-accept" action to the initiator until the responder has explicitly agreed to proceed with the session (unless the initiator is on a list of entities whose sessions are automatically accepted).</p>
  911. <p>The initiator then acknowledges the responder's definitive acceptance.</p>
  912. <example caption="Initiator acknowledges session acceptance"><![CDATA[
  913. <iq from='romeo@montague.lit/orchard'
  914. id='jd82f517'
  915. to='juliet@capulet.lit/balcony'
  916. type='result'/>
  917. ]]></example>
  918. <p>The session is now in the ACTIVE state. However, this does not necessarily mean that the parties can exchange application data yet, because further negotiation might be necessary (e.g., to fall back from the offered transport method to a suitable alternative).</p>
  919. </section2>
  920. <section2 topic='Modifying an Active Session' anchor='session-modify'>
  921. <p>Once a session is in the ACTIVE state, it might be modified via a content-add, content-modify, content-remove, or transport-info message. Examples of such modifications are shown in the specifications for various application formats and transport methods.</p>
  922. </section2>
  923. <section2 topic='Termination' anchor='session-terminate'>
  924. <p>In order to gracefully end the session (which can be done at any point after acknowledging receipt of the initiation request, including immediately thereafter in order to decline the request), either the responder or the initiator MUST send a session-terminate message to the other party.</p>
  925. <p>The party that terminates the session SHOULD include a &lt;reason/&gt; element that specifies why the session is being terminated. Examples follow.</p>
  926. <p>Probably the primary reason for terminating a session is that the session has ended successfully (e.g., because a file has been sent or a voice call has completed); in this case, the recommended condition is &lt;success/&gt;.</p>
  927. <example caption="Terminating the session (success)"><![CDATA[
  928. <iq from='juliet@capulet.lit/balcony'
  929. id='bv81gs75'
  930. to='romeo@montague.lit/orchard'
  931. type='set'>
  932. <jingle xmlns='urn:xmpp:jingle:1'
  933. action='session-terminate'
  934. sid='a73sjjvkla37jfea'>
  935. <reason>
  936. <success/>
  937. </reason>
  938. </jingle>
  939. </iq>
  940. ]]></example>
  941. <p>Another reason for terminating the session is that the terminating party is busy; in this case, the recommended condition is &lt;busy/&gt;.</p>
  942. <example caption="Terminating the session (busy)"><![CDATA[
  943. <iq from='juliet@capulet.lit/balcony'
  944. id='hr81fs63'
  945. to='romeo@montague.lit/orchard'
  946. type='set'>
  947. <jingle xmlns='urn:xmpp:jingle:1'
  948. action='session-terminate'
  949. sid='a73sjjvkla37jfea'>
  950. <reason>
  951. <busy/>
  952. </reason>
  953. </jingle>
  954. </iq>
  955. ]]></example>
  956. <p>Another reason for terminating the session is that the terminating party wishes to formally decline the session; in this case, the recommended condition is &lt;decline/&gt;.</p>
  957. <example caption="Terminating the session (session formally declined)"><![CDATA[
  958. <iq from='juliet@capulet.lit/balcony'
  959. id='ky47g295'
  960. to='romeo@montague.lit/orchard'
  961. type='set'>
  962. <jingle xmlns='urn:xmpp:jingle:1'
  963. action='session-terminate'
  964. sid='a73sjjvkla37jfea'>
  965. <reason>
  966. <decline/>
  967. </reason>
  968. </jingle>
  969. </iq>
  970. ]]></example>
  971. <p>Another reason for terminating the session is that the terminating party already has an existing session with the other party and wishes to use that session rather than initiate a new session; in this case, the recommended condition is &lt;alternative-session/&gt; and the terminating party SHOULD include the session ID of the alternative session in the &lt;sid/&gt; element.</p>
  972. <example caption="Terminating the session (existing session)"><![CDATA[
  973. <iq from='juliet@capulet.lit/balcony'
  974. id='ay3r2b86'
  975. to='romeo@montague.lit/orchard'
  976. type='set'>
  977. <jingle xmlns='urn:xmpp:jingle:1'
  978. action='session-terminate'
  979. sid='a73sjjvkla37jfea'>
  980. <reason>
  981. <alternative-session>
  982. <sid>b84tkkwlmb48kgfb</sid>
  983. </alternative-session>
  984. </reason>
  985. </jingle>
  986. </iq>
  987. ]]></example>
  988. <p>Another reason for terminating the session is that the terminating party does not support any of the offered transport methods; in this case, the recommended condition is &lt;unsupported-transports/&gt;.</p>
  989. <example caption="Terminating the session (no offered transport method supported)"><![CDATA[
  990. <iq from='juliet@capulet.lit/balcony'
  991. id='h82bs51g'
  992. to='romeo@montague.lit/orchard'
  993. type='set'>
  994. <jingle xmlns='urn:xmpp:jingle:1'
  995. action='session-terminate'
  996. sid='a73sjjvkla37jfea'>
  997. <reason>
  998. <unsupported-transports/>
  999. </reason>
  1000. </jingle>
  1001. </iq>
  1002. ]]></example>
  1003. <p>Another reason for terminating the session is that the terminating party has determined that transport setup has failed in an unrecoverable fashion (e.g., all transport methods have been exhausted even after fallback and the last method attempted has failed); in this case, the recommended condition is &lt;failed-transport/&gt;.</p>
  1004. <example caption="Terminating the session (transport negotiation failed)"><![CDATA[
  1005. <iq from='juliet@capulet.lit/balcony'
  1006. id='pe81ga88'
  1007. to='romeo@montague.lit/orchard'
  1008. type='set'>
  1009. <jingle xmlns='urn:xmpp:jingle:1'
  1010. action='session-terminate'
  1011. sid='a73sjjvkla37jfea'>
  1012. <reason>
  1013. <failed-transport/>
  1014. </reason>
  1015. </jingle>
  1016. </iq>
  1017. ]]></example>
  1018. <p>Another reason for terminating the session is that the terminating party does not support any of the offered application types; in this case, the recommended condition is &lt;unsupported-applications/&gt;.</p>
  1019. <example caption="Terminating the session (no offered application type supported)"><![CDATA[
  1020. <iq from='juliet@capulet.lit/balcony'
  1021. id='yd62vd67'
  1022. to='romeo@montague.lit/orchard'
  1023. type='set'>
  1024. <jingle xmlns='urn:xmpp:jingle:1'
  1025. action='session-terminate'
  1026. sid='a73sjjvkla37jfea'>
  1027. <reason>
  1028. <unsupported-applications/>
  1029. </reason>
  1030. </jingle>
  1031. </iq>
  1032. ]]></example>
  1033. <p>Another reason for terminating the session is that the terminating party has determined that setup of the application type has failed in an unrecoverable fashion (e.g., the client cannot initialize audio processing for a voice call); in this case, the recommended condition is &lt;failed-application/&gt;.</p>
  1034. <example caption="Terminating the session (application setup failed)"><![CDATA[
  1035. <iq from='juliet@capulet.lit/balcony'
  1036. id='kd82vs71'
  1037. to='romeo@montague.lit/orchard'
  1038. type='set'>
  1039. <jingle xmlns='urn:xmpp:jingle:1'
  1040. action='session-terminate'
  1041. sid='a73sjjvkla37jfea'>
  1042. <reason>
  1043. <failed-application/>
  1044. </reason>
  1045. </jingle>
  1046. </iq>
  1047. ]]></example>
  1048. <p>Another reason for terminating the session is that the terminating party supports the offered application type but does not support the offered or negotiated parameters (e.g., in a voice call none of the payload types); in this case, the recommended condition is &lt;incompatible-parameters/&gt;.</p>
  1049. <example caption="Terminating the session (incompatible parameters)"><![CDATA[
  1050. <iq from='juliet@capulet.lit/balcony'
  1051. id='hb3m59s7'
  1052. to='romeo@montague.lit/orchard'
  1053. type='set'>
  1054. <jingle xmlns='urn:xmpp:jingle:1'
  1055. action='session-terminate'
  1056. sid='a73sjjvkla37jfea'>
  1057. <reason>
  1058. <incompatible-parameters/>
  1059. </reason>
  1060. </jingle>
  1061. </iq>
  1062. ]]></example>
  1063. <p>Note: Other reasons for terminating the session might apply, and the foregoing list is not exhaustive.</p>
  1064. <p>Upon receiving session-terminate message, the other party MUST then acknowledge termination of the session:</p>
  1065. <example caption="Acknowledging termination"><![CDATA[
  1066. <iq from='romeo@montague.lit/orchard'
  1067. id='h82bs51g'
  1068. to='juliet@capulet.lit/balcony'
  1069. type='result'/>
  1070. ]]></example>
  1071. <p>Note: As soon as an entity sends a session-terminate action, it MUST consider the session to be in the ENDED state (even before receiving acknowledgement from the other party). If the terminating entity receives additional Jingle-related IQ-sets from the other party after sending the session-terminate action, it MUST reply with an &lt;unknown-session/&gt; error.</p>
  1072. <example caption="Unknown-session error"><![CDATA[
  1073. <iq from='romeo@montague.lit/orchard'
  1074. id='ur71vs62'
  1075. to='juliet@capulet.lit/balcony'
  1076. type='error'>
  1077. <error type='cancel'>
  1078. <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  1079. <unknown-session xmlns='urn:xmpp:jingle:errors:1'/>
  1080. </error>
  1081. </iq>
  1082. ]]></example>
  1083. <p>Not all Jingle sessions end gracefully. When the parties to a Jingle session also exchange XMPP presence information, receipt of &UNAVAILABLE; from the other party SHOULD be considered a session-ending event that justifies proactively sending a session-terminate message to the seemingly unavailable party -- if, that is, no other communication has been received within 5 or 10 seconds from the seemingly unavailable party in the form of XMPP signalling traffic, connectivity checks, or continued media transfer.</p>
  1084. </section2>
  1085. <section2 topic='Informational Messages' anchor='session-info'>
  1086. <p>At any point after initiation of a Jingle session, either entity MAY send an informational message to the other party, for example to inform the other party that a device is ringing.</p>
  1087. <example caption="Responder sends ringing message"><![CDATA[
  1088. <iq from='juliet@capulet.lit/balcony'
  1089. id='hq7rg186'
  1090. to='romeo@montague.lit/orchard'
  1091. type='set'>
  1092. <jingle xmlns='urn:xmpp:jingle:1'
  1093. action='session-info'
  1094. sid='a73sjjvkla37jfea'>
  1095. <ringing xmlns='urn:xmpp:jingle:apps:rtp:1:info'/>
  1096. </jingle>
  1097. </iq>
  1098. ]]></example>
  1099. <p>An informational message MUST be an IQ-set containing a &JINGLE; element whose 'action' attribute is set to a value of "session-info", "description-info", or "transport-info"; the &JINGLE; element SHOULD further contain a payload child element (specific to the application format or transport method) that specifies the information being communicated. If the party that receives an informational message does not understand the payload, it MUST return a &feature; error with a Jingle-specific error condition of &lt;unsupported-info/&gt;.</p>
  1100. <example caption="Responder returns unsupported-info error"><![CDATA[
  1101. <iq from='romeo@montague.lit/orchard'
  1102. id='hq7rg186'
  1103. to='juliet@capulet.lit/balcony'
  1104. type='error'>
  1105. <error type='modify'>
  1106. <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  1107. <unsupported-info xmlns='urn:xmpp:jingle:errors:1'/>
  1108. </error>
  1109. </iq>
  1110. ]]></example>
  1111. <p>However, the &JINGLE; element associated with a session-info message MAY be empty. If either party receives an empty session-info message for an active session, it MUST send an empty IQ result; this usage functions as a "ping" to determine session vitality via the XMPP signalling channel.</p>
  1112. <example caption="Responder sends session ping"><![CDATA[
  1113. <iq from='juliet@capulet.lit/balcony'
  1114. id='ug37vb25'
  1115. to='romeo@montague.lit/orchard'
  1116. type='set'>
  1117. <jingle xmlns='urn:xmpp:jingle:1'
  1118. action='session-info'
  1119. sid='a73sjjvkla37jfea'/>
  1120. </iq>
  1121. ]]></example>
  1122. <example caption="Initiator returns IQ-result"><![CDATA[
  1123. <iq from='romeo@montague.lit/orchard'
  1124. id='ug37vb25'
  1125. to='juliet@capulet.lit/balcony'
  1126. type='result'/>
  1127. ]]></example>
  1128. </section2>
  1129. </section1>
  1130. <section1 topic='Formal Definition' anchor='def'>
  1131. <section2 topic='Jingle Element' anchor='def-jingle'>
  1132. <p>The &JINGLE; element MAY be empty or contain one or more &CONTENT; elements (for which see <link url='#def-content'>Content Element</link>).</p>
  1133. <p>The attributes of the &JINGLE; element are as follows.</p>
  1134. <table caption='Attributes of Jingle Element'>
  1135. <tr>
  1136. <th>Attribute</th>
  1137. <th>Definition</th>
  1138. <th>Inclusion</th>
  1139. </tr>
  1140. <tr>
  1141. <td>action</td>
  1142. <td>A Jingle action as described under <link url='#def-action'>Action Attribute</link>.</td>
  1143. <td>REQUIRED</td>
  1144. </tr>
  1145. <tr>
  1146. <td>initiator*</td>
  1147. <td>The full JID of the entity that has initiated the session flow. When the Jingle action is "session-initiate", the &JINGLE; element SHOULD possess an 'initiator' attribute that explicitly specifies the full JID of the initiating entity; for all other actions, the &JINGLE; element SHOULD NOT possess an 'initiator' attribute and the recipient of the message SHOULD ignore the value if provided. The value of the 'initiator' attribute MAY be different from the 'from' address on the IQ-set of the session-initiate message (e.g., to handle certain interactions involving call managers, soft switches, and media relays). This usage shall be defined in other specifications, for example, in &xep0251;. However, in all cases if the 'initiator' and 'from' values differ then the responder MUST NOT interact with the 'initiator' JID unless it trusts the 'initiator' JID or trusts that the 'from' JID is allowed to authorize the 'initiator' JID to act on the 'from' JID's behalf. In the absence of explicit rules for handling this case, the responder SHOULD simply ignore the 'initiator' attribute and treat the 'from' JID as the initiating entity. After sending acknowledgement of the session-initiate message, the responder MUST send all future commmunications about the Jingle session to the initiator (whether the initiator is considered the 'from' JID or the 'initiator' JID).</td>
  1148. <td>RECOMMENDED for session-initiate, NOT RECOMMENDED otherwise</td>
  1149. </tr>
  1150. <tr>
  1151. <td>responder*</td>
  1152. <td>The full JID of the entity that has replied to the initiation, which can be different from the 'to' address on the IQ-set. When the Jingle action is "session-accept", the &JINGLE; element SHOULD possess a 'responder' attribute that explicitly specifies the full JID of the responding entity; for all other actions, the &JINGLE; element SHOULD NOT possess a 'responder' attribute and the recipient of the message SHOULD ignore the value if provided. The value of the 'responder' attribute MAY be different from the 'from' address on the IQ-set of the session-accept message, where the logic for handling any difference between the 'responder' JID and the 'from' JID follows the same logic as for session-initiate messages (see above). After sending acknowledgement of the session-accept message, the initiator MUST send all future commmunications about this Jingle session to the responder (whether the responder is considered the 'from' JID or the 'responder' JID).</td>
  1153. <td>RECOMMENDED for session-accept, NOT RECOMMENDED otherwise</td>
  1154. </tr>
  1155. <tr>
  1156. <td>sid</td>
  1157. <td>A random session identifier generated by the initiator, which effectively maps to the local-part of a SIP "Call-ID" parameter; this SHOULD match the XML Nmtoken production <note>See &lt;<link url=''></link>&gt;</note> so that XML character escaping is not needed for characters such as '&amp;'. In some situations the Jingle session identifier might have security implications. See &rfc4086; regarding requirements for randomness.</td>
  1158. <td>REQUIRED</td>
  1159. </tr>
  1160. </table>
  1161. </section2>
  1162. <section2 topic='Action Attribute' anchor='def-action'>
  1163. <p>The value of the 'action' attribute MUST be one of the following. If an entity receives a value not defined here, it MUST ignore the attribute and MUST return a &badrequest; error to the sender. There is no default value for the 'action' attribute.</p>
  1164. <section3 topic='content-accept' anchor='def-action-content-accept'>
  1165. <p>The <strong>content-accept</strong> action is used to accept a content-add action received from another party.</p>
  1166. </section3>
  1167. <section3 topic='content-add' anchor='def-action-content-add'>
  1168. <p>The <strong>content-add</strong> action is used to add one or more new content definitions to the session. The sender MUST specify only the added content definition(s), not the added content definition(s) plus the existing content definition(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content definition(s). If the recipient wishes to include the new content definition in the session, it MUST send a content-accept action to the other party; if not, it MUST send a content-reject action to the other party.</p>
  1169. </section3>
  1170. <section3 topic='content-modify' anchor='def-action-content-modify'>
  1171. <p>The <strong>content-modify</strong> action is used to change the direction of an existing content definition through modification of the 'senders' attribute. If the recipient deems the directionality of a content-modify action to be unacceptable, it MAY reply with a contrary content-modify action, terminate the session, or simply refuse to send or accept application data in the new direction. In any case, the recipient MUST NOT send a content-accept action in response to the content-modify.</p>
  1172. </section3>
  1173. <section3 topic='content-reject' anchor='def-action-content-reject'>
  1174. <p>The <strong>content-reject</strong> action is used to reject a content-add action received from another party.</p>
  1175. <p>If the content-reject results in zero content definitions for the session, the entity that receives the content-reject SHOULD send a session-terminate action to the other party (since a session with no content definitions is void).</p>
  1176. </section3>
  1177. <section3 topic='content-remove' anchor='def-action-content-remove'>
  1178. <p>The <strong>content-remove</strong> action is used to remove one or more content definitions from the session. The sender MUST specify only the removed content definition(s), not the removed content definition(s) plus the remaining content definition(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content definition(s). Upon receiving a content-remove from the other party, the recipient MUST NOT send a content-accept and MUST NOT continue to negotiate the transport method or send application data related to that content definition.</p>
  1179. <p>If the content-remove results in zero content definitions for the session, the entity that receives the content-remove SHOULD send a session-terminate action to the other party (since a session with no content definitions is void).</p>
  1180. </section3>
  1181. <section3 topic='description-info' anchor='def-action-description-info'>
  1182. <p>The <strong>description-info</strong> action is used to send informational hints about parameters related to the application type, such as the suggested height and width of a video display area or suggested configuration for an audio stream.</p>
  1183. </section3>
  1184. <section3 topic='security-info' anchor='def-action-security-info'>
  1185. <p>The <strong>security-info</strong> action is used to send information related to establishment or maintenance of security preconditions.</p>
  1186. </section3>
  1187. <section3 topic='session-accept' anchor='def-action-session-accept'>
  1188. <p>The <strong>session-accept</strong> action is used to definitively accept a session negotiation (implicitly this action also serves as a content-accept). A session-accept action indicates a willingness to proceed with the session (which might necessitate further negotiation before media can be exchanged). The session-accept action indicates acceptance <em>only</em> of the content definition(s) whose disposition type is "session" (the default value of the &CONTENT; element's 'disposition' attribute), not any content definition(s) whose disposition type is something other than "session" (e.g., "early-session" for early media).</p>
  1189. <p>In the session-accept stanza, the &JINGLE; element MUST contain one or more &lt;content/&gt; elements, each of which MUST contain one &lt;description/&gt; element and one &lt;transport/&gt; element.</p>
  1190. </section3>
  1191. <section3 topic='session-info' anchor='def-action-session-info'>
  1192. <p>The <strong>session-info</strong> action is used to send session-level information, such as a session ping or (for Jingle RTP sessions) a ringing message.</p>
  1193. </section3>
  1194. <section3 topic='session-initiate' anchor='def-action-session-initiate'>
  1195. <p>The <strong>session-initiate</strong> action is used to request negotiation of a new Jingle session. When sending a session-initiate with one &CONTENT; element, the value of the &CONTENT; element's 'disposition' attribute MUST be "session" (if there are multiple &CONTENT; elements then at least one MUST have a disposition of "session"); if this rule is violated, the responder MUST return a &badrequest; error to the initiator.</p>
  1196. </section3>
  1197. <section3 topic='session-terminate' anchor='def-action-session-terminate'>
  1198. <p>The <strong>session-terminate</strong> action is used to end an existing session.</p>
  1199. </section3>
  1200. <section3 topic='transport-accept' anchor='def-action-transport-accept'>
  1201. <p>The <strong>transport-accept</strong> action is used to accept a transport-replace action received from another party.</p>
  1202. </section3>
  1203. <section3 topic='transport-info' anchor='def-action-transport-info'>
  1204. <p>The <strong>transport-info</strong> action is used to exchange transport candidates; it is mainly used in <cite>Jingle ICE-UDP</cite> but might be used in other transport specifications.</p>
  1205. </section3>
  1206. <section3 topic='transport-reject' anchor='def-action-transport-reject'>
  1207. <p>The <strong>transport-reject</strong> action is used to reject a transport-replace action received from another party.</p>
  1208. </section3>
  1209. <section3 topic='transport-replace' anchor='def-action-transport-replace'>
  1210. <p>The <strong>transport-replace</strong> action is used to redefine a transport method, typically for fallback to a different method (e.g., changing from ICE-UDP to Raw UDP for a datagram transport, or changing from &xep0065; to &xep0047; for a streaming transport). If the recipient wishes to use the new transport definition, it MUST send a transport-accept action to the other party; if not, it MUST send a transport-reject action to the other party.</p>
  1211. </section3>
  1212. <section3 topic='Tie Breaking Related to Jingle Actions' anchor='def-action-ties'>
  1213. <p>It is possible that the same Jingle action can be sent at the same time by both parties. There are two possible scenarios:</p>
  1214. <dl>
  1215. <di>
  1216. <dt>No existing session</dt>
  1217. <dd>If there is no existing session and both parties simultaneously send a Jingle session-initiate message with a content-type that is functionally equivalent (e.g., each message requests initiation of a voice call), the action with the lower of the two session IDs MUST overrule the other action, where by "lower" is meant the session ID that is sorted first using "i;octet" collation as specified in Section 9.3 of &rfc4790; (in the unlikely event that the random session IDs are the same, the action sent by the lower of the JabberIDs MUST overrule the other action). The party that receives the session-initiate action with the lower of the two session IDs MUST acknowledge the action or return an error condition that would normally be returned when receiving a session-initiate message, and the party that receives the session-initiate action with the higher of the two session IDs MUST return a &conflict; error to the other party, which SHOULD include a Jingle-specific condition of &lt;tie-break/&gt;.</dd>
  1218. </di>
  1219. <di>
  1220. <dt>Existing session</dt>
  1221. <dd>In the context of an existing session, the action sent by the initiator MUST overrule the action sent by the responder; i.e., both parties MUST accept the action sent by the initiator and the initiator MUST return a &conflict; error to the responder for the duplicate action, which SHOULD include a Jingle-specific condition of &lt;tie-break/&gt;.</dd>
  1222. </di>
  1223. </dl>
  1224. <p>In both scenarios, the error to be returned is &conflict;, as shown in the following example.</p>
  1225. <example caption="Initiator returns conflict error on tie-break"><![CDATA[
  1226. <iq from='romeo@montague.lit/orchard'
  1227. id='hb2f164w'
  1228. to='juliet@capulet.lit/balcony'
  1229. type='error'>
  1230. <error type='cancel'>
  1231. <conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  1232. <tie-break xmlns='urn:xmpp:jingle:errors:1'/>
  1233. </error>
  1234. </iq>
  1235. ]]></example>
  1236. </section3>
  1237. </section2>
  1238. <section2 topic='Content Element' anchor='def-content'>
  1239. <p>The attributes of the &CONTENT; element are as follows.</p>
  1240. <table caption='Attributes of Content Element'>
  1241. <tr>
  1242. <th>Attribute</th>
  1243. <th>Definition</th>
  1244. <th>Inclusion</th>
  1245. </tr>
  1246. <tr>
  1247. <td>creator</td>
  1248. <td>Which party originally generated the content type (used to prevent race conditions regarding modifications); the defined values are "initiator" and "responder" (where the default is "initiator"). The value of the 'creator' attribute for a given content type MUST always match the party that originally generated the content type, even for Jingle actions that are sent by the other party in relation to that content type (e.g., subsequent content-modify or transport-info messages). The combination of the 'creator' attribute and the 'name' attribute is unique among both parties to a Jingle session.</td>
  1249. <td>REQUIRED</td>
  1250. </tr>
  1251. <tr>
  1252. <td>disposition</td>
  1253. <td>How the content definition is to be interpreted by the recipient. The meaning of this attribute matches the "Content-Disposition" header as defined in &rfc2183; and applied to SIP by <cite>RFC 3261</cite>. The value of this attribute SHOULD be one of the values registered in the &ianadispositions;. The default value of this attribute is "session".</td>
  1254. <td>OPTIONAL</td>
  1255. </tr>
  1256. <tr>
  1257. <td>name</td>
  1258. <td>A unique name or identifier for the content type according to the creator, which MAY have meaning to a human user in order to differentiate this content type from other content types (e.g., two content types containing video media could differentiate between "room-pan" and "slides"). If there are two content types with the same value for the 'name' attribute, they shall understood as alternative definitions for the same purpose (e.g., a legacy method and a standards-based method for establishing a voice call), typically to smooth the transition from an older technology to Jingle.</td>
  1259. <td>REQUIRED</td>
  1260. </tr>
  1261. <tr>
  1262. <td>senders</td>
  1263. <td>Which parties in the session will be generating content (i.e., the direction in which a Jingle session is active); the allowable values are "both", "initiator", "none", and "responder" (where the default is "both"). Note that the defined values of the 'senders' attribute in Jingle correspond to the SDP attributes of "sendrecv", "sendonly", "inactive", and "recvonly" defined in &rfc4566; and used in the offer-answer model &rfc3264;.</td>
  1264. <td>OPTIONAL except when sending content-modify, in which case it is REQUIRED.</td>
  1265. </tr>
  1266. </table>
  1267. </section2>
  1268. <section2 topic='Reason Element' anchor='def-reason'>
  1269. <p>The structure of the &lt;reason/&gt; element is as follows.</p>
  1270. <ul>
  1271. <li>The &lt;reason/&gt; element MUST contain an element that provides machine-readable information about the condition that prompted the action.</li>
  1272. <li>The &lt;reason/&gt; element MAY contain a &lt;text/&gt; element that provides human-readable information about the reason for the action.</li>
  1273. <li>The &lt;reason/&gt; element MAY contain an element qualified by some other namespace that provides more detailed machine-readable information about the reason for the action.</li>
  1274. </ul>
  1275. <p>A &lt;reason/&gt; element can be included with any Jingle action, and is not limited to session termination events.</p>
  1276. <p>The defined conditions are described in the following table.</p>
  1277. <table caption='Defined Conditions'>
  1278. <tr>
  1279. <th>Element</th>
  1280. <th>Description</th>
  1281. </tr>
  1282. <tr>
  1283. <td>&lt;alternative-session/&gt;</td>
  1284. <td>The party prefers to use an existing session with the peer rather than initiate a new session; the Jingle session ID of the alternative session SHOULD be provided as the XML character data of the &lt;sid/&gt; child.</td>
  1285. </tr>
  1286. <tr>
  1287. <td>&lt;busy/&gt;</td>
  1288. <td>The party is busy and cannot accept a session.</td>
  1289. </tr>
  1290. <tr>
  1291. <td>&lt;cancel/&gt;</td>
  1292. <td>The initiator wishes to formally cancel the session initiation request.</td>
  1293. </tr>
  1294. <tr>
  1295. <td>&lt;connectivity-error/&gt;</td>
  1296. <td>The action is related to connectivity problems.</td>
  1297. </tr>
  1298. <tr>
  1299. <td>&lt;decline/&gt;</td>
  1300. <td>The party wishes to formally decline the session.</td>
  1301. </tr>
  1302. <tr>
  1303. <td>&lt;expired/&gt;</td>
  1304. <td>The session length has exceeded a pre-defined time limit (e.g., a meeting hosted at a conference service).</td>
  1305. </tr>
  1306. <tr>
  1307. <td>&lt;failed-application/&gt;</td>
  1308. <td>The party has been unable to initialize processing related to the application type.</td>
  1309. </tr>
  1310. <tr>
  1311. <td>&lt;failed-transport/&gt;</td>
  1312. <td>The party has been unable to establish connectivity for the transport method.</td>
  1313. </tr>
  1314. <tr>
  1315. <td>&lt;general-error/&gt;</td>
  1316. <td>The action is related to a non-specific application error.</td>
  1317. </tr>
  1318. <tr>
  1319. <td>&lt;gone/&gt;</td>
  1320. <td>The entity is going offline or is no longer available.</td>
  1321. </tr>
  1322. <tr>
  1323. <td>&lt;incompatible-parameters/&gt;</td>
  1324. <td>The party supports the offered application type but does not support the offered or negotiated parameters.</td>
  1325. </tr>
  1326. <tr>
  1327. <td>&lt;media-error/&gt;</td>
  1328. <td>The action is related to media processing problems.</td>
  1329. </tr>
  1330. <tr>
  1331. <td>&lt;security-error/&gt;</td>
  1332. <td>The action is related to a violation of local security policies.</td>
  1333. </tr>
  1334. <tr>
  1335. <td>&lt;success/&gt;</td>
  1336. <td>The action is generated during the normal course of state management and does not reflect any error.</td>
  1337. </tr>
  1338. <tr>
  1339. <td>&lt;timeout/&gt;</td>
  1340. <td>A request has not been answered so the sender is timing out the request.</td>
  1341. </tr>
  1342. <tr>
  1343. <td>&lt;unsupported-applications/&gt;</td>
  1344. <td>The party supports none of the offered application types.</td>
  1345. </tr>
  1346. <tr>
  1347. <td>&lt;unsupported-transports/&gt;</td>
  1348. <td>The party supports none of the offered transport methods.</td>
  1349. </tr>
  1350. </table>
  1351. </section2>
  1352. </section1>
  1353. <section1 topic='Transport Types' anchor='transports'>
  1354. <p>Jingle defines two types of transport methods.</p>
  1355. <section2 topic='Datagram' anchor='transports-datagram'>
  1356. <p>A datagram transport has one or more components with which to exchange packets with UDP-like behavior. Packets might be of arbitrary length, might be received out of order, and might not be received at all (i.e., the transport is lossy). Each component is assigned a string identifier and has a maximum packet length.</p>
  1357. <p>Applications compatible with datagram transports MUST specify how many components are necessary, what identifier to assign each component, and how each component will be used.</p>
  1358. </section2>
  1359. <section2 topic='Streaming' anchor='transports-streaming'>
  1360. <p>A streaming transport has one or more components with which to exchange bidirectional bytestreams with TCP-like behavior. Bytes are received reliably and in order, and applications MUST NOT rely on a stream being chunked in any specific way. Each component is assigned a string identifier and has a maximum packet length.</p>
  1361. <p>Applications compatible with stream transports MUST specify how many components are necessary, what identifier to assign each component, and what data shall be exchanged over the transport.</p>
  1362. </section2>
  1363. </section1>
  1364. <section1 topic='Security Preconditions' anchor='preconditions'>
  1365. <p>The initiator MAY include a &lt;security/&gt; element in its offer to signal that it wishes to enforce some security precondition on the session. A stub example follows.</p>
  1366. <example caption="Initiator sends session-initiate with security precondition (stub)"><![CDATA[
  1367. <iq from='romeo@montague.lit/orchard'
  1368. id='tiw51bv9'
  1369. to='juliet@capulet.lit/balcony'
  1370. type='set'>
  1371. <jingle xmlns='urn:xmpp:jingle:1'
  1372. action='session-initiate'
  1373. initiator='romeo@montague.lit/orchard'
  1374. sid='a73sjjvkla37jfea'>
  1375. <content creator='initiator' name='this-is-a-stub'>
  1376. <description xmlns='urn:xmpp:jingle:apps:stub:0'/>
  1377. <transport xmlns='urn:xmpp:jingle:transports:stub:0'/>
  1378. <security xmlns='urn:xmpp:jingle:security:stub:0'/>
  1379. </content>
  1380. </jingle>
  1381. </iq>
  1382. ]]></example>
  1383. <p>Currently the only security precondition that is envisioned will enforce the use of end-to-end encryption for the transport before application data can be exchanged. This document does not define any security preconditions, just as it does not define any application types or transport methods. See &xtls; for an in-progress description of a security precondition using Transport Layer Security (TLS).</p>
  1384. <p>In order to exchange information about the establishment or maintenance of a security precondition, either party might send a Jingle security-info message. For example, when attempting to negotiate the use of TLS the initiator might send hints about his supported TLS methods (e.g., X.509 certificates and Secure Remote Password) in his session-initiate message and the responder might also send hints about her supported methods (e.g., X.509 and SRP) in her session-accept message; however, it is possible that the initiator might be able to verify the responder's certificate and therefore needs to inform the responder (via a security-info message) that he can in the end support only the X.509 method for this negotiation. An example follows.</p>
  1385. <example caption="Initiator sends security-info message"><![CDATA[
  1386. <iq from='romeo@montague.lit/orchard'
  1387. id='zyw6m167'
  1388. to='juliet@capulet.lit/balcony'
  1389. type='set'>
  1390. <jingle xmlns='urn:xmpp:jingle:1'
  1391. action='security-info'
  1392. sid='a73sjjvkla37jfea'>
  1393. <content creator='initiator' name='xmlstream'>
  1394. <security xmlns='urn:xmpp:jingle:security:xtls:0'>
  1395. <method name='x509'/>
  1396. </security>
  1397. </content>
  1398. </jingle>
  1399. </iq>
  1400. ]]></example>
  1401. <p>If one of the parties attempts to send information over the unsecured XMPP signalling channel that the other party expects to receive over the encrypted data channel, the receiving party SHOULD return a &notacceptable; error to the sender, including a &lt;security-required/&gt; element qualified by the 'urn:xmpp:jingle:errors:1' namespace. An example follows.</p>
  1402. <example caption="Initiator sends security-required error"><![CDATA[
  1403. <iq from='romeo@montague.lit/orchard'
  1404. id='bsi381f5'
  1405. to='juliet@capulet.lit/balcony'
  1406. type='error'>
  1407. <error type='cancel'>
  1408. <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  1409. <security-required xmlns='urn:xmpp:jingle:errors:1'/>
  1410. </error>
  1411. </iq>
  1412. ]]></example>
  1413. </section1>
  1414. <section1 topic='Error Handling' anchor='errors'>
  1415. <p>The Jingle-specific error conditions are as follows. These condition elements are qualified by the 'urn:xmpp:jingle:errors:1' namespace &VNOTE;.</p>
  1416. <table caption='Error Conditions'>
  1417. <tr>
  1418. <th>Jingle Condition</th>
  1419. <th>XMPP Condition</th>
  1420. <th>Description</th>
  1421. </tr>
  1422. <tr>
  1423. <td>&lt;out-of-order/&gt;</td>
  1424. <td>&unexpected;</td>
  1425. <td>The request cannot occur at this point in the state machine (e.g., session-initiate after session-accept).</td>
  1426. </tr>
  1427. <tr>
  1428. <td>&lt;tie-break/&gt;</td>
  1429. <td>&conflict;</td>
  1430. <td>The request is rejected because it was sent while the initiator was awaiting a reply on a similar request.</td>
  1431. </tr>
  1432. <tr>
  1433. <td>&lt;unknown-session/&gt;</td>
  1434. <td>&notfound;</td>
  1435. <td>The 'sid' attribute specifies a session that is unknown to the recipient (e.g., no longer live according to the recipient's state machine because the recipient previously terminated the session).</td>
  1436. </tr>
  1437. <tr>
  1438. <td>&lt;unsupported-info/&gt;</td>
  1439. <td>&feature;</td>
  1440. <td>The recipient does not support the informational payload of a session-info action.</td>
  1441. </tr>
  1442. </table>
  1443. </section1>
  1444. <section1 topic='Determining Support' anchor='support'>
  1445. <p>If an entity supports Jingle, it MUST advertise that fact by returning a feature of "urn:xmpp:jingle:1" &VNOTE; in response to a &xep0030; information request. The response MUST also include features for the application formats and transport methods supported by the responding entity, as described in the relevant specifications.</p>
  1446. <example caption="Service Discovery Information Request"><![CDATA[
  1447. <iq from='kingclaudius@shakespeare.lit/castle'
  1448. id='ku6e51v3'
  1449. to='laertes@shakespeare.lit/castle'
  1450. type='get'>
  1451. <query xmlns=''/>
  1452. </iq>
  1453. ]]></example>
  1454. <example caption="Service Discovery Information Response"><![CDATA[
  1455. <iq from='laertes@shakespeare.lit/castle'
  1456. id='ku6e51v3'
  1457. to='kingclaudius@shakespeare.lit/castle'
  1458. type='result'>
  1459. <query xmlns=''>
  1460. <feature var='urn:xmpp:jingle:1'/>
  1461. <feature var='urn:xmpp:jingle:apps:rtp:1'/>
  1462. <feature var='urn:xmpp:jingle:apps:rtp:audio'/>
  1463. <feature var='urn:xmpp:jingle:apps:rtp:video'/>
  1464. </query>
  1465. </iq>
  1466. ]]></example>
  1467. <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>
  1468. </section1>
  1469. <section1 topic='Conformance by Using Protocols' anchor='conformance'>
  1470. <section2 topic='Application Formats' anchor='conformance-apps'>
  1471. <p>A document that specifies a Jingle application format (e.g., RTP sessions) MUST define:</p>
  1472. <ol>
  1473. <li>How successful application format negotiation occurs.</li>
  1474. <li>A &DESCRIPTION; element and associated semantics for representing the application format.</li>
  1475. <li>If and how the application format can be mapped to the Session Description Protocol, including the appropriate SDP media type (see Section 8.2.1 of <cite>RFC 4566</cite>).</li>
  1476. <li>Whether the media data for the application format shall be sent over a streaming transport method or a datagram transport method (or, if both, which is preferred).</li>
  1477. <li>If the chosen transport handles "components", define how the components shall be identified and assigned.</li>
  1478. <li>Exactly how the media data is to be sent and received over a streaming or datagram transport.</li>
  1479. </ol>
  1480. </section2>
  1481. <section2 topic='Transport Methods' anchor='conformance-transports'>
  1482. <p>A document that specifies a Jingle transport method (e.g., raw UDP) MUST define:</p>
  1483. <ol>
  1484. <li>How successful transport negotiation occurs.</li>
  1485. <li>A &TRANSPORT; element and associated semantics for representing the transport method.</li>
  1486. <li>Whether the transport is a streaming method or a datagram method.</li>
  1487. <li>If the transport supports multiple components.</li>
  1488. </ol>
  1489. </section2>
  1490. <section2 topic='Security Preconditions' anchor='conformance-preconditions'>
  1491. <p>A document that specifies a Jingle security precondition MUST define:</p>
  1492. <ol>
  1493. <li>A &lt;security/&gt; element and associated semantics for representing the security precondition.</li>
  1494. <li>Whether the security precondition applies to streaming transport methods, datagram transport methods, or both.</li>
  1495. <li>When the precondition is met so that application data can be sent over the negotiated transport.</li>
  1496. </ol>
  1497. </section2>
  1498. </section1>
  1499. <section1 topic='Security Considerations' anchor='security'>
  1500. <section2 topic='Transport Security' anchor='security-transport'>
  1501. <p>It is strongly recommended to protect the transport method using an appropriate security precondition (e.g., Transport Layer Security). However, methods for doing so are out of scope for this specification.</p>
  1502. </section2>
  1503. <section2 topic='Denial of Service' anchor='security-dos'>
  1504. <p>Jingle sessions can be resource-intensive. Therefore, it is possible to launch a denial-of-service attack against an entity by burdening it with too many Jingle sessions. Care MUST be taken to accept sessions only from known entities and only if the entity's device is able to process such sessions.</p>
  1505. </section2>
  1506. <section2 topic='Communication Through Gateways' anchor='security-gateways'>
  1507. <p>Jingle communications can be enabled through gateways to non-XMPP networks, whose security characteristics can be quite different from those of XMPP networks. (For example, on some SIP networks authentication is optional and "from" addresses can be easily forged.) Care MUST be taken in communicating through such gateways.</p>
  1508. </section2>
  1509. <section2 topic='Information Exposure' anchor='security-info'>
  1510. <p>Mere negotiation of a Jingle session can expose sensitive information about the parties (e.g., IP addresses, or even the full JID of the responder). Care MUST be taken in communicating such information, and end-to-end encryption SHOULD be used if the parties do not trust the intermediate servers or gateways.</p>
  1511. </section2>
  1512. <section2 topic='Redirection' anchor='security-redirect'>
  1513. <p>The 'initiator' and 'responder' attributes can be used to redirect a session from one JID to another JID (i.e., the 'initiator' or 'responder' attribute might not match the 'from' or 'to' attribute of the sender). An application SHOULD NOT accept the redirection unless the bare JIDs match (i.e., the session is being redirected from one authorized resource to another authorized resource associated with the same account).</p>
  1514. </section2>
  1515. </section1>
  1516. <section1 topic='IANA Considerations' anchor='iana'>
  1517. <p>This document requires no interaction with &IANA;.</p>
  1518. </section1>
  1519. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  1520. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  1521. <p>This specification defines the following XML namespaces:</p>
  1522. <ul>
  1523. <li>urn:xmpp:jingle:1</li>
  1524. <li>urn:xmpp:jingle:errors:1</li>
  1525. </ul>
  1526. <p>The &REGISTRAR; includes the foregoing namespaces in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
  1527. </section2>
  1528. <section2 topic='Namespace Versioning' anchor='registrar-versioning'>
  1529. &NSVER;
  1530. </section2>
  1531. <section2 topic='Jingle Application Formats Registry' anchor='registrar-apps'>
  1532. <p>The XMPP Registrar maintains a registry of Jingle application formats at &JINGLEAPPS;. All application format registrations shall be defined in separate specifications (not in this document). Application types defined within the XEP series MUST be registered with the XMPP Registrar, resulting in protocol URNs of the form "urn:xmpp:jingle:app:name:X" (where "name" is the registered name of the application format and "X" is a non-negative integer).</p>
  1533. &REGPROCESS;
  1534. <code><![CDATA[
  1535. <application>
  1536. <name>The name of the application format.</name>
  1537. <desc>A natural-language summary of the application format.</desc>
  1538. <transport>
  1539. Whether the media can be sent over a "streaming" transport,
  1540. a "datagram" transport, or "both".
  1541. </transport>
  1542. <doc>The document in which the application format is specified.</doc>
  1543. </application>
  1544. ]]></code>
  1545. </section2>
  1546. <section2 topic='Jingle Transport Methods Registry' anchor='registrar-transports'>
  1547. <p>The XMPP Registrar maintains a registry of Jingle transport methods at &JINGLETRANSPORTS;. All transport method registrations shall be defined in separate specifications (not in this document). Transport methods defined within the XEP series MUST be registered with the XMPP Registrar, resulting in protocol URNs of the form "urn:xmpp:jingle:transport:name" (where "name" is the registered name of the transport method).</p>
  1548. &REGPROCESS;
  1549. <code><![CDATA[
  1550. <transport>
  1551. <name>The name of the transport method.</name>
  1552. <desc>A natural-language summary of the transport method.</desc>
  1553. <type>
  1554. Whether the transport method can be "streaming", "datagram",
  1555. or "both".
  1556. </type>
  1557. <doc>The document in which this transport method is specified.</doc>
  1558. </transport>
  1559. ]]></code>
  1560. </section2>
  1561. </section1>
  1562. <section1 topic='XML Schemas' anchor='schema'>
  1563. <section2 topic='Jingle' anchor='schema-jingle'>
  1564. <code><![CDATA[
  1565. <?xml version='1.0' encoding='UTF-8'?>
  1566. <xs:schema
  1567. xmlns:xs=''
  1568. targetNamespace='urn:xmpp:jingle:1'
  1569. xmlns='urn:xmpp:jingle:1'
  1570. elementFormDefault='qualified'>
  1571. <xs:annotation>
  1572. <xs:documentation>
  1573. The protocol documented by this schema is defined in
  1574. XEP-0166:
  1575. </xs:documentation>
  1576. </xs:annotation>
  1577. <xs:element name='jingle'>
  1578. <xs:complexType>
  1579. <xs:sequence>
  1580. <xs:element name='content'
  1581. type='contentElementType'
  1582. minOccurs='0'
  1583. maxOccurs='unbounded'/>
  1584. <xs:element name='reason'
  1585. type='reasonElementType'
  1586. minOccurs='0'
  1587. maxOccurs='1'/>
  1588. <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
  1589. </xs:sequence>
  1590. <xs:attribute name='action' use='required'>
  1591. <xs:simpleType>
  1592. <xs:restriction base='xs:NCName'>
  1593. <xs:enumeration value='content-accept'/>
  1594. <xs:enumeration value='content-add'/>
  1595. <xs:enumeration value='content-modify'/>
  1596. <xs:enumeration value='content-reject'/>
  1597. <xs:enumeration value='content-remove'/>
  1598. <xs:enumeration value='description-info'/>
  1599. <xs:enumeration value='security-info'/>
  1600. <xs:enumeration value='session-accept'/>
  1601. <xs:enumeration value='session-info'/>
  1602. <xs:enumeration value='session-initiate'/>
  1603. <xs:enumeration value='session-terminate'/>
  1604. <xs:enumeration value='transport-accept'/>
  1605. <xs:enumeration value='transport-info'/>
  1606. <xs:enumeration value='transport-reject'/>
  1607. <xs:enumeration value='transport-replace'/>
  1608. </xs:restriction>
  1609. </xs:simpleType>
  1610. </xs:attribute>
  1611. <xs:attribute name='initiator' type='xs:string' use='optional'/>
  1612. <xs:attribute name='responder' type='xs:string' use='optional'/>
  1613. <xs:attribute name='sid' type='xs:NMTOKEN' use='required'/>
  1614. </xs:complexType>
  1615. </xs:element>
  1616. <xs:complexType name='alternativeSessionElementType'>
  1617. <xs:sequence>
  1618. <xs:element name='sid'
  1619. minOccurs='0'
  1620. maxOccurs='1'
  1621. type='xs:NMTOKEN'/>
  1622. </xs:sequence>
  1623. </xs:complexType>
  1624. <xs:complexType name='contentElementType'>
  1625. <xs:sequence>
  1626. <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
  1627. </xs:sequence>
  1628. <xs:attribute name='creator'
  1629. use='required'>
  1630. <xs:simpleType>
  1631. <xs:restriction base='xs:NCName'>
  1632. <xs:enumeration value='initiator'/>
  1633. <xs:enumeration value='responder'/>
  1634. </xs:restriction>
  1635. </xs:simpleType>
  1636. </xs:attribute>
  1637. <xs:attribute name='disposition'
  1638. use='optional'
  1639. type='xs:NCName'
  1640. default='session'/>
  1641. <xs:attribute name='name'
  1642. use='required'
  1643. type='xs:string'/>
  1644. <xs:attribute name='senders'
  1645. use='optional'
  1646. default='both'>
  1647. <xs:simpleType>
  1648. <xs:restriction base='xs:NCName'>
  1649. <xs:enumeration value='both'/>
  1650. <xs:enumeration value='initiator'/>
  1651. <xs:enumeration value='none'/>
  1652. <xs:enumeration value='responder'/>
  1653. </xs:restriction>
  1654. </xs:simpleType>
  1655. </xs:attribute>
  1656. </xs:complexType>
  1657. <xs:complexType name='reasonElementType'>
  1658. <xs:sequence>
  1659. <xs:choice>
  1660. <xs:element name='alternative-session'
  1661. type='alternativeSessionElementType'/>
  1662. <xs:element name='busy' type='empty'/>
  1663. <xs:element name='cancel' type='empty'/>
  1664. <xs:element name='connectivity-error' type='empty'/>
  1665. <xs:element name='decline' type='empty'/>
  1666. <xs:element name='expired' type='empty'/>
  1667. <xs:element name='failed-application' type='empty'/>
  1668. <xs:element name='failed-transport' type='empty'/>
  1669. <xs:element name='general-error' type='empty'/>
  1670. <xs:element name='gone' type='empty'/>
  1671. <xs:element name='incompatible-parameters' type='empty'/>
  1672. <xs:element name='media-error' type='empty'/>
  1673. <xs:element name='security-error' type='empty'/>
  1674. <xs:element name='success' type='empty'/>
  1675. <xs:element name='timeout' type='empty'/>
  1676. <xs:element name='unsupported-applications' type='empty'/>
  1677. <xs:element name='unsupported-transports' type='empty'/>
  1678. </xs:choice>
  1679. <xs:element name='text' type='xs:string' minOccurs='0' maxOccurs='1'/>
  1680. <xs:any namespace='##other' minOccurs='0' maxOccurs='1'/>
  1681. </xs:sequence>
  1682. </xs:complexType>
  1683. <xs:simpleType name='empty'>
  1684. <xs:restriction base='xs:string'>
  1685. <xs:enumeration value=''/>
  1686. </xs:restriction>
  1687. </xs:simpleType>
  1688. </xs:schema>
  1689. ]]></code>
  1690. </section2>
  1691. <section2 topic='Jingle Errors' anchor='schema-errors'>
  1692. <code><![CDATA[
  1693. <?xml version='1.0' encoding='UTF-8'?>
  1694. <xs:schema
  1695. xmlns:xs=''
  1696. targetNamespace='urn:xmpp:jingle:errors:1'
  1697. xmlns='urn:xmpp:jingle:errors:1'
  1698. elementFormDefault='qualified'>
  1699. <xs:annotation>
  1700. <xs:documentation>
  1701. The protocol documented by this schema is defined in
  1702. XEP-0166:
  1703. </xs:documentation>
  1704. </xs:annotation>
  1705. <xs:element name='out-of-order' type='empty'/>
  1706. <xs:element name='tie-break' type='empty'/>
  1707. <xs:element name='unknown-session' type='empty'/>
  1708. <xs:element name='unsupported-info' type='empty'/>
  1709. <xs:simpleType name='empty'>
  1710. <xs:restriction base='xs:string'>
  1711. <xs:enumeration value=''/>
  1712. </xs:restriction>
  1713. </xs:simpleType>
  1714. </xs:schema>
  1715. ]]></code>
  1716. </section2>
  1717. </section1>
  1718. <section1 topic='History' anchor='history'>
  1719. <p>Until Jingle was developed, there existed no widely-adopted standard for initiating and managing peer-to-peer interactions between XMPP entities. Although several large service providers and Jabber client teams had written and implemented their own proprietary XMPP extensions for peer-to-peer signalling (usually only for voice), those technologies were not open and did not always take into account requirements to interoperate with SIP-based technologies. The only existing open protocol was &xep0111;, which made it possible to initiate and manage peer-to-peer sessions, but which did not provide enough of the key signalling semantics to be easily implemented in Jabber/XMPP clients. <note>It is true that TINS made it relatively easy to implement an XMPP-to-SIP gateway; however, in line with the long-time Jabber philosophy of "simple clients, complex servers", it would be better to force complexity onto the server-side gateway and to keep the client as simple as possible.</note></p>
  1720. <p>The result was an unfortunate fragmentation within the XMPP community regarding signalling protocols. Essentially, there were two possible approaches to solving the problem:</p>
  1721. <ol>
  1722. <li>Recommend that all client developers implement a dual-stack (XMPP + SIP) solution.</li>
  1723. <li>Define a full-featured protocol for XMPP signalling.</li>
  1724. </ol>
  1725. <p>Implementation experience indicates that a dual-stack approach might not be feasible on all the computing platforms for which Jabber clients have been written, or even desirable on platforms where it is feasible. <note>For example, one large ISP decided to switch to a pure XMPP approach after having implemented and deployed a dual-stack client for several years.</note> Therefore, it seemed reasonable to define an XMPP signalling protocol that could provide the necessary session management semantics while also making it relatively straightforward to interoperate with existing Internet standards.</p>
  1726. <p>As a result of feedback received on <cite>XEP-0111</cite>, the original authors of this document (Joe Hildebrand and Peter Saint-Andre) began to define such a signalling protocol, code-named Jingle. Upon communication with members of the Google Talk team, <note>Google Talk is an instant messaging and voice/video chat service and client provided by Google; see &lt;<link url=''></link>&gt;.</note> it was discovered that the emerging Jingle approach was conceptually (and even syntactically) quite similar to the signalling protocol used in the Google Talk application. Therefore, in the interest of interoperability and adoption, we decided to harmonize the two approaches. The signalling protocol specified herein is, therefore, substantially equivalent to the original Google Talk protocol, with several adjustments based on feedback received from implementors as well as for publication by the XMPP Standards Foundation.</p>
  1727. </section1>
  1728. <section1 topic='Acknowledgements' anchor='ack'>
  1729. <p>The authors would like to thank Rohan Mahy for his valuable input on early versions of the Jingle specifications. Thiago Camargo, Diana Cionoiu, Olivier Cr&#234;te, Dafydd Harries, Antti Ij&#228;s, Tim Julien, Lauri Kaila, Justin Karneges, Jussi Laako, Steffen Larsen, Marcus Lundblad, Dirk Meyer, Anthony Minessale, Akito Nozaki, Matt O'Gorman, Mike Ruprecht, Rob Taylor, Will Thompson, Matt Tucker, Justin Uberti, Saku Vainio, Unnikrishnan Vikrama Panicker, Brian West, Jeff Williams, and others have also provided helpful input. Thanks also to those who have commented on the &SSIG; and Jingle <note>Before this specification was formally accepted by the XMPP Standards Foundation as an XMPP Extension Protocol, it was discussed on the semi-private &lt;; mailing list. This list has since been resurrected as a special-purpose venue for discussion of Jingle protocols and implementation; interested developers can subscribe and access the archives at at &lt;<link url=''></link>&gt;.</note> mailing lists.</p>
  1730. </section1>
  1731. </xep>