XEP-0342: Rayo Fax

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.
Author
Ben Langfeld
Copyright
© 1999 – 2020 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Deferred

WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
Type
Standards Track
Version
0.3.1 (2018-11-03)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Draft
  5. Final

1. Introduction

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.

2. Session Flow

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.

2.1 Receiving Faxes

A Rayo client may utilise Rayo CPA to establish a fax CNG tone before initiating fax receipt using the receivefax component described below.

The receivefax component accepts a fax from a caller, stores it, and makes it available to Rayo clients. The component is created using a <receivefax/> command.

Example 1. Client receives a fax
<iq from='juliet@capulet.lit/balcony'
  to='9f00061@call.shakespeare.lit'
  type='set'
  id='h7ed2'>
  <receivefax xmlns='urn:xmpp:rayo:fax:1'/>
</iq>

The server MUST validate that it has apropriate resources/mechanisms to receive the fax before acknowledging the component creation.

2.1.1 Commands

The receivefax component does not implement any intermediary commands.

2.1.2 Events

The receivefax component does not provide any intermediate events.

2.1.3 Completion

The receivefax completion reason MUST be one of the core Rayo reasons or finish (indicating that the document was fully received). Receivefax component completion provides a fax element only when a document was successfully received.

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 fax element. In cases of partial receipt of a fax, a fax element MAY be returned in addition to the error completion reason.

Example 2. Component indicates it has completed due to being finished, providing the fax
<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>

2.2 Sending Faxes

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.

Example 3. Client sends a fax document to a call
<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>

Additionally, a sendfax component MAY include in its completion reason one or more <metadata/> elements describing the result of transmitting the document, like so:

Example 4. Client finishes sending a fax document to a call
<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>

3. Formal Definition

3.1 Receivefax Element

Instructs the server to begin receiving a fax.

The <receivefax/> element MUST be empty.

The <receivefax/> element has no attributes.

3.2 Sendfax Element

Instructs the server to begin transmitting a fax.

The <sendfax/> element MUST be empty.

The <sendfax/> element has no attributes.

3.3 Fax Element

Provides the result of a received fax, as a reference to its location.

The <fax/> element MUST be empty.

The attributes of the <fax/> element are as follows.

Table 1: Attributes of Fax Element
Attribute Definition Possible Values Inclusion
url Indicates the URL at which the fax is made available. A valid URI. REQUIRED
resolution Indicates the resolution of the received fax. A string in MxN format, where M and N are integers in pixels. REQUIRED
pages Indicates the number of pages in the received fax. An integer. REQUIRED
size Indicates the filesize of the received fax. A positive integer in bytes. REQUIRED

3.4 Document Element

Provides data for a document to be sent as a fax.

The <document/> element MUST be empty.

The attributes of the <document/> element are as follows.

Table 2: Attributes of Document Element
Attribute Definition Possible Values Inclusion
url Indicates the URL at which the document to send is available. A valid URI. REQUIRED
identity Indicates the identity from which the fax should appear to be sent. A phone number string in E.164 format. OPTIONAL
header The header line to add to each page of the transmitted fax. A string. OPTIONAL
pages The (set of) range of pages of the document to transmit. 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. OPTIONAL

3.5 Metadata Element

Provides implementation-specific key-value pairs of metadata regarding the transmission or receipt of a fax document.

The <metadata/> element MUST be empty.

The attributes of the <metadata/> element are as follows.

Table 3: Attributes of Metadata Element
Attribute Definition Inclusion
name A token giving the name by which the metadata may be known. REQUIRED
value The string value of the named metadata. REQUIRED

3.6 Finish Element

Indicates that the component came to an end due to the document being received successfully.

The <finish/> element MUST be empty.

The <finish/> element has no attributes.

4. Determining Support

If a Rayo server supports Rayo Fax, it MUST advertise that fact by returning a feature of "urn:xmpp:rayo:fax:1" (see Namespace Versioning regarding the possibility of incrementing the version number) in response to a Service Discovery (XEP-0030) [1] information request.

Example 5. Service Discovery Information Request - Client to Server
<iq from='kingclaudius@shakespeare.lit/castle'
    id='disco1'
    to='call.rayo.org'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 6. Service Discovery Information Response - Client to Server
<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>

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 Entity Capabilities (XEP-0115) [2]. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.

5. Implementation Notes

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.

6. Security Considerations

This document introduces no additional security considerations above and beyond those defined in the documents on which it depends.

7. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [3].

8. XMPP Registrar Considerations

8.1 Protocol Namespaces

This specification defines the following XML namespaces:

The XMPP Registrar [4] includes the foregoing namespaces in its registry at <https://xmpp.org/registrar/namespaces.html>, as governed by XMPP Registrar Function (XEP-0053) [5].

8.2 Namespace Versioning

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 XEP-0053.

9. XML Schema

9.1 Rayo Fax

<?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>

9.2 Rayo Fax Complete

<?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>

10. Acknowledgements

The authors would like to acknowledge the input of teams at Mojo Lingo and Grasshopper in the development of this specification.

Specific individuals who have contributed to the specification or to software significant to its completion include:


Appendices

Appendix A: Document Information

Series
XEP
Number
0342
Publisher
XMPP Standards Foundation
Status
Deferred
Type
Standards Track
Version
0.3.1
Last Updated
2018-11-03
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0327 Rayo, XEP-0341 Rayo CPA
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Ben Langfeld
Email
ben@langfeld.me
JabberID
ben@langfeld.me
URI
http://langfeld.me

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.

2. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.

3. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

4. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

5. XEP-0053: XMPP Registrar Function <https://xmpp.org/extensions/xep-0053.html>.

Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

  1. Version 0.3.1 (2018-11-03)
    Fix a bunch of typos, batch-style.
    pep
  2. Version 0.3 (2017-09-11)
    Defer due to lack of activity.
    XEP Editor (jwi)
  3. Version 0.2 (2014-03-13)

    Specify dependencies correctly; clearer wording on security considerations; proper linking.

    bl
  4. Version 0.1 (2014-01-14)

    Initial published version approved by the XMPP Council.

    psa
  5. Version 0.0.1 (2013-10-02)

    First draft.

    bl

END