1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-01 13:42:14 -05:00
xeps/xep-0181.xml

258 lines
11 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Jingle DTMF</title>
<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.</abstract>
&LEGALNOTICE;
<number>0181</number>
<status>Proposed</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0166</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&stpeter;
&seanegan;
<revision>
<version>0.10</version>
<date>2008-05-30</date>
<initials>psa</initials>
<remark><p>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.</p></remark>
</revision>
<revision>
<version>0.9</version>
<date>2008-04-18</date>
<initials>psa</initials>
<remark><p>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.</p></remark>
</revision>
<revision>
<version>0.8</version>
<date>2008-03-20</date>
<initials>psa</initials>
<remark><p>Clarified negotiation flow; added payload-types per RFC 4733.</p></remark>
</revision>
<revision>
<version>0.7</version>
<date>2007-11-27</date>
<initials>psa</initials>
<remark><p>Editorial review and consistency check; corrected the schema.</p></remark>
</revision>
<revision>
<version>0.6</version>
<date>2007-06-20</date>
<initials>psa</initials>
<remark><p>Corrected several errors and updated to reflect changes to core Jingle spec.</p></remark>
</revision>
<revision>
<version>0.5</version>
<date>2006-12-21</date>
<initials>psa</initials>
<remark><p>Defined schema for error namespace; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).</p></remark>
</revision>
<revision>
<version>0.4</version>
<date>2006-10-31</date>
<initials>se/psa</initials>
<remark><p>Specified error handling and service discovery.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2006-07-12</date>
<initials>se/psa</initials>
<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>
</revision>
<revision>
<version>0.2</version>
<date>2006-06-29</date>
<initials>psa</initials>
<remark><p>Allowed characters A, B, C, and D; updated schema.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2006-03-23</date>
<initials>psa</initials>
<remark><p>Initial version.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2006-03-21</date>
<initials>psa</initials>
<remark>First draft.</remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>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).</p>
<p>If XMPP application use &xep0166; for voice chat (see &xep0167;) 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 (&rfc3550;).</p>
</section1>
<section1 topic='Format' anchor='format'>
<p>The format for the representation of DTMF events in XMPP is as follows &NSNOTE;:</p>
<example caption="Basic DTMF Format"><![CDATA[
<dtmf xmlns='urn:xmpp:tmp:jingle:dtmf'
code='0-9,#,*,A-D'
duration='milliseconds'
volume='0-63'/>
]]></example>
<p>The &lt;dmtf/&gt; element MUST be empty.</p>
<p>The attributes of the &lt;dmtf/&gt; element are as follows.</p>
<table caption='Defined Attributes'>
<tr>
<th>Attribute</th>
<th>Definition</th>
<th>Example</th>
<th>Inclusion</th>
</tr>
<tr>
<td>code</td>
<td>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>).</td>
<td>6</td>
<td>REQUIRED</td>
</tr>
<tr>
<td>duration</td>
<td>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).</td>
<td>400</td>
<td>RECOMMENDED</td>
</tr>
<tr>
<td>volume</td>
<td>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.</td>
<td>37</td>
<td>OPTIONAL</td>
</tr>
</table>
<p>The &lt;dtmf&gt; element SHOULD be sent as the payload of a Jingle session-info message as illustrated in the following example.</p>
<example caption="Entity Sends DTMF Message"><![CDATA[
<iq from='juliet@capulet.com/balcony'
id='dtmf1'
to='ivr.shakespeare.lit'
type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle'
action='session-info'
initiator='juliet@capulet.com/balcony'
sid='a73sjjvkla37jfea'>
<dtmf xmlns='urn:xmpp:tmp:jingle:dtmf'
code='7'
duration='400'
volume='42'/>
</jingle>
</iq>
]]></example>
<p>The receiving entity MUST send an IQ result if it can process the DTMF:</p>
<example caption="Receiving Entity Acknowledges DTMF Message"><![CDATA[
<iq from='ivr.shakespeare.lit'
id='dtmf1'
to='juliet@capulet.com/balcony'
type='result'/>
]]></example>
<p>If the receiving entity does not support this protocol, it MUST return a &unavailable; stanza error.</p>
<example caption="Receiving Does Not Support DTMF Protocol"><![CDATA[
<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>
]]></example>
<p>If the receiving entity does not understand the specified code, it MUST return a &feature; stanza error.</p>
<example caption="Receiving Does Not Understand Code"><![CDATA[
<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>
]]></example>
<p>If the receiving entity is using or wishes to use a different method for exchanging DTMF events (e.g., the methods specified in &rfc2833; or its successor &rfc4733;), it MUST return a &notacceptable; stanza error.</p>
<example caption="Receiving Prefers Non-XMPP DTMF Method"><![CDATA[
<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>
]]></example>
</section1>
<section1 topic='Determining Support' anchor='disco'>
<p>If an entity supports Jingle DTMF (i.e., sending of DTMF in the XMPP signalling channel as specified herein), it MUST return a &xep0030; 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 &xep0115;.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>This document introduces no known security vulnerabilities.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>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 &REGISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;. The following namespace is requested, and is thought to be unique per the XMPP Registrar's requirements: "urn:xmpp:jingle:dtmf".</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:tmp:jingle:dtmf'
xmlns='urn:xmpp:tmp:jingle:dtmf'
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>
]]></code>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Olivier Cr&#234;te and Paul Witty for their feedback. Several sentences were borrowed from <cite>RFC 4733</cite>.</p>
</section1>
</xep>