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