<abstract>This document specifies an XML format for encapsulating DTMF data in informational messages sent within the context of Jingle audio interactions.</abstract>
<remark><p>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.</p></remark>
<p>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 &xep0166; for voice chat (see &xep0167;) MUST use the protocol described in this document if they wish to support DTMF.</p>
<p>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.</p>
<p>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. <note>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.</note></p>
<p>The <dtmf> element SHOULD be sent as the payload of a Jingle content-info message as illustrated in the following example. (See <linkurl='#ns'>Protocol Namespaces</link> regarding issuance of a permanent namespace.)</p>
<p>If the receiving entity does not understand or cannot process the payload, it MUST return an appropriate XMPP error (such as &unavailable; or &unexpected;).</p>
<p>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 &rfc4733;.</p>
<p>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:</p>
<examplecaption="Client requests using RFC 4733"><![CDATA[
<p>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/>:</p>
<p>If an entity supports Jingle DTMF (which natively includes sending of DTMF in the XMPP signalling channel), it MUST return a &xep0030; feature of "http://www.xmpp.org/extensions/xep-0181.html#ns" in response to service discovery information requests.</p>
<p>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.</p>
<p>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 ®ISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.</p>