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-0358.xml 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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>Publishing Available Jingle Sessions</title>
  10. <abstract>This specification defines an XMPP protocol extension that enables an XMPP entity to advertise the fact that it is willing accept a particular Jingle session request. The protocol is used mainly to inform other entities that a particular file is available for transfer via the Jingle File Transfer protocol defined in XEP-0234.</abstract>
  11. &LEGALNOTICE;
  12. <number>0358</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XEP-0030</spec>
  19. <spec>XEP-0234</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>jinglepub</shortname>
  24. &fippo;
  25. &lance;
  26. &stpeter;
  27. <revision>
  28. <version>0.4</version>
  29. <date>2017-09-11</date>
  30. <initials>XEP Editor (jwi)</initials>
  31. <remark>Defer due to lack of activity.</remark>
  32. </revision>
  33. <revision>
  34. <version>0.3</version>
  35. <date>2016-05-24</date>
  36. <initials>fs</initials>
  37. <remark><p>Add Jingle query type and XMPP registrar submission.</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.2</version>
  41. <date>2015-08-11</date>
  42. <initials>ls</initials>
  43. <remark><p>Add &lt;uri/&gt; element.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.1</version>
  47. <date>2015-06-29</date>
  48. <initials>XEP Editor (psa)</initials>
  49. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>0.0.2</version>
  53. <date>2014-08-12</date>
  54. <initials>ls/psa/ph</initials>
  55. <remark>
  56. <ul>
  57. <li>Changed payload to use one or more Jingle &lt;description/&gt; elements (this provides support for content with multiple media types, such as audio+video).</li>
  58. <li>Removed 'app' attribute, since we include the application-format description as a child element.</li>
  59. <li>Removed 'mime-type' attribute, since it can be signalled in the application-format description if needed.</li>
  60. <li>Added &lt;meta/&gt; element to provide human-friendly information about the session.</li>
  61. <li>Incremented the protocol version number from 0 to 1.</li>
  62. </ul>
  63. </remark>
  64. </revision>
  65. <revision>
  66. <version>0.0.1</version>
  67. <date>2014-07-30</date>
  68. <initials>ph/ls/psa</initials>
  69. <remark>First draft.</remark>
  70. </revision>
  71. </header>
  72. <section1 topic='Introduction' anchor='intro'>
  73. <p>This document defines a way for an entity that can initiate a &xep0166; session (often for the purpose of file transfer as specified in &xep0234;) to advertise that session, thus enabling a receiver to then request initiation of the session by the sender. In essence, this document defines the Jingle equivalent of &xep0137; (previously defined for &xep0095;).</p>
  74. </section1>
  75. <section1 topic='Use Cases' anchor='usecase'>
  76. <section2 topic='Publishing a Jingle Session Request' anchor='usecase.publish'>
  77. <p>A session owner uses the &lt;jinglepub/&gt; element to announce that it can initiate a specific Jingle session request. This element can be sent to a publish-subscribe node (see &xep0060; and &xep0163;), or sent directly to potential recipients within a &MESSAGE; stanza.</p>
  78. <p>The format of the &lt;jinglepub/&gt; element is as follows:</p>
  79. <example caption='Sample &lt;jinglepub/&gt;'><![CDATA[
  80. <jinglepub xmlns='urn:xmpp:jinglepub:1'
  81. from='sender-jid'
  82. id='someid'>
  83. [<uri/> element for an alternate or informational URI of the content]
  84. [<meta/> element(s) for human-friendly information]
  85. [<description/> element(s) for application format(s)]
  86. </jinglepub>
  87. ]]></example>
  88. <p>The 'from' attribute MUST be present and MUST be the valid JID for the session owner.</p>
  89. <p>The 'id' attribute is an opaque identifier, called the "jinglepub identifier". This attribute MUST be present, and MUST be a valid non-empty string. It uniquely identifies the published request at the session owner's JID.</p>
  90. <p>The &lt;jinglepub/&gt; element MUST contain a &lt;description/&gt; element qualified by the namespace of the relevant Jingle application format (e.g., &lt;description xmlns='urn:xmpp:jingle:apps:file-transfer:4'/&gt; for file transfer).</p>
  91. <p>The &lt;jinglepub/&gt; element MAY contain one or more &lt;meta/&gt; elements qualified by the jingle-pub namespace; if more than one element is included, each element MUST have a different value for the 'xml:lang' attribute.</p>
  92. <p>The &lt;jinglepub/&gt; element MAY contain a &lt;uri/&gt; element which contains a URI for an alternative way to access the content, or other information about the content. The resource provided by the URI SHOULD be meaningful for clients that do not directly support the included Jingle content definitions, and accessing the URI MAY result in a different experience than initiating the published Jingle session. For example, the URI could be to a content landing page of an image hosting service from which an image could be viewed instead of directly downloading the image file.</p>
  93. <p>The &lt;jinglepub/&gt; information is typically provided via pubsub.</p>
  94. <p>The following example shows a possible payload for streaming of recorded audio/video sessions, here pushed out via PEP.</p>
  95. <example caption='Sender advertises session via PEP'><![CDATA[
  96. <iq from='bard@shakespeare.lit/globe' id='yhe51f39' type='set'>
  97. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  98. <publish node='scenes'>
  99. <jinglepub xmlns='urn:xmpp:jinglepub:1'
  100. from='bard@shakespeare.lit'
  101. id='9559976B-3FBF-4E7E-B457-2DAA225972BB'>
  102. <meta xml:lang='en'
  103. title='Act III, Scene I of Hamlet'
  104. summary='High-definition audio and video recording
  105. for Act III, Scene I of Hamlet, captured
  106. last week at the Globe Theatre, London.'/>
  107. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  108. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  109. </jinglepub>
  110. </publish>
  111. </pubsub>
  112. </iq>
  113. ]]></example>
  114. <example caption='Pubsub service pushes announcement to all subscribers'><![CDATA[
  115. <message from='bard@shakespeare.lit' to='juliet@capulet.com/balcony'>
  116. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  117. <items node='scenes'>
  118. <item id='current'>
  119. <jinglepub xmlns='urn:xmpp:jinglepub:1'
  120. from='bard@shakespeare.lit'
  121. id='9559976B-3FBF-4E7E-B457-2DAA225972BB'>
  122. <meta xml:lang='en'
  123. title='Act III, Scene I of Hamlet'
  124. summary='High-definition audio and video recording
  125. for Act III, Scene I of Hamlet, captured
  126. last week at the Globe Theatre, London.'/>
  127. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  128. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  129. </jinglepub>
  130. </item>
  131. </items>
  132. </event>
  133. </message>
  134. ]]></example>
  135. <p>The &lt;jinglepub/&gt; element MAY also be included directly within a &MESSAGE; stanza sent to another entity (or multiple entities, e.g., in &xep0045;). This can be especially useful for informing an offline entity about an available stream.</p>
  136. <example caption='Advertising a stream in a message stanza'><![CDATA[
  137. <message from='romeo@montague.net/pda' to='juliet@capulet.com'>
  138. <jinglepub xmlns='urn:xmpp:jinglepub:1'
  139. id='9559976B-3FBF-4E7E-B457-2DAA225972BB'>
  140. <meta xml:lang='en'
  141. title='Act III, Scene I of Hamlet'
  142. summary='High-definition audio and video recording
  143. for Act III, Scene I of Hamlet, captured
  144. last week at the Globe Theatre, London.'/>
  145. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  146. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  147. </jinglepub>
  148. </message>
  149. ]]></example>
  150. </section2>
  151. <section2 topic='Triggering the Stream Initiation Request' anchor='usecase.trigger'>
  152. <p>In general, the process to trigger a stream initiation request is as follows:</p>
  153. <code><![CDATA[
  154. Requester Publisher
  155. | |
  156. | <start/> |
  157. |-------------------------->|
  158. | <starting/> |
  159. |<--------------------------|
  160. | session-initiate |
  161. |<--------------------------|
  162. | [further jingle |
  163. | negotiation] |
  164. |<------------------------->|
  165. | |]]></code>
  166. <p>A potential receiver requests initiation of the session by sending an IQ-get to the sender, using the &lt;start xmlns='urn:xmpp:jinglepub:1'/&gt; element. This element contains the 'id' attribute to specify which published stream to retrieve:</p>
  167. <example caption='Receiver requests start of session'><![CDATA[
  168. <iq type='get'
  169. id='jinglepub-request-0'
  170. from='juliet@capulet.com/balcony'
  171. to='romeo@montague.net/pda'>
  172. <start xmlns='urn:xmpp:jinglepub:1'
  173. id='9559976B-3FBF-4E7E-B457-2DAA225972BB'/>
  174. </iq>
  175. ]]></example>
  176. <p>If the sender accepts the request, it responds with an IQ-result containing a &lt;starting/&gt; element. This element indicates the session identifier to be used:</p>
  177. <example caption='Sender accepts request to start session'><![CDATA[
  178. <iq type='result'
  179. id='jinglepub-request-0'
  180. from='romeo@montague.net/pda'
  181. to='juliet@capulet.com/balcony'>
  182. <starting xmlns='urn:xmpp:jinglepub:1'
  183. sid='851ba2'/>
  184. </iq>
  185. ]]></example>
  186. <p>Then the sender initiates the Jingle session:</p>
  187. <example caption='Sender starts negotiation'><![CDATA[
  188. <iq from='romeo@montague.lit/orchard'
  189. id='nzu25s8'
  190. to='juliet@capulet.lit/balcony'
  191. type='set'>
  192. <jingle xmlns='urn:xmpp:jingle:1'
  193. action='session-initiate'
  194. initiator='romeo@montague.lit/orchard'
  195. sid='851ba2'>
  196. <content creator='initiator' name='scene-audio'>
  197. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
  198. <payload-type id='101' name='opus' clockrate='48000'>
  199. <parameter name='stereo' value='1'/>
  200. <parameter name='sprop-stereo' value='1'/>
  201. </payload-type>
  202. <payload-type id='97' name='speex' clockrate='8000'/>
  203. <payload-type id='18' name='G729'/>
  204. </description>
  205. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'>
  206. <candidate component='1'
  207. foundation='1'
  208. generation='0'
  209. id='or2ii2syr1'
  210. ip='192.0.2.1'
  211. network='0'
  212. port='3478'
  213. priority='2130706431'
  214. protocol='udp'
  215. type='host'/>
  216. </transport>
  217. </content>
  218. <content creator='initiator' name='scene-video'>
  219. <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  220. <payload-type id='98' name='theora' clockrate='90000'>
  221. <parameter name='height' value='600'/>
  222. <parameter name='width' value='800'/>
  223. <parameter name='delivery-method' value='inline'/>
  224. <parameter name='configuration' value='somebase16string'/>
  225. <parameter name='sampling' value='YCbCr-4:2:2'/>
  226. </payload-type>
  227. <payload-type id='28' name='nv' clockrate='90000'/>
  228. <payload-type id='25' name='CelB' clockrate='90000'/>
  229. <payload-type id='32' name='MPV' clockrate='90000'/>
  230. <bandwidth type='AS'>128</bandwidth>
  231. </description>
  232. <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1'/>
  233. </content>
  234. </jingle>
  235. </iq>
  236. ]]></example>
  237. <p>If the requested identifier is not valid, the sender SHOULD respond with a &notacceptable; error:</p>
  238. <example caption='Sender denies because of invalid id'><![CDATA[
  239. <iq type='error'
  240. id='jinglepub-set-1'
  241. from='romeo@montague.net/pda'
  242. to='juliet@capulet.com/balcony'>
  243. <start xmlns='urn:xmpp:jinglepub:1'>9559976B-3FBF-4E7E-B457-2DAA225972BB</start>
  244. <error code='405' type='modify'>
  245. <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  246. </error>
  247. </iq>
  248. ]]></example>
  249. <p>If the receiver does not have permission to request the data stream, the sender SHOULD respond with a &forbidden; error:</p>
  250. <example caption='Sender denies because receiver is forbidden'><![CDATA[
  251. <iq type='error'
  252. id='jinglepub-set-1'
  253. from='romeo@montague.net/pda'
  254. to='juliet@capulet.com/balcony'>
  255. <start xmlns='urn:xmpp:jinglepub:1'>9559976B-3FBF-4E7E-B457-2DAA225972BB</start>
  256. <error code='403' type='auth'>
  257. <forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  258. </error>
  259. </iq>
  260. ]]></example>
  261. </section2>
  262. <section2 topic='Jingle Session XMPP URI/IRI Query Type' anchor='jingle-uri-query-types'>
  263. <p>This document defines the 'jingle' XMPP URI/IRI querytype,
  264. which MUST posses an 'id' key/value pair, whose value is the
  265. "jinglepub identifier".</p>
  266. <example caption='Jingle Action: IRI/URI'><![CDATA[
  267. xmpp:files.montague.net?jingle;id=9559976B-3FBF-4E7E-B457-2DAA225972BB]]></example>
  268. <p>The information found in such an URI, an XMPP address and a
  269. "jinglepub identifier", can be used to trigger an an Jingle
  270. session initation request as specified in <cite>§ 2.2</cite>. This
  271. Jingle session can be used to transfer files (&xep0234;), audio
  272. and video streams (&xep0167;) and other Jingle application
  273. formats.</p>
  274. </section2>
  275. </section1>
  276. <section1 topic='Security Considerations' anchor='security'>
  277. <p>This document introduces no security concerns beyond those specified in <cite>XEP-0060</cite> and the relevant Jingle application format in use.</p>
  278. </section1>
  279. <section1 topic='IANA Considerations' anchor='iana'>
  280. <p>This document requires no interaction with &IANA;.</p>
  281. </section1>
  282. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  283. <section2 topic='Protocol Namespaces' anchor='registrar.namespaces'>
  284. <p>The &REGISTRAR; will be requested to include 'urn:xmpp:jinglepub:1' in its registry of protocol namespaces.</p>
  285. </section2>
  286. <section2 topic='XMPP URI/IRI Querytype registration' anchor='uri-iri-registration'>
  287. <p>As authorized by &xep0147;, the XMPP Registrar maintains a
  288. registry of queries and key-value pairs for use in XMPP URIs (see
  289. &QUERYTYPES;).The following submission registers the 'jingle'
  290. querytype.</p>
  291. <code><![CDATA[
  292. <querytype>
  293. <name>jingle</name>
  294. <proto>urn:xmpp:jinglepub:1</proto>
  295. <desc>enables retrieving Jingle sessions (file transfer, etc.)</desc>
  296. <doc>XEP-0358</doc>
  297. <keys/>
  298. <key>
  299. <name>id</name>
  300. <desc>The 'jinglepub' identifier</desc>
  301. </key>
  302. <keys/>
  303. </querytype>]]></code>
  304. </section2>
  305. </section1>
  306. <section1 topic='XML Schema' anchor='schema'>
  307. <code><![CDATA[
  308. <?xml version='1.0' encoding='UTF-8'?>
  309. <xs:schema
  310. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  311. xmlns:xml='http://www.w3.org/XML/1998/namespace'
  312. targetNamespace='urn:xmpp:jinglepub:1'
  313. xmlns='urn:xmpp:jinglepub:1'
  314. elementFormDefault='qualified'>
  315. <xs:element name='jinglepub'>
  316. <xs:complexType>
  317. <xs:all>
  318. <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
  319. <xs:element name='meta' type='metaElementType' minOccurs='0' maxOccurs='unbounded' />
  320. <xs:element name='uri' type='xs:anyURI' minOccurs='0' maxOccurs='1' />
  321. </xs:all>
  322. <xs:attribute name='description' type='xs:string' use='optional'/>
  323. <xs:attribute name='from' type='xs:string' use='required'/>
  324. <xs:attribute name='id' type='xs:string' use='required'/>
  325. <xs:attribute name='title' type='xs:string' use='optional'/>
  326. </xs:complexType>
  327. </xs:element>
  328. <xs:complexType name='metaElementType'>
  329. <xs:simpleContent>
  330. <xs:extension base='empty'>
  331. <xs:attribute name='summary'
  332. type='xs:string'
  333. use='optional'/>
  334. <xs:attribute name='title'
  335. type='xs:string'
  336. use='required'/>
  337. <xs:attribute ref='xml:lang' use='optional'/>
  338. </xs:extension>
  339. </xs:simpleContent>
  340. </xs:complexType>
  341. <xs:element name='start'>
  342. <xs:complexType>
  343. <xs:attribute name='id' type='xs:string' use='required'/>
  344. </xs:complexType>
  345. </xs:element>
  346. <xs:element name='starting'>
  347. <xs:complexType>
  348. <xs:attribute name='sid' type='xs:string' use='required'/>
  349. </xs:complexType>
  350. </xs:element>
  351. </xs:schema>
  352. ]]></code>
  353. </section1>
  354. </xep>