1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-22 01:02:17 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1778 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-04-18 16:36:24 +00:00
parent c3a6f0abdd
commit c53e39ef66

View File

@ -7,7 +7,7 @@
<xep> <xep>
<header> <header>
<title>Jingle DTMF</title> <title>Jingle DTMF</title>
<abstract>This specification defines an XML format for encapsulating Dual Tone Multi-Frequency (DTMF) data 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> <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; &LEGALNOTICE;
<number>0181</number> <number>0181</number>
<status>Proposed</status> <status>Proposed</status>
@ -20,9 +20,21 @@
</dependencies> </dependencies>
<supersedes/> <supersedes/>
<supersededby/> <supersededby/>
<shortname>TO BE ASSIGNED</shortname> <shortname>TO-BE-ASSIGNED</shortname>
&stpeter; &stpeter;
&seanegan; &seanegan;
<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> <revision>
<version>0.7</version> <version>0.7</version>
<date>2007-11-27</date> <date>2007-11-27</date>
@ -73,18 +85,22 @@
</revision> </revision>
</header> </header>
<section1 topic='Introduction' anchor='intro'> <section1 topic='Introduction' anchor='intro'>
<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).</p> <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>XMPP clients that use &xep0166; for voice chat (see &xep0167;) MUST support the protocol described in this document to exchange DTMF information, although they MAY also support other methods of communicating DTMF information.</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>
<section1 topic='Tone Format' anchor='format'> <section1 topic='Format' anchor='format'>
<p>The format for the XML DTMF representation is as follows &NSNOTE;:</p> <p>The format for the representation of DTMF events in XMPP is as follows &NSNOTE;:</p>
<example caption="Basic DTMF Format"><![CDATA[ <example caption="Basic DTMF Format"><![CDATA[
<dtmf xmlns='urn:xmpp:tmp:jingle:dtmf' <dtmf xmlns='urn:xmpp:tmp:jingle:dtmf'
action='[button-down|button-up]' action='[button-down|button-up]'
code='integer'/> code='0-9,#,*,A-D'
duration='milliseconds'
volume='0-63'/>
]]></example> ]]></example>
<p>The &lt;dtmf/&gt; 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 and act as if a "button-up" event occurs after a reasonable timeout (100 milliseconds is RECOMMENDED) or when another DMTF event is received.</p> <p>The &lt;dtmf/&gt; 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.</p>
<p>Unless the 'action' attribute has a value of "button-up", the &lt;dmtf/&gt; 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>Unless the 'action' attribute has a value of "button-up", the &lt;dmtf/&gt; 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 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.</p>
<p>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.</p>
<p>The &lt;dtmf&gt; element SHOULD be sent as the payload of a Jingle session-info message as illustrated in the following example &NSNOTE;.</p> <p>The &lt;dtmf&gt; element SHOULD be sent as the payload of a Jingle session-info message as illustrated in the following example &NSNOTE;.</p>
<example caption="Entity Sends DTMF Message"><![CDATA[ <example caption="Entity Sends DTMF Message"><![CDATA[
<iq from='juliet@capulet.com/balcony' <iq from='juliet@capulet.com/balcony'
@ -97,7 +113,9 @@
sid='a73sjjvkla37jfea'> sid='a73sjjvkla37jfea'>
<dtmf xmlns='urn:xmpp:tmp:jingle:dtmf' <dtmf xmlns='urn:xmpp:tmp:jingle:dtmf'
action='button-down' action='button-down'
code='7'/> code='7'
duration='400'
volume='42'/>
</jingle> </jingle>
</iq> </iq>
]]></example> ]]></example>
@ -108,61 +126,43 @@
to='juliet@capulet.com/balcony' to='juliet@capulet.com/balcony'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>If the receiving entity does not understand or cannot process the payload, it MUST return a &feature; stanza error, which SHOULD include a Jingle-specific error condition of &lt;unsupported-info/&gt;.</p> <p>If the receiving entity does not support this protocol, it MUST return a &unavailable; stanza error.</p>
<example caption="Receiving Does Not Understand DTMF Info Message"><![CDATA[ <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' <iq from='ivr.shakespeare.lit'
id='dtmf1' id='dtmf1'
to='juliet@capulet.com/balcony' to='juliet@capulet.com/balcony'
type='error'> type='error'>
<error type='cancel'> <error type='cancel'>
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<unsupported-info xmlns='urn:xmpp:tmp:jingle:errors'/>
</error> </error>
</iq> </iq>
]]></example> ]]></example>
</section1> <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>
<section1 topic='Negotiating Use of the RFC 4733 Format' anchor='rfc4733'> <example caption="Receiving Prefers Non-XMPP DTMF Method"><![CDATA[
<p>Some applications may want to stream Jingle voice RTP directly to a non-XMPP entity, such as a SIP phone (see &rfc3261;). 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 will switch to use of the RFC 4733 format for communicating DTMF, a client sends a &lt;dtmf-method/&gt; element, qualified by the 'urn:xmpp:tmp:jingle:dtmf' namespace as the payload of a Jingle session-info message:</p>
<example caption="Client Requests Use of RFC 4733"><![CDATA[
<iq from='juliet@capulet.com/balcony'
id='dtmf2'
to='ivr.shakespeare.lit'
type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle'
action='session-info'
initiator='juliet@capulet.com/balcony'
sid='a73sjjvkla37jfea'>
<dtmf-method xmlns='urn:xmpp:tmp:jingle:dtmf' method='rtp'>
</jingle>
</iq>
]]></example>
<p>The dtmf-method element MUST contain one 'method' attribute, the value of which SHOULD be either 'rtp' or 'xmpp'.</p>
<p>If the recipient supports the requested DTMF method and wishes to use that method, it MUST send an empty IQ result:</p>
<example caption="Recipient Acknowledges Request"><![CDATA[
<iq from='ivr.shakespeare.lit' <iq from='ivr.shakespeare.lit'
id='dtmf1'
to='juliet@capulet.com/balcony' to='juliet@capulet.com/balcony'
id='dtmf2'
type='result'/>
]]></example>
<p>If the recipient does not support the requested DTMF method, it MUST return a &lt;feature-not-implemented/&gt; stanza error, which SHOULD include a DTMF-specific error condition of &lt;unsupported-dtmf-method/&gt;:</p>
<example caption="Recipient Refuses Request"><![CDATA[
<iq from='ivr.shakespeare.lit'
to='juliet@capulet.com/balcony'
id='dtmf2'
type='error'> type='error'>
<error type='cancel'> <error type='cancel'>
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<unsupported-dtmf-method xmlns='urn:xmpp:tmp:jingle:dtmf:errors'/>
</error> </error>
</iq> </iq>
]]></example> ]]></example>
</section1> </section1>
<section1 topic='Determining Support' anchor='disco'> <section1 topic='Determining Support' anchor='disco'>
<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 "urn:xmpp:tmp:jingle:dtmf" in response to service discovery information requests.</p> <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>
<p>If an entity also supports sending of DTMF in the content channel, it MUST also return a service discovery feature of "urn:xmpp:jingle:dtmf:rtp" in response to service discovery information requests.</p>
<p>Naturally, support MAY also be determined via the dynamic, presence-based profile of Service Discovery defined in &xep0115;.</p>
</section1> </section1>
<section1 topic='Security Considerations' anchor='security'> <section1 topic='Security Considerations' anchor='security'>
@ -175,25 +175,11 @@
<section1 topic='XMPP Registrar Considerations' anchor='registrar'> <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'> <section2 topic='Protocol Namespaces' anchor='ns'>
<p>Until this specification advances to a status of Draft, its associated namespaces shall be:</p> <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>
<ul>
<li>urn:xmpp:tmp:jingle:dtmf</li>
<li>urn:xmpp:tmp:jingle:dtmf:errors</li>
</ul>
<p>Upon advancement of this specification, the &REGISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.</p>
<p>The following namespaces are requested, and are thought to be unique per the XMPP Registrar's requirements:</p>
<ul>
<li>urn:xmpp:jingle:dtmf</li>
<li>urn:xmpp:jingle:dtmf:errors</li>
</ul>
</section2>
<section2 topic='Service Discovery Features' anchor='registrar-features'>
<p>The XMPP Registrar shall include "urn:xmpp:jingle:dtmf:rtp" in its registry of service discovery features (see &DISCOFEATURES;).</p>
</section2> </section2>
</section1> </section1>
<section1 topic='XML Schema' anchor='schema'> <section1 topic='XML Schema' anchor='schema'>
<section2 topic='DTMF' anchor='schema-dtmf'>
<code><![CDATA[ <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
@ -216,23 +202,8 @@
</xs:simpleType> </xs:simpleType>
</xs:attribute> </xs:attribute>
<xs:attribute name='code' type='DTMFString' use='required'/> <xs:attribute name='code' type='DTMFString' use='required'/>
</xs:extension> <xs:attribute name='duration' type='xs:nonNegativeInteger' use='optional'/>
</xs:simpleContent> <xs:attribute name='volume' type='VolumeDigit' use='optional'/>
</xs:complexType>
</xs:element>
<xs:element name='dtmf-method'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='empty'>
<xs:attribute name='role' use='optional' default='xmpp'>
<xs:simpleType>
<xs:restriction base='xs:NCName'>
<xs:enumeration value='rtp'/>
<xs:enumeration value='xmpp'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
@ -244,27 +215,13 @@
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name='empty'> <xs:simpleType name="VolumeDigit">
<xs:restriction base='xs:string'> <xs:restriction base="xs:integer">
<xs:enumeration value=''/> <xs:minInclusive value="0"/>
<xs:maxInclusive value="63"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:schema>
]]></code>
</section2>
<section2 topic='DTMF Errors' anchor='schema-dtmferrors'>
<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:errors'
xmlns='urn:xmpp:tmp:jingle:dtmf:errors'
elementFormDefault='qualified'>
<xs:element name='unsupported-dtmf-method' type='empty'/>
<xs:simpleType name='empty'> <xs:simpleType name='empty'>
<xs:restriction base='xs:string'> <xs:restriction base='xs:string'>
<xs:enumeration value=''/> <xs:enumeration value=''/>
@ -273,6 +230,8 @@
</xs:schema> </xs:schema>
]]></code> ]]></code>
</section2> </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> </section1>
</xep> </xep>