XEP-0181: Jingle DTMF

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.

NOTICE: This document is currently within Last Call or under consideration by the XMPP Council for advancement to the next stage in the XSF standards process.

Document Information

Series: XEP
Number: 0181
Publisher: XMPP Standards Foundation
Status: Proposed
Type: Standards Track
Version: 0.9
Last Updated: 2008-04-18
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Supersedes: None
Superseded By: None
Wiki Page: <http://wiki.jabber.org/index.php/Jingle DTMF (XEP-0181)>

Author Information

Peter Saint-Andre

JabberID: stpeter@jabber.org
URI: https://stpeter.im/

Sean Egan

Email: seanegan@google.com
JabberID: seanegan@google.com

Legal Notices


This XMPP Extension Protocol is copyright (c) 1999 - 2008 by the XMPP Standards Foundation (XSF).


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. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

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 out of the use or inability to use 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 may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

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

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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.

Conformance Terms

The following 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".

Table of Contents

1. Introduction
2. Format
3. Determining Support
4. Security Considerations
5. IANA Considerations
6. XMPP Registrar Considerations
    6.1. Protocol Namespaces
7. XML Schema
8. Acknowledgements
Revision History

1. Introduction

Traditional telephony systems 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 for interoperability with the public switched telephone network (PSTN).

If XMPP application use Jingle [1] for voice chat (see Jingle Audio via RTP [2]) and wish to exchange DTMF events, they MUST support the protocol described in this document. However, they MAY also support non-XMPP methods of communicating DTMF information, such as the "audio/telephone-event" and "audio/tone" media types as sent over the Real-time Transport Protocol (RFC 3550 [3]).

2. Format

The format for the representation of DTMF events in XMPP is as follows (see Protocol Namespaces regarding issuance of one or more permanent namespaces):

Example 1. Basic DTMF Format

<dtmf xmlns='urn:xmpp:tmp:jingle:dtmf'

The <dtmf/> element SHOULD possess an 'action' attribute, the value of which MUST be either "button-up" or "button-down" (specifying whether the button is being depressed or released). This enables DTMF tones to be reconstructed in real time. If the 'action' attribute is not included, the recipient MUST assume that the action is a "button-down" event.

Unless the 'action' attribute has a value of "button-up", the <dmtf/> element MUST possess a 'code' attribute that specifies the tone to be generated. The value of the 'code' attribute SHOULD be 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]).

The OPTIONAL 'duration' attribute specifies indicates the duration of the event, in milliseconds, expressed as an unsigned integer. The receiver SHOULD ignore the event if the 'duration' value is zero. If the 'duration' attribute is not included and the event is explicitly or implicitly a "button-down" event, the recipient MUST assume that the event expires after a reasonable timeout (100 milliseconds is RECOMMENDED) or when a "button-up" event is received, whichever comes first.

The OPTIONAL 'volume' attribute specifies the power level of the tone, expressed in dBm0 after dropping the sign. Power levels range from 0 to -63 dBm0. Thus, larger values denote lower volume.

The <dtmf> element SHOULD be sent as the payload of a Jingle session-info message as illustrated in the following example (see Protocol Namespaces regarding issuance of one or more permanent namespaces).

Example 2. Entity Sends DTMF Message

<iq from='juliet@capulet.com/balcony'
  <jingle xmlns='urn:xmpp:tmp:jingle'
    <dtmf xmlns='urn:xmpp:tmp:jingle:dtmf'

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

Example 3. Receiving Entity Acknowledges DTMF Message

<iq from='ivr.shakespeare.lit'

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

Example 4. Receiving Does Not Support DTMF Protocol

<iq from='ivr.shakespeare.lit'
  <error type='cancel'>
    <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>

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

Example 5. Receiving Does Not Understand Code

<iq from='ivr.shakespeare.lit'
  <error type='cancel'>
    <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>

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 6. Receiving Prefers Non-XMPP DTMF Method

<iq from='ivr.shakespeare.lit'
  <error type='cancel'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>

3. Determining Support

If an entity supports Jingle DTMF (i.e., sending of DTMF in the XMPP signalling channel as specified herein), it MUST return a Service Discovery [7] feature of "urn:xmpp:tmp:jingle:dtmf" in response to service discovery information requests. Naturally, support MAY also be determined via the dynamic, presence-based profile of Service Discovery defined in Entity Capabilities [8].

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

Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:jingle:dtmf". Upon advancement of this specification, the XMPP Registrar [10] shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function [11]. The following namespace is requested, and is thought to be unique per the XMPP Registrar's requirements: "urn:xmpp:jingle:dtmf".

7. XML Schema

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


  <xs:element name='dtmf'>
        <xs:extension base='empty'>
          <xs:attribute name='action' use='optional' default='button-down'>
              <xs:restriction base='xs:NCName'>
                <xs:enumeration value='button-down'/>
                <xs:enumeration value='button-up'/>
          <xs:attribute name='code' type='DTMFString' use='required'/>
          <xs:attribute name='duration' type='xs:nonNegativeInteger' use='optional'/>
          <xs:attribute name='volume' type='VolumeDigit' use='optional'/>

  <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:simpleType name="VolumeDigit">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="63"/>

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


8. Acknowledgements

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


1. XEP-0166: Jingle <http://www.xmpp.org/extensions/xep-0166.html>.

2. XEP-0167: Jingle Audio via RTP <http://www.xmpp.org/extensions/xep-0167.html>.

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

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 <http://www.xmpp.org/extensions/xep-0030.html>.

8. XEP-0115: Entity Capabilities <http://www.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 <http://www.xmpp.org/registrar/>.

11. XEP-0053: XMPP Registrar Function <http://www.xmpp.org/extensions/xep-0053.html>.

Revision History

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.


Version 0.8 (2008-03-20)

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


Version 0.7 (2007-11-27)

Editorial review and consistency check; corrected the schema.


Version 0.6 (2007-06-20)

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


Version 0.5 (2006-12-21)

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


Version 0.4 (2006-10-31)

Specified error handling and service discovery.


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.


Version 0.2 (2006-06-29)

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


Version 0.1 (2006-03-23)

Initial version.


Version 0.0.1 (2006-03-21)

First draft. (psa)