XEP-0181: Jingle DTMF

Abstract
This specification defines an XML format for encapsulating Dual Tone Multi-Frequency (DTMF) events in informational messages sent within the context of Jingle audio sessions, e.g. to be used in the context of Interactive Voice Response (IVR) systems. Note well that this format is not to be used in the context of RTP sessions, where native RTP methods are to be used instead.
Authors
  • Peter Saint-Andre
  • Sean Egan
Copyright
© 2006 – 2009 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.12 (2009-10-02)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Stable
  5. Final

1. Introduction

Traditional telephony systems such as the public switched telephone network (PSTN) use Dual Tone Multi-Frequency (DTMF) events for dialing and to issue commands such as those used in interactive voice response (IVR) applications. Internet telephony systems also use DTMF tones, usually for interoperability with the PSTN but sometimes also in native Internet services.

XMPP applications that use Jingle (XEP-0166) [1] and the Real-time Transport Protocol (RFC 3550 [2]) for voice chat as described in Jingle RTP Sessions (XEP-0167) [3] MUST support and prefer native RTP methods of communicating DTMF information, in particular the "audio/telephone-event" and "audio/tone" media types. Such applications SHOULD NOT use the protocol described herein for communicating DTMF information with RTP-aware endpoints.

However, XMPP applications MAY support and use the protocol described herein for communicating DTMF information with endpoints that are not RTP-aware, such as gateways to the PSTN.

2. Format

The format for the representation of DTMF events over XMPP is as follows (see Namespace Versioning regarding the possibility of incrementing the version number):

<dtmf xmlns='urn:xmpp:jingle:dtmf:0'
      code='0-9,#,*,A-D'
      duration='milliseconds'
      volume='0-63'/>

The <dmtf/> element MUST be empty.

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

Table 1: Defined Attributes
Attribute Definition Example Inclusion
code A single-character code that identifies the tone to be generated. The value of the 'code' attribute SHOULD be one and only one the following characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, #, and * (however, the characters A, B, C, and D MAY be sent as well [4]). # REQUIRED
duration The duration of the event, in milliseconds, expressed as a non-negative integer. The receiver SHOULD ignore the event if the value is zero. The default value is 100 (i.e., 100ms). 400 RECOMMENDED
volume The power level of the tone, expressed in dBm0 after dropping the sign. Power levels range from 0 to -63 dBm0. Thus, a larger value denotes a lower volume. 37 OPTIONAL

The <dtmf> element SHOULD be sent as the payload of a Jingle session-info message as illustrated in the following example.

Example 1. Entity sends DTMF message
<iq from='juliet@capulet.com/balcony'
    id='dtmf1'
    to='ivr.shakespeare.lit'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-info'
          initiator='juliet@capulet.com/balcony'
          sid='a73sjjvkla37jfea'>
    <dtmf xmlns='urn:xmpp:jingle:dtmf:0'
          code='7'
          duration='400'
          volume='42'/>
  </jingle>
</iq>

The receiving entity MUST send an IQ result if it can process the DTMF:

Example 2. Receiving entity acknowledges DTMF message
<iq from='ivr.shakespeare.lit'
    id='dtmf1'
    to='juliet@capulet.com/balcony'
    type='result'/>

If the receiving entity does not support this protocol, it MUST return a <service-unavailable/> stanza error.

Example 3. Receiving entity does not support DTMF protocol
<iq from='ivr.shakespeare.lit'
    id='dtmf1'
    to='juliet@capulet.com/balcony'
    type='error'>
  <error type='cancel'>
    <service-unavailable
      xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If the receiving entity supports this protocol but does not understand the specified code, it MUST return a <feature-not-implemented/> stanza error.

Example 4. Receiving entity does not understand code
<iq from='ivr.shakespeare.lit'
    id='dtmf1'
    to='juliet@capulet.com/balcony'
    type='error'>
  <error type='cancel'>
    <feature-not-implemented
      xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If the receiving entity is using or wishes to use a different method for exchanging DTMF events (e.g., the methods specified in RFC 2833 [5] or its successor RFC 4733 [6]), it MUST return a <not-acceptable/> stanza error.

Example 5. Receiving prefers non-XMPP DTMF method
<iq from='ivr.shakespeare.lit'
    id='dtmf1'
    to='juliet@capulet.com/balcony'
    type='error'>
  <error type='cancel'>
    <not-acceptable
      xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

3. Determining Support

If an entity supports sending of DTMF in the XMPP signalling channel as specified herein, it MUST return a Service Discovery (XEP-0030) [7] feature of "urn:xmpp:jingle:dtmf:0" in response to service discovery information requests.

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

4. Security Considerations

