XEP-0181: Jingle DTMF

This document specifies an XML format for encapsulating DTMF data in informational messages sent within the context of Jingle audio interactions.


WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.


Document Information

Series: XEP
Number: 0181
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.5
Last Updated: 2006-12-21
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Supersedes: None
Superseded By: None
Short Name: TO BE ASSIGNED
Wiki Page: <http://wiki.jabber.org/index.php/Jingle DTMF (XEP-0181)>

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JabberID: stpeter@jabber.org

Sean Egan

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

Legal Notice

This XMPP Extension Protocol is copyright 1999 - 2007 by the XMPP Standards Foundation (XSF) and is in full conformance with the XSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

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

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. Tone Format
3. Negotiating RFC 4733
4. Service Discovery
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
    7.1. Protocol Namespaces
    7.2. Service Discovery Features
8. XML Schema
Notes
Revision History


1. Introduction

Traditional telephony systems use Dual Tone Multi-Frequency (DTMF) 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). XMPP clients that use Jingle [1] for voice chat (see Jingle Audio Content Description Format [2]) MUST use the protocol described in this document if they wish to support DTMF.

2. Tone Format

The format for the XML DTMF format is as follows:

Example 1. Basic DTMF Format

<dtmf xmlns='http://jabber.org/protocol/info/dtmf'
      action='button-down'
      code='integer'/>
  

The <dtmf/> element SHOULD possess one 'action' attribute, which MUST be either "button-up" or "button-down", specifying whether the button is being depressed or released. This allows DTMF tones to be reconstructed in real-time. If the 'action' attribute is not included, the recipient MUST assume this to be a "button-down" event, and imply a "button-up" event after a reasonable timeout (100 milliseconds is RECOMMENDED) or when another DMTF event is received.

Unless, the 'action' attribute is '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. [3]

The <dtmf> element SHOULD be sent as the payload of a Jingle content-info message as illustrated in the following example. (See Protocol Namespaces regarding issuance of a permanent namespace.)

Example 2. Entity Sends DTMF Message

<iq from='juliet@capulet.com/balcony'
    to='ivr.shakespeare.lit'
    id='dtmf1'
    type='set'>
  <jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
          action='content-info'
          initiator='juliet@capulet.com/balcony'
          sid='a73sjjvkla37jfea'>
    <dtmf xmlns='http://www.xmpp.org/extensions/xep-0181.html#ns'
          code='7'
          action='button-up'/>
  </jingle>
</iq>
  

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'
    from='juliet@capulet.com/balcony'
    id='dtmf1'
    type='result'/>
  

If the receiving entity does not understand or cannot process the payload, it MUST return an appropriate XMPP error (such as <service-unavailable/> or <unexpected-request/>).

3. Negotiating RFC 4733

Some applications may want to stream Jingle voice RTP directly to a non-XMPP entity, such as a SIP phone. In this scenario, DTMF needs to be sent in the content channel. Jingle DTMF enables Jingle entities to negotiate whether to send RTP over the XMPP signalling channel as described above, or over the content channel using RFC 4733 [4].

To request that the voice session switches to RFC 4733, a client sends a <dtmf-method/> element, qualified by the 'http://jabber.org/protocol/info/dmtf' namespace as the payload of a Jingle content-info message:

Example 4. Client requests using RFC 4733

<iq from='juliet@capulet.com/balcony'
    to='ivr.shakespeare.lit'
    id='dtmf2'
    type='set'>
  <jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
          action='content-info'
          initiator='juliet@capulet.com/balcony'
          sid='a73sjjvkla37jfea'>
    <dtmf-method xmlns='http://www.xmpp.org/extensions/xep-0181.html#ns' method='rtp'>
  </jingle>
</iq>
 

The dtmf-method element MUST contain one 'method' attribute, the value of which SHOULD be either 'rtp' or 'xmpp'.

If the recipient supports the requested DTMF method, it SHOULD send an empty IQ result:

Example 5. Recipient acknowledges request

<iq from='ivr.shakespeare.lit'
    to='juliet@capulet.com/balcony'
    id='dtmf2'
    type='result'/>
 

If the recipient does not supoprt the requested DTMF method, it MUST reply with a <feature-not-implemented/> error with a DTMF-specific error condition of <unsupported-dtmf-method/>:

Example 6. Recipient refuses request

<iq from='ivr.shakespeare.lit'
    to='juliet@capulet.com/balcony'
    id='dtmf2'
    type='error'>
  <error type='cancel'>
    <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <unsupported-dtmf-method xmlns='http://www.xmpp.org/extensions/xep-0181.html#ns-errors'/>
  </error>
</iq>
 

4. Service Discovery

If an entity supports Jingle DTMF (which natively includes sending of DTMF in the XMPP signalling channel), it MUST return a Service Discovery [5] feature of "http://www.xmpp.org/extensions/xep-0181.html#ns" in response to service discovery information requests.

If an entity also supports sending of DTMF in the content channel, it MUST also return a service discovery feature of "http://www.xmpp.org/extensions/xep-0181.html#ns-rtp" in response to service discovery information requests.

5. Security Considerations

This document introduces no known security vulnerabilities.

6. IANA Considerations

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

7. XMPP Registrar Considerations

7.1 Protocol Namespaces

Until this specification advances to a status of Draft, its associated namespaces shall be "http://www.xmpp.org/extensions/xep-0180.html#ns" and "http://www.xmpp.org/extensions/xep-0180.html#ns-errors"; upon advancement of this specification, the XMPP Registrar [7] shall issue permanent namespaces in accordance with the process defined in Section 4 of XMPP Registrar Function [8].

7.2 Service Discovery Features

The XMPP Registrar shall include 'http://www.xmpp.org/extensions/xep-0181.html#ns-rtp' in its registry of service discovery features.

8. XML Schema

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

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://www.xmpp.org/extensions/xep-0181.html#ns'
    xmlns='http://www.xmpp.org/extensions/xep-0181.html#ns'
    elementFormDefault='qualified'>

  <xs:element name='dtmf'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='tone' minOccurs='1' maxOccurs='unbounded'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name='tone'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='empty'>
          <xs:attribute name='code' type='DTMFString' use='required'/>
          <xs:attribute name='duration' type='xs:positiveInteger' use='optional'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  </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='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
  

Notes

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

2. XEP-0167: Jingle Audio Content Description Format <http://www.xmpp.org/extensions/xep-0167.html>.

3. 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.

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

5. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.

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

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

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


Revision History

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)

Version 0.4 (2006-10-31)

Specified error handling and service discovery.

(se/psa)

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)

Version 0.2 (2006-06-29)

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

(psa)

Version 0.1 (2006-03-23)

Initial version.

(psa)

Version 0.0.1 (2006-03-21)

First draft. (psa)

END