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-0342.xml 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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>Rayo Fax</title>
  10. <abstract>This specification defines an extension to the Rayo protocol (XEP-0327) to provide provision for sending and receiving faxcimilies via a call under the control of a Rayo client.</abstract>
  11. &LEGALNOTICE;
  12. <number>0342</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0327 Rayo</spec>
  20. <spec>XEP-0341 Rayo CPA</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>NOT_YET_ASSIGNED</shortname>
  25. <author>
  26. <firstname>Ben</firstname>
  27. <surname>Langfeld</surname>
  28. <email>ben@langfeld.me</email>
  29. <jid>ben@langfeld.me</jid>
  30. <uri>http://langfeld.me</uri>
  31. </author>
  32. <revision>
  33. <version>0.3</version>
  34. <date>2017-09-11</date>
  35. <initials>XEP Editor (jwi)</initials>
  36. <remark>Defer due to lack of activity.</remark>
  37. </revision>
  38. <revision>
  39. <version>0.2</version>
  40. <date>2014-03-13</date>
  41. <initials>bl</initials>
  42. <remark><p>Specify dependencies correctly; clearer wording on security considerations; proper linking.</p></remark>
  43. </revision>
  44. <revision>
  45. <version>0.1</version>
  46. <date>2014-01-14</date>
  47. <initials>psa</initials>
  48. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  49. </revision>
  50. <revision>
  51. <version>0.0.1</version>
  52. <date>2013-10-02</date>
  53. <initials>bl</initials>
  54. <remark><p>First draft.</p></remark>
  55. </revision>
  56. </header>
  57. <section1 topic='Introduction' anchor='intro'>
  58. <p>Rayo allows for the third-party control of media sessions such as telephone calls. A common requirement in telephony applications providing backward compatability with legacy systems is to support sending and receiving faxes. This specification extends the core Rayo specification, to describe a protocol for this use case.</p>
  59. </section1>
  60. <section1 topic='Session Flow' anchor='session'>
  61. <p>This section describes the form, function and order of Rayo stanzas sent across the wire, and the circumstances in which they apply and/or may arise.</p>
  62. <section2 topic='Receiving Faxes' anchor='session-receiving'>
  63. <p>A Rayo client may utilise <link url=''>Rayo CPA</link> to establish a fax CNG tone before initiating fax receipt using the receivefax component described below.</p>
  64. <p>The receivefax component accepts a fax from a caller, stores it, and makes it available to Rayo clients. The component is created using a <link url='#def-receivefax'>&lt;receivefax/&gt; command</link>.</p>
  65. <example caption='Client receives a fax'><![CDATA[
  66. <iq from='juliet@capulet.lit/balcony'
  67. to='9f00061@call.shakespeare.lit'
  68. type='set'
  69. id='h7ed2'>
  70. <receivefax xmlns='urn:xmpp:rayo:fax:1'/>
  71. </iq>
  72. ]]></example>
  73. <p>The server MUST validate that it has apropriate resources/mechanisms to receive the fax before acknowledging the component creation.</p>
  74. <section3 topic='Commands' anchor='session-receiving-commands'>
  75. <p>The receivefax component does not implement any intermediary commands.</p>
  76. </section3>
  77. <section3 topic='Events' anchor='session-receiving-events'>
  78. <p>The receivefax component does not provide any intermediate events.</p>
  79. </section3>
  80. <section3 topic='Completion' anchor='session-receiving-completion'>
  81. <p>The receivefax completion reason MUST be one of the <link url='#def-components-complete-reason'>core Rayo reasons</link> or <link url='#def-finish'>finish</link> (indicating that the document was fully received). Receivefax component completion provides a fax element only when a document was successfully received.</p>
  82. <p>The server MUST present the fax for consumption by the client by way of fax meta-data on the complete reason, including a URI at which the document may be fetched. It MUST provide url, resolution, file size &amp; page count data as specified on the <link url='#def-fax'>fax element</link>. In cases of partial receipt of a fax, a fax element MAY be returned in addition to the error completion reason.</p>
  83. <example caption="Component indicates it has completed due to being finished, providing the fax"><![CDATA[
  84. <presence from='9f00061@call.shakespeare.lit/eh3u28'
  85. to='juliet@capulet.lit/courtyard'
  86. type='unavailable'>
  87. <complete xmlns='urn:xmpp:rayo:ext:1'>
  88. <finish xmlns='urn:xmpp:rayo:fax:complete:1'/>
  89. <fax xmlns='urn:xmpp:rayo:fax:complete:1' url='http://shakespere.lit/faxes/fax1.tiff' resolution='595x841' size='12287492817' pages='3'/>
  90. <metadata xmlns='urn:xmpp:rayo:fax:complete:1' name="fax-transfer-rate" value="10000" />
  91. </complete>
  92. </presence>
  93. ]]></example>
  94. </section3>
  95. </section2>
  96. <section2 topic='Sending Faxes' anchor='session-receiving'>
  97. <p>Sending faxes can be achieved by using the Sendfax component. A conformant server MUST support image/tiff documents, and MAY also support others. A conformant server MUST support fetching documents via an HTTP URL and MAY support other URL schemes.</p>
  98. <example caption='Client sends a fax document to a call'><![CDATA[
  99. <iq from='juliet@capulet.lit/balcony'
  100. to='9f00061@call.shakespeare.lit'
  101. type='set'
  102. id='h7ed2'>
  103. <sendfax xmlns='urn:xmpp:rayo:fax:1'>
  104. <document xmlns='urn:xmpp:rayo:fax:1' url='http://shakespere.lit/my_fax.tiff'/>
  105. </sendfax>
  106. </iq>
  107. ]]></example>
  108. <p>Additionally, a sendfax component MAY include in its completion reason one or more <link url='#def-metadata'>&lt;metadata/&gt; elements</link> describing the result of transmitting the document, like so:</p>
  109. <example caption='Client finishes sending a fax document to a call'><![CDATA[
  110. <presence from='9f00061@call.shakespeare.lit/eh3u28'
  111. to='juliet@capulet.lit/courtyard'
  112. type='unavailable'>
  113. <complete xmlns='urn:xmpp:rayo:ext:1'>
  114. <finish xmlns='urn:xmpp:rayo:fax:complete:1'/>
  115. <metadata xmlns='urn:xmpp:rayo:fax:complete:1' name="fax-transfer-rate" value="10000" />
  116. </complete>
  117. </presence>
  118. ]]></example>
  119. </section2>
  120. </section1>
  121. <section1 topic='Formal Definition' anchor='def'>
  122. <section2 topic='Receivefax Element' anchor='def-receivefax'>
  123. <p>Instructs the server to begin receiving a fax.</p>
  124. <p>The &lt;receivefax/&gt; element MUST be empty.</p>
  125. <p>The &lt;receivefax/&gt; element has no attributes.</p>
  126. </section2>
  127. <section2 topic='Sendfax Element' anchor='def-sendfax'>
  128. <p>Instructs the server to begin transmitting a fax.</p>
  129. <p>The &lt;sendfax/&gt; element MUST be empty.</p>
  130. <p>The &lt;sendfax/&gt; element has no attributes.</p>
  131. </section2>
  132. <section2 topic='Fax Element' anchor='def-fax'>
  133. <p>Provides the result of a received fax, as a reference to its location.</p>
  134. <p>The &lt;fax/&gt; element MUST be empty.</p>
  135. <p>The attributes of the &lt;fax/&gt; element are as follows.</p>
  136. <table caption='Attributes of Fax Element'>
  137. <tr>
  138. <th>Attribute</th>
  139. <th>Definition</th>
  140. <th>Possible Values</th>
  141. <th>Inclusion</th>
  142. </tr>
  143. <tr>
  144. <td>url</td>
  145. <td>Indicates the URL at which the fax is made available.</td>
  146. <td>A valid URI.</td>
  147. <td>REQUIRED</td>
  148. </tr>
  149. <tr>
  150. <td>resolution</td>
  151. <td>Indicates the resolution of the received fax.</td>
  152. <td>A string in MxN format, where M and N are integers in pixels.</td>
  153. <td>REQUIRED</td>
  154. </tr>
  155. <tr>
  156. <td>pages</td>
  157. <td>Indicates the number of pages in the received fax.</td>
  158. <td>An integer.</td>
  159. <td>REQUIRED</td>
  160. </tr>
  161. <tr>
  162. <td>size</td>
  163. <td>Indicates the filesize of the received fax.</td>
  164. <td>A positive integer in bytes.</td>
  165. <td>REQUIRED</td>
  166. </tr>
  167. </table>
  168. </section2>
  169. <section2 topic='Document Element' anchor='def-document'>
  170. <p>Provides data for a document to be sent as a fax.</p>
  171. <p>The &lt;document/&gt; element MUST be empty.</p>
  172. <p>The attributes of the &lt;document/&gt; element are as follows.</p>
  173. <table caption='Attributes of Document Element'>
  174. <tr>
  175. <th>Attribute</th>
  176. <th>Definition</th>
  177. <th>Possible Values</th>
  178. <th>Inclusion</th>
  179. </tr>
  180. <tr>
  181. <td>url</td>
  182. <td>Indicates the URL at which the document to send is available.</td>
  183. <td>A valid URI.</td>
  184. <td>REQUIRED</td>
  185. </tr>
  186. <tr>
  187. <td>identity</td>
  188. <td>Indicates the identity from which the fax should appear to be sent.</td>
  189. <td>A phone number string in E.164 format.</td>
  190. <td>OPTIONAL</td>
  191. </tr>
  192. <tr>
  193. <td>header</td>
  194. <td>The header line to add to each page of the transmitted fax.</td>
  195. <td>A string.</td>
  196. <td>OPTIONAL</td>
  197. </tr>
  198. <tr>
  199. <td>pages</td>
  200. <td>The (set of) range of pages of the document to transmit.</td>
  201. <td>A string (or set of strings separated by ',') in the format M[-N], where M and N are integers and the dash and second integer are optional. The set is combinatory and dash-separated integers signify a range of pages. The index is one-based.</td>
  202. <td>OPTIONAL</td>
  203. </tr>
  204. </table>
  205. </section2>
  206. <section2 topic='Metadata Element' anchor='def-metadata'>
  207. <p>Provides implementation-specific key-value pairs of metadata regarding the transmission or receipt of a fax document.</p>
  208. <p>The &lt;metadata/&gt; element MUST be empty.</p>
  209. <p>The attributes of the &lt;metadata/&gt; element are as follows.</p>
  210. <table caption='Attributes of Metadata Element'>
  211. <tr>
  212. <th>Attribute</th>
  213. <th>Definition</th>
  214. <th>Inclusion</th>
  215. </tr>
  216. <tr>
  217. <td>name</td>
  218. <td>A token giving the name by which the metadata may be known.</td>
  219. <td>REQUIRED</td>
  220. </tr>
  221. <tr>
  222. <td>value</td>
  223. <td>The string value of the named metadata.</td>
  224. <td>REQUIRED</td>
  225. </tr>
  226. </table>
  227. </section2>
  228. <section2 topic='Finish Element' anchor='def-finish'>
  229. <p>Indicates that the component came to an end due to the document being received successfully.</p>
  230. <p>The &lt;finish/&gt; element MUST be empty.</p>
  231. <p>The &lt;finish/&gt; element has no attributes.</p>
  232. </section2>
  233. </section1>
  234. <section1 topic='Determining Support' anchor='support'>
  235. <p>If a Rayo server supports Rayo Fax, it MUST advertise that fact by returning a feature of "urn:xmpp:rayo:fax:1" &VNOTE; in response to a &xep0030; information request.</p>
  236. <example caption="Service Discovery Information Request - Client to Server"><![CDATA[
  237. <iq from='kingclaudius@shakespeare.lit/castle'
  238. id='disco1'
  239. to='call.rayo.org'
  240. type='get'>
  241. <query xmlns='http://jabber.org/protocol/disco#info'/>
  242. </iq>
  243. ]]></example>
  244. <example caption="Service Discovery Information Response - Client to Server"><![CDATA[
  245. <iq from='call.rayo.org'
  246. id='disco1'
  247. to='kingclaudius@shakespeare.lit/castle'
  248. type='result'>
  249. <query xmlns='http://jabber.org/protocol/disco#info'>
  250. <feature var='urn:xmpp:rayo:1'/>
  251. <feature var='urn:xmpp:rayo:fax:1'/>
  252. </query>
  253. </iq>
  254. ]]></example>
  255. <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>
  256. </section1>
  257. <section1 topic='Implementation Notes' anchor='impl'>
  258. <p>A server MUST document any cases where its behaviour differs from that in this specification (such as lack of support for particular options/components/etc) and return an error whenever a command is not understood. A server MUST NOT silently ignore any instructions.</p>
  259. </section1>
  260. <section1 topic='Security Considerations' anchor='security'>
  261. <p>This document introduces no additional security considerations above and beyond those defined in the documents on which it depends.</p>
  262. </section1>
  263. <section1 topic='IANA Considerations' anchor='iana'>
  264. <p>This document requires no interaction with &IANA;.</p>
  265. </section1>
  266. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  267. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  268. <p>This specification defines the following XML namespaces:</p>
  269. <ul>
  270. <li>urn:xmpp:rayo:fax:1</li>
  271. <li>urn:xmpp:rayo:fax:complete:1</li>
  272. </ul>
  273. <p>The &REGISTRAR; includes the foregoing namespaces in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
  274. </section2>
  275. <section2 topic='Namespace Versioning' anchor='registrar-versioning'>
  276. <p>If the protocol defined in this specification undergoes a major revision that is not fully backward-compatible with an older version, or that contains significant new features, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of <cite>XEP-0053</cite>.</p>
  277. </section2>
  278. </section1>
  279. <section1 topic='XML Schema' anchor='schema'>
  280. <section2 topic='Rayo Fax' anchor='schema-rayo-fax'>
  281. <code><![CDATA[
  282. <?xml version="1.0" encoding="UTF-8"?>
  283. <schema xmlns="http://www.w3.org/2001/XMLSchema"
  284. targetNamespace="urn:xmpp:rayo:fax:1"
  285. xmlns:tns="urn:xmpp:rayo:fax:1"
  286. elementFormDefault="qualified"
  287. xmlns:core="urn:xmpp:rayo:1">
  288. <annotation>
  289. <documentation>
  290. The protocol documented by this schema is defined at http://rayo.org/xep
  291. </documentation>
  292. </annotation>
  293. <!-- Fax receipt command -->
  294. <element name="receivefax" type="core:empty">
  295. <annotation>
  296. <documentation>
  297. Instructs the server to begin receiving a fax.
  298. </documentation>
  299. </annotation>
  300. </element>
  301. <!-- Fax transmission command -->
  302. <element name="sendfax" type="core:empty">
  303. <annotation>
  304. <documentation>
  305. Instructs the server to begin transmitting a fax.
  306. </documentation>
  307. </annotation>
  308. </element>
  309. <!-- Fax document data -->
  310. <element name="document" type="core:empty">
  311. <annotation>
  312. <documentation>
  313. Provides the result of a received fax, including a reference to its location.
  314. </documentation>
  315. </annotation>
  316. <attribute name="url" type="anyURI" use="required">
  317. <annotation>
  318. <documentation>
  319. Indicates the URL at which the document to send is available.
  320. </documentation>
  321. </annotation>
  322. </attribute>
  323. <attribute name="identity" type="string" use="optional">
  324. <annotation>
  325. <documentation>
  326. Indicates the identity from which the fax should appear to be sent.
  327. </documentation>
  328. </annotation>
  329. </attribute>
  330. <attribute name="header" type="string" use="optional">
  331. <annotation>
  332. <documentation>
  333. The header line to add to each page of the transmitted fax.
  334. </documentation>
  335. </annotation>
  336. </attribute>
  337. <attribute name="pages" type="string" use="optional">
  338. <annotation>
  339. <documentation>
  340. A string (or set of strings separated by ',') in the format M[-N], where M and N are integers and the dash and second integer are optional. The set is combinatory and dash-separated integers signify a range of pages. The index is one-based.
  341. </documentation>
  342. </annotation>
  343. </attribute>
  344. </element>
  345. </schema>
  346. ]]></code>
  347. </section2>
  348. <section2 topic='Rayo Fax Complete' anchor='schema-fax-complete'>
  349. <code><![CDATA[
  350. <?xml version="1.0" encoding="UTF-8"?>
  351. <schema xmlns="http://www.w3.org/2001/XMLSchema"
  352. targetNamespace="urn:xmpp:rayo:fax:complete:1"
  353. xmlns:tns="urn:xmpp:rayo:fax:complete:1"
  354. elementFormDefault="qualified"
  355. xmlns:core="urn:xmpp:rayo:1">
  356. <annotation>
  357. <documentation>
  358. The protocol documented by this schema is defined at http://rayo.org/xep
  359. </documentation>
  360. </annotation>
  361. <!-- Received Fax data -->
  362. <element name="fax" type="core:empty">
  363. <annotation>
  364. <documentation>
  365. Provides the result of a received fax, including a reference to its location.
  366. </documentation>
  367. </annotation>
  368. <attribute name="url" type="anyURI" use="required">
  369. <annotation>
  370. <documentation>
  371. Indicates the URL at which the fax is made available.
  372. </documentation>
  373. </annotation>
  374. </attribute>
  375. <attribute name="resolution" type="string" use="required">
  376. <annotation>
  377. <documentation>
  378. Indicates the resolution of the received fax in MxN format, where M and N are integers in pixels.
  379. </documentation>
  380. </annotation>
  381. </attribute>
  382. <attribute name="pages" type="nonNegativeInteger" use="required">
  383. <annotation>
  384. <documentation>
  385. Indicates the number of pages in the received fax.
  386. </documentation>
  387. </annotation>
  388. </attribute>
  389. <attribute name="size" type="long" use="required">
  390. <annotation>
  391. <documentation>
  392. Indicates the filesize (in bytes) of the received fax.
  393. </documentation>
  394. </annotation>
  395. </attribute>
  396. </element>
  397. <complexType name="metadataType">
  398. <attribute name="name" type="token" use="required">
  399. <annotation>
  400. <documentation>
  401. A token giving the name by which the metadata may be known.
  402. </documentation>
  403. </annotation>
  404. </attribute>
  405. <attribute name="value" type="string" use="required">
  406. <annotation>
  407. <documentation>
  408. The string value of the named metadata.
  409. </documentation>
  410. </annotation>
  411. </attribute>
  412. </complexType>
  413. <!-- Finish reason -->
  414. <element name="finish" type="core:empty">
  415. <annotation>
  416. <documentation>
  417. Indicates that the component came to an end due to the document being received successfully.
  418. </documentation>
  419. </annotation>
  420. </element>
  421. </schema>
  422. ]]></code>
  423. </section2>
  424. </section1>
  425. <section1 topic='Acknowledgements' anchor='acknowledgements'>
  426. <p>The authors would like to acknowledge the input of teams at Mojo Lingo and Grasshopper in the development of this specification.</p>
  427. <p>Specific individuals who have contributed to the specification or to software significant to its completion include:</p>
  428. <ul>
  429. <li>Ben Langfeld</li>
  430. <li>Chris Rienzo</li>
  431. </ul>
  432. </section1>
  433. </xep>