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-0353.xml 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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 Message Initiation</title>
  10. <abstract>This specification provides a way for the initiator of a Jingle session to propose sending an invitation in an XMPP message stanza, thus taking advantage of message delivery semantics instead of sending IQ stanzas to all of the responder's online resources or choosing a particular online resource.</abstract>
  11. &LEGALNOTICE;
  12. <number>0353</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XEP-0166</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>jingle-message</shortname>
  23. &fippo;
  24. &stpeter;
  25. <revision>
  26. <version>0.3</version>
  27. <date>2017-09-11</date>
  28. <initials>XEP Editor (jwi)</initials>
  29. <remark>Defer due to lack of activity.</remark>
  30. </revision>
  31. <revision>
  32. <version>0.2.0</version>
  33. <date>2014-10-02</date>
  34. <initials>xd, XEP Editor: ssw</initials>
  35. <remark><p>Add explicit reject by responding to sender with reject message.</p></remark>
  36. </revision>
  37. <revision>
  38. <version>0.1</version>
  39. <date>2014-10-02</date>
  40. <initials>XEP Editor (mam)</initials>
  41. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.0.2</version>
  45. <date>2014-08-28</date>
  46. <initials>psa/ph</initials>
  47. <remark><p>Added explanatory text; defined more granular actions (propose, retract, accept, reject, proceed); mandated inclusion of description elements within the propose element, as in jingle-pub; defined schema.</p></remark>
  48. </revision>
  49. <revision>
  50. <version>0.0.1</version>
  51. <date>2014-07-15</date>
  52. <initials>ph</initials>
  53. <remark><p>First draft.</p></remark>
  54. </revision>
  55. </header>
  56. <section1 topic='Introduction' anchor='intro'>
  57. <p>Because &xep0166; uses &IQ; stanzas for all interactions between the parties to a session, when sending an invitation the initiator needs to either pick one of the responder's resources (e.g., based on &xep0115; information) or send the invitation to all of the responder's resources that support Jingle. The first method is prone to error (e.g., in cases where more than one resource supports Jingle) and the second method requires sending a separate invitation to each resource. Neither of these is ideal. Although &xep0276; proposed a way to overcome the problem, it too has issues (e.g., dependency on a presence service and the need to reveal all supported XMPP features) and in any case has not been widely implemented.</p>
  58. <p>This document proposes an alternative solution: exchanging a &MESSAGE; stanza before sending the Jingle invitation in an &IQ; stanza. (Indeed, in the early discussions leading up to the Jingle protocol the authors considered using &MESSAGE; stanzas instead of &IQ; stanzas, but chose the latter for their deterministic handling semantics.) This method effectively results in a kind of decloaking for Jingle purposes.</p>
  59. </section1>
  60. <section1 topic='Requirements' anchor='reqs'>
  61. <p>This protocol was designed with the following requirements in mind:</p>
  62. <ul>
  63. <li>Allow responder to choose the resource or device on which to take the call.</li>
  64. <li>Result in "ring-on-all-devices" behavior.</li>
  65. <li>Not rely on presence.</li>
  66. <li>Make use of "forking" semantics for message stanzas.</li>
  67. <li>Allow indication of session content.</li>
  68. <li>Work with push notifications.</li>
  69. </ul>
  70. </section1>
  71. <section1 topic='Use Cases' anchor='usecases'>
  72. <section2 topic='Indicating Intent to Start a Session' anchor='intent'>
  73. <p>In order to prepare for sending a Jingle invitation, the initiator (e.g., Romeo) sends a &MESSAGE; stanza containing a &lt;propose/&gt; element qualified by the 'urn:xmpp:jingle-message:0' namespace. The &lt;propose/&gt; element MUST possess an 'id' attribute that will be used for the session invitation and MUST contain one &lt;description/&gt; element for each media type associated with the intended session.</p>
  74. <example caption="Initiator Sends Intent Message"><![CDATA[
  75. <message from='romeo@montague.example/orchard'
  76. to='juliet@capulet.example'>
  77. <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'>
  78. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/>
  79. </propose>
  80. </message>
  81. ]]></example>
  82. <p>The server of the responder (e.g., Juliet) distributes this message stanza to all of Juliet's available resources (and to push resources as appropriate). Those devices might start ringing as a result.</p>
  83. <example caption="Responder's Server Distributes Intent Message"><![CDATA[
  84. <!-- delivered to juliet@capulet.example/desktop -->
  85. <message from='romeo@montague.example/orchard'
  86. to='juliet@capulet.example'>
  87. <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'>
  88. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/>
  89. </propose>
  90. </message>
  91. <!-- delivered to juliet@capulet.example/tablet -->
  92. <message from='romeo@montague.example/orchard'
  93. to='juliet@capulet.example'>
  94. <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'>
  95. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/>
  96. </propose>
  97. </message>
  98. <!-- delivered to juliet@capulet.example/phone -->
  99. <message from='romeo@montague.example/orchard'
  100. to='juliet@capulet.example'>
  101. <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'>
  102. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/>
  103. </propose>
  104. </message>
  105. ]]></example>
  106. <p>Consistent with the recommendation for one-to-one chat sessions in Section 5.1 of &rfc6121;, the initiator SHOULD also send directed presence to the responder if the two entities do not already share presence information; including Entity Capabilities (XEP-0115) information in this directed presence stanza enables the responder to know the availability of the initiator (e.g., in case the message is actually delivered quite a bit later because it is saved to offline storage) and also to know the XMPP feautures supported by the initiator.</p>
  107. <example caption="Initiator Sends Directed Presence"><![CDATA[
  108. <presence to='romeo@montague.example/orchard'
  109. from='juliet@capulet.example'>
  110. <c xmlns='http://jabber.org/protocol/caps'
  111. hash='sha-1'
  112. node='http://psi-im.org'
  113. ver='q07IKJEyjvHSyhy//CH0CxmKi8w='/>
  114. </presence>
  115. ]]></example>
  116. </section2>
  117. <section2 topic='Disavowing Intent to Start a Session' anchor='retract'>
  118. <p>It can happen that the initiator might want to disavow intent to send a session invitation (e.g., because the initiator has accepted another session). The initiator can do so by sending a message stanza containing a &lt;retract/&gt; element specifying the same session ID.</p>
  119. <example caption="Initiator Sends Stop Message"><![CDATA[
  120. <message from='romeo@montague.example/orchard'
  121. to='juliet@capulet.example'>
  122. <retract xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  123. </message>
  124. ]]></example>
  125. </section2>
  126. <section2 topic='Accepting Intent to Start a Session' anchor='accept'>
  127. <p>Upon receiving the intent message, the responder's various devices will "ring" and the responder will answer the call on a particular device. Here we assume that since this is an audio-only call, Juliet chooses to take the call on the device associated with her "phone" resource.</p>
  128. <p>As a first step, her "phone" resource informs all of her resources about accepting the call by sending a message to her own bare JID containing an &lt;accept/&gt; element specifying the session ID of the original &lt;propose/&gt; message.</p>
  129. <example caption="One of Responder's Resources Accepts the Call"><![CDATA[
  130. <message from='juliet@capulet.example/phone'
  131. to='juliet@capulet.example'>
  132. <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  133. </message>
  134. ]]></example>
  135. <p>Juliet's server broadcasts this accept message to all of her available resources (as described in RFC 6121), which stop ringing:</p>
  136. <example caption="Responder's Server Delivers Accept Message"><![CDATA[
  137. <!-- delivered to juliet@capulet.example/desktop -->
  138. <message from='juliet@capulet.example/phone'
  139. to='juliet@capulet.example'>
  140. <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  141. </message>
  142. <!-- delivered to juliet@capulet.example/tablet -->
  143. <message from='juliet@capulet.example/phone'
  144. to='juliet@capulet.example'>
  145. <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  146. </message>
  147. <!-- delivered to juliet@capulet.example/phone -->
  148. <message from='juliet@capulet.example/phone'
  149. to='juliet@capulet.example'>
  150. <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  151. </message>
  152. ]]></example>
  153. <p>Next, the device from which Juliet accepted the call tells Romeo to proceed with the session (via a message stanza containing a &lt;proceed/&gt; element), and also sends directed presence for the reasons described above.</p>
  154. <example caption="Responder Sends Directed Presence and Start Message"><![CDATA[
  155. <message from='juliet@capulet.example/phone'
  156. to='romeo@montague.example/orchard'>
  157. <proceed xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  158. </message>
  159. <presence from='juliet@capulet.example/phone'
  160. to='romeo@montague.example/orchard'>
  161. <c xmlns='http://jabber.org/protocol/caps'
  162. hash='sha-1'
  163. node='http://code.google.com/p/exodus'
  164. ver='QgayPKawpkPSDYmwT/WM94uAlu0='/>
  165. </presence>
  166. ]]></example>
  167. </section2>
  168. <section2 topic='Rejecting Intent to Start a Session' anchor='reject'>
  169. <p>Instead of accepting the call, the responder might want to ignore the call and tell all of her devices to stop ringing (e.g., perhaps because Romeo is getting to be a bit of a nuisance). She does this by rejecting the call on one of her devices and having that device tell all of the other devices to stop ringing, in the form of a message to her own bare JID containing an &lt;reject/&gt; element specifying the session ID of the original &lt;propose/&gt; message.</p>
  170. <example caption="One of Responder's Resources Rejects the Call"><![CDATA[
  171. <message from='juliet@capulet.example/tablet'
  172. to='juliet@capulet.example'>
  173. <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  174. </message>
  175. ]]></example>
  176. <p>Juliet's server broadcasts this reject message to all of her available resources (as described in RFC 6121), which stop ringing:</p>
  177. <example caption="Responder's Server Delivers Reject Message"><![CDATA[
  178. <!-- delivered to juliet@capulet.example/desktop -->
  179. <message from='juliet@capulet.example/tablet'
  180. to='juliet@capulet.example'>
  181. <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  182. </message>
  183. <!-- delivered to juliet@capulet.example/tablet -->
  184. <message from='juliet@capulet.example/tablet'
  185. to='juliet@capulet.example'>
  186. <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  187. </message>
  188. <!-- delivered to juliet@capulet.example/phone -->
  189. <message from='juliet@capulet.example/tablet'
  190. to='juliet@capulet.example'>
  191. <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  192. </message>
  193. ]]></example>
  194. <p>Next, the responder MAY want to decline the call explicitly, in the form of a message to the sender’s full JID containing a &lt;reject/&gt; element specifying the session ID of the original &lt;propose/&gt; message.</p>
  195. <example caption="Responder Rejects the Call Explicitly to the Sender"><![CDATA[
  196. <message from='juliet@capulet.example/tablet'
  197. to='romeo@montague.example/orchard'>
  198. <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/>
  199. </message>
  200. ]]></example>
  201. </section2>
  202. <section2 topic='Initiating the Jingle Session' anchor='initiate'>
  203. <p>Now Romeo actually initiates the session (segue to Jingle itself).</p>
  204. <example caption="Initiation"><![CDATA[
  205. <iq from='romeo@montague.example/orchard'
  206. id='ih28sx61'
  207. to='juliet@capulet.example/phone'
  208. type='set'>
  209. <jingle xmlns='urn:xmpp:jingle:1'
  210. action='session-initiate'
  211. initiator='romeo@montague.example/orchard'
  212. sid='a73sjjvkla37jfea'>
  213. <content creator='initiator' name='voice'>
  214. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  215. <payload-type id='96' name='speex' clockrate='16000'/>
  216. <payload-type id='97' name='speex' clockrate='8000'/>
  217. <payload-type id='18' name='G729'/>
  218. <payload-type id='0' name='PCMU'/>
  219. <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
  220. <payload-type id='98' name='x-ISAC' clockrate='8000'/>
  221. </description>
  222. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'
  223. pwd='asd88fgpdd777uzjYhagZg'
  224. ufrag='8hhy'>
  225. <candidate component='1'
  226. foundation='1'
  227. generation='0'
  228. id='el0747fg11'
  229. ip='10.0.1.1'
  230. network='1'
  231. port='8998'
  232. priority='2130706431'
  233. protocol='udp'
  234. type='host'/>
  235. <candidate component='1'
  236. foundation='2'
  237. generation='0'
  238. id='y3s2b30v3r'
  239. ip='192.0.2.3'
  240. network='1'
  241. port='45664'
  242. priority='1694498815'
  243. protocol='udp'
  244. rel-addr='10.0.1.1'
  245. rel-port='8998'
  246. type='srflx'/>
  247. </transport>
  248. </content>
  249. </jingle>
  250. </iq>
  251. ]]></example>
  252. </section2>
  253. </section1>
  254. <section1 topic='Open Issues' anchor='issues'>
  255. <p>The following issues remain to be closed:</p>
  256. <ul>
  257. <li>Specify how this works (if at all) with resource locking.</li>
  258. <li>Specify if and how to use messages of type 'headline'.</li>
  259. </ul>
  260. </section1>
  261. <section1 topic='Acknowledgements' anchor='acks'>
  262. <p>Thanks to Lance Stout for his feedback.</p>
  263. </section1>
  264. <section1 topic='Security Considerations' anchor='security'>
  265. <p>Because exchanging messages with other entities is effectively is a presence leak, an XMPP client that implements the receiving side of this specification MUST disable sending of proceed messages by default and MUST enable the feature only as a result of explicit user confirmation. Such confirmation can be provided per request, by whitelisting requests received from Jingle initiators in the responder's contact list, or through some other suitable means as long as sending proceed messages does not occur by default.</p>
  266. </section1>
  267. <section1 topic='IANA Considerations' anchor='iana'>
  268. <p>This document requires no interaction with &IANA;.</p>
  269. </section1>
  270. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  271. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  272. <p>This specification defines the following XML namespace:</p>
  273. <ul>
  274. <li>urn:xmpp:jingle:jingle-message:0</li>
  275. </ul>
  276. <p>The &REGISTRAR; includes the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  277. </section2>
  278. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  279. &NSVER;
  280. </section2>
  281. </section1>
  282. <section1 topic='XML Schema' anchor='schema'>
  283. <code><![CDATA[
  284. <?xml version='1.0' encoding='UTF-8'?>
  285. <xs:schema
  286. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  287. xmlns:xml='http://www.w3.org/XML/1998/namespace'
  288. targetNamespace='urn:xmpp:jingle-message:0'
  289. xmlns='urn:xmpp:jingle-message:0'
  290. elementFormDefault='qualified'>
  291. <xs:element name='accept'>
  292. <xs:complexType>
  293. <xs:simpleContent>
  294. <xs:extension base='empty'>
  295. <xs:attribute name='id' type='xs:string' use='required'/>
  296. </xs:extension>
  297. </xs:simpleContent>
  298. </xs:complexType>
  299. </xs:element>
  300. <xs:element name='proceed'>
  301. <xs:complexType>
  302. <xs:simpleContent>
  303. <xs:extension base='empty'>
  304. <xs:attribute name='id' type='xs:string' use='required'/>
  305. </xs:extension>
  306. </xs:simpleContent>
  307. </xs:complexType>
  308. </xs:element>
  309. <xs:element name='propose'>
  310. <xs:complexType>
  311. <xs:sequence>
  312. <xs:any namespace='##other' minOccurs='1' maxOccurs='unbounded'/>
  313. </xs:sequence>
  314. <xs:attribute name='id' type='xs:string' use='required'/>
  315. </xs:complexType>
  316. </xs:element>
  317. <xs:element name='reject'>
  318. <xs:complexType>
  319. <xs:simpleContent>
  320. <xs:extension base='empty'>
  321. <xs:attribute name='id' type='xs:string' use='required'/>
  322. </xs:extension>
  323. </xs:simpleContent>
  324. </xs:complexType>
  325. </xs:element>
  326. <xs:element name='retract'>
  327. <xs:complexType>
  328. <xs:simpleContent>
  329. <xs:extension base='empty'>
  330. <xs:attribute name='id' type='xs:string' use='required'/>
  331. </xs:extension>
  332. </xs:simpleContent>
  333. </xs:complexType>
  334. </xs:element>
  335. </xs:schema>
  336. ]]></code>
  337. </section1>
  338. </xep>