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)  and the Real-time Transport Protocol (RFC 3550 ) for voice chat as described in Jingle RTP Sessions (XEP-0167)  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.
The format for the representation of DTMF events over XMPP is as follows (see Namespace Versioning regarding the possibility of incrementing the version number):
The <dmtf/> element MUST be empty.
The attributes of the <dmtf/> element are as follows.
|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 ).||#||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.
The receiving entity MUST send an IQ result if it can process the DTMF:
If the receiving entity does not support this protocol, it MUST return a <service-unavailable/> stanza error.
If the receiving entity supports this protocol but does not understand the specified code, it MUST return a <feature-not-implemented/> stanza error.
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  or its successor RFC 4733 ), it MUST return a <not-acceptable/> stanza error.
If an entity supports sending of DTMF in the XMPP signalling channel as specified herein, it MUST return a Service Discovery (XEP-0030)  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) . However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.
This document introduces no known security vulnerabilities.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
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  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) .
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.
Thanks to Diana Cionoiu, Olivier Crête, Robert McQueen, and Paul Witty for their feedback. Several sentences were borrowed from RFC 4733.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2018 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.
## 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 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.
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).
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.
The primary venue for discussion of XMPP Extension Protocols is the <firstname.lastname@example.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 <email@example.com>.
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".
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.
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/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Corrected definitions and schema to make it clear that the code attribute contains one and only one character representing a DTMF tone.
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.
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.
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.
Clarified negotiation flow; added payload-types per RFC 4733.
Editorial review and consistency check; corrected the schema.
Corrected several errors and updated to reflect changes to core Jingle spec.
Defined schema for error namespace; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).
Specified error handling and service discovery.
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.
Allowed characters A, B, C, and D; updated schema.