This document introduces no known security vulnerabilities.

5. IANA Considerations

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

6. XMPP Registrar Considerations

6.1 Protocol Namespaces

This specification defines the following XML namespace:

Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar [10] shall add the foregoing namespace to the registry located at <https://xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function (XEP-0053) [11].

6.2 Protocol Versioning

If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, 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.

7. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:jingle:dtmf:0'
    xmlns='urn:xmpp:jingle:dtmf:0'
    elementFormDefault='qualified'>

  <xs:element name='dtmf'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='empty'>
          <xs:attribute name='code'
                        type='DTMFString'
                        use='required'/>
          <xs:attribute name='duration'
                        type='xs:nonNegativeInteger'
                        use='optional'
                        default='100'/>
          <xs:attribute name='volume'
                        type='VolumeDigit'
                        use='optional'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:simpleType name="DTMFString">
    <xs:restriction base="xs:string">
      <xs:pattern value="(#|\*|0|1|2|3|4|5|6|7|8|9|A|B|C|D)" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="VolumeDigit">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="63"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>

8. Acknowledgements

Thanks to Diana Cionoiu, Olivier Crête, Robert McQueen, and Paul Witty for their feedback. Several sentences were borrowed from RFC 4733.


Appendices

Appendix A: Document Information

Series
XEP
Number
0181
Publisher
XMPP Standards Foundation
Status
Deferred
Type
Standards Track
Version
0.12
Last Updated
2009-10-02
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0166
Supersedes
None
Superseded By
None
Short Name
NOT_YET_ASSIGNED
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/
Sean Egan
Email
seanegan@google.com
JabberID
seanegan@google.com

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 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 <https://xmpp.org/community/> 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-0166: Jingle <https://xmpp.org/extensions/xep-0166.html>.

2. RFC 3550: RTP: A Transport Protocol for Real-Time Applications <http://tools.ietf.org/html/rfc3550>.

3. XEP-0167: Jingle RTP Sessions <https://xmpp.org/extensions/xep-0167.html>.

4. Although A, B, C, and D were originally defined as part of DTMF, they were never deployed to telephony consumers and were used only for control purposes at private branch exchanges (PBXs) and central office operator stations; however, they are used in certain non-telephony applications of DTMF, such as ham radio.

5. RFC 2833: RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals <http://tools.ietf.org/html/rfc2833>.

6. RFC 4733: RTP Payload for DTMF Digits, Telephony Tones, and Telephony Signals <http://tools.ietf.org/html/rfc4733>.

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

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

9. 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/>.

10. 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/>.

11. 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 https://xmpp.org/extensions/attic/

  1. Version 0.12 (2009-10-02)

    Corrected definitions and schema to make it clear that the code attribute contains one and only one character representing a DTMF tone.

    psa
  2. Version 0.11 (2008-09-23)

    Clarified that use of this protocol is discouraged for RTP-aware applications and is designed only for communication with endpoints that do not support RTP.

    psa
  3. Version 0.10 (2008-05-30)

    Simplified syntax by removing button-down and button-up actions (all actions are assumed to be button-down) and setting 100ms default value for duration.

    psa
  4. Version 0.9 (2008-04-18)

    Removed negotiation flow so that this specification describes only the XMPP transport of DTMF events; added error flows to be used if the code is not understood or if a non-XMPP method is preferred.

    psa
  5. Version 0.8 (2008-03-20)

    Clarified negotiation flow; added payload-types per RFC 4733.

    psa
  6. Version 0.7 (2007-11-27)

    Editorial review and consistency check; corrected the schema.

    psa
  7. Version 0.6 (2007-06-20)

    Corrected several errors and updated to reflect changes to core Jingle spec.

    psa
  8. Version 0.5 (2006-12-21)

    Defined schema for error namespace; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).

    psa
  9. Version 0.4 (2006-10-31)

    Specified error handling and service discovery.

    se/psa
  10. Version 0.3 (2006-07-12)

    Updated syntax to use action and code attributes rather than tone element in order to provide real-time interaction; specified how to negotiate use of the RFC 4733 format via content-info messages.

    se/psa
  11. Version 0.2 (2006-06-29)

    Allowed characters A, B, C, and D; updated schema.

    psa
  12. Version 0.1 (2006-03-23)

    Initial version.

    psa
  13. Version 0.0.1 (2006-03-21)
    First draft.
    psa

Appendix I: Bib(La)TeX Entry

@report{saint-andre2006xep0181,
  title = {Jingle DTMF},
  author = {Saint-Andre, Peter and Egan, Sean},
  type = {XEP},
  number = {0181},
  version = {0.12},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0181.html},
  date = {2006-03-21/2009-10-02},
}

END