No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0181.xml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Jingle DTMF</title>
  10. <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. Note well that this format is not to be used in the context of RTP sessions, where native RTP methods are to be used instead.</abstract>
  11. &LEGALNOTICE;
  12. <number>0181</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0166</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>NOT_YET_ASSIGNED</shortname>
  24. &stpeter;
  25. &seanegan;
  26. <revision>
  27. <version>0.12</version>
  28. <date>2009-10-02</date>
  29. <initials>psa</initials>
  30. <remark><p>Corrected definitions and schema to make it clear that the code attribute contains one and only one character representing a DTMF tone.</p></remark>
  31. </revision>
  32. <revision>
  33. <version>0.11</version>
  34. <date>2008-09-23</date>
  35. <initials>psa</initials>
  36. <remark><p>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.</p></remark>
  37. </revision>
  38. <revision>
  39. <version>0.10</version>
  40. <date>2008-05-30</date>
  41. <initials>psa</initials>
  42. <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>
  43. </revision>
  44. <revision>
  45. <version>0.9</version>
  46. <date>2008-04-18</date>
  47. <initials>psa</initials>
  48. <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>
  49. </revision>
  50. <revision>
  51. <version>0.8</version>
  52. <date>2008-03-20</date>
  53. <initials>psa</initials>
  54. <remark><p>Clarified negotiation flow; added payload-types per RFC 4733.</p></remark>
  55. </revision>
  56. <revision>
  57. <version>0.7</version>
  58. <date>2007-11-27</date>
  59. <initials>psa</initials>
  60. <remark><p>Editorial review and consistency check; corrected the schema.</p></remark>
  61. </revision>
  62. <revision>
  63. <version>0.6</version>
  64. <date>2007-06-20</date>
  65. <initials>psa</initials>
  66. <remark><p>Corrected several errors and updated to reflect changes to core Jingle spec.</p></remark>
  67. </revision>
  68. <revision>
  69. <version>0.5</version>
  70. <date>2006-12-21</date>
  71. <initials>psa</initials>
  72. <remark><p>Defined schema for error namespace; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).</p></remark>
  73. </revision>
  74. <revision>
  75. <version>0.4</version>
  76. <date>2006-10-31</date>
  77. <initials>se/psa</initials>
  78. <remark><p>Specified error handling and service discovery.</p></remark>
  79. </revision>
  80. <revision>
  81. <version>0.3</version>
  82. <date>2006-07-12</date>
  83. <initials>se/psa</initials>
  84. <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>
  85. </revision>
  86. <revision>
  87. <version>0.2</version>
  88. <date>2006-06-29</date>
  89. <initials>psa</initials>
  90. <remark><p>Allowed characters A, B, C, and D; updated schema.</p></remark>
  91. </revision>
  92. <revision>
  93. <version>0.1</version>
  94. <date>2006-03-23</date>
  95. <initials>psa</initials>
  96. <remark><p>Initial version.</p></remark>
  97. </revision>
  98. <revision>
  99. <version>0.0.1</version>
  100. <date>2006-03-21</date>
  101. <initials>psa</initials>
  102. <remark>First draft.</remark>
  103. </revision>
  104. </header>
  105. <section1 topic='Introduction' anchor='intro'>
  106. <p>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.</p>
  107. <p>XMPP applications that use &xep0166; and the Real-time Transport Protocol (&rfc3550;) for voice chat as described in &xep0167; 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.</p>
  108. <p>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.</p>
  109. </section1>
  110. <section1 topic='Format' anchor='format'>
  111. <p>The format for the representation of DTMF events over XMPP is as follows &VNOTE;:</p>
  112. <code><![CDATA[
  113. <dtmf xmlns='urn:xmpp:jingle:dtmf:0'
  114. code='0-9,#,*,A-D'
  115. duration='milliseconds'
  116. volume='0-63'/>
  117. ]]></code>
  118. <p>The &lt;dmtf/&gt; element MUST be empty.</p>
  119. <p>The attributes of the &lt;dmtf/&gt; element are as follows.</p>
  120. <table caption='Defined Attributes'>
  121. <tr>
  122. <th>Attribute</th>
  123. <th>Definition</th>
  124. <th>Example</th>
  125. <th>Inclusion</th>
  126. </tr>
  127. <tr>
  128. <td>code</td>
  129. <td>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 <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>
  130. <td>#</td>
  131. <td>REQUIRED</td>
  132. </tr>
  133. <tr>
  134. <td>duration</td>
  135. <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>
  136. <td>400</td>
  137. <td>RECOMMENDED</td>
  138. </tr>
  139. <tr>
  140. <td>volume</td>
  141. <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>
  142. <td>37</td>
  143. <td>OPTIONAL</td>
  144. </tr>
  145. </table>
  146. <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>
  147. <example caption="Entity sends DTMF message"><![CDATA[
  148. <iq from='juliet@capulet.com/balcony'
  149. id='dtmf1'
  150. to='ivr.shakespeare.lit'
  151. type='set'>
  152. <jingle xmlns='urn:xmpp:jingle:0'
  153. action='session-info'
  154. initiator='juliet@capulet.com/balcony'
  155. sid='a73sjjvkla37jfea'>
  156. <dtmf xmlns='urn:xmpp:jingle:dtmf:0'
  157. code='7'
  158. duration='400'
  159. volume='42'/>
  160. </jingle>
  161. </iq>
  162. ]]></example>
  163. <p>The receiving entity MUST send an IQ result if it can process the DTMF:</p>
  164. <example caption="Receiving entity acknowledges DTMF message"><![CDATA[
  165. <iq from='ivr.shakespeare.lit'
  166. id='dtmf1'
  167. to='juliet@capulet.com/balcony'
  168. type='result'/>
  169. ]]></example>
  170. <p>If the receiving entity does not support this protocol, it MUST return a &unavailable; stanza error.</p>
  171. <example caption="Receiving entity does not support DTMF protocol"><![CDATA[
  172. <iq from='ivr.shakespeare.lit'
  173. id='dtmf1'
  174. to='juliet@capulet.com/balcony'
  175. type='error'>
  176. <error type='cancel'>
  177. <service-unavailable
  178. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  179. </error>
  180. </iq>
  181. ]]></example>
  182. <p>If the receiving entity supports this protocol but does not understand the specified code, it MUST return a &feature; stanza error.</p>
  183. <example caption="Receiving entity does not understand code"><![CDATA[
  184. <iq from='ivr.shakespeare.lit'
  185. id='dtmf1'
  186. to='juliet@capulet.com/balcony'
  187. type='error'>
  188. <error type='cancel'>
  189. <feature-not-implemented
  190. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  191. </error>
  192. </iq>
  193. ]]></example>
  194. <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>
  195. <example caption="Receiving prefers non-XMPP DTMF method"><![CDATA[
  196. <iq from='ivr.shakespeare.lit'
  197. id='dtmf1'
  198. to='juliet@capulet.com/balcony'
  199. type='error'>
  200. <error type='cancel'>
  201. <not-acceptable
  202. xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  203. </error>
  204. </iq>
  205. ]]></example>
  206. </section1>
  207. <section1 topic='Determining Support' anchor='support'>
  208. <p>If an entity supports sending of DTMF in the XMPP signalling channel as specified herein, it MUST return a &xep0030; feature of "urn:xmpp:jingle:dtmf:0" in response to service discovery information requests.</p>
  209. <p>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 &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.</p>
  210. </section1>
  211. <section1 topic='Security Considerations' anchor='security'>
  212. <p>This document introduces no known security vulnerabilities.</p>
  213. </section1>
  214. <section1 topic='IANA Considerations' anchor='iana'>
  215. <p>This document requires no interaction with &IANA;.</p>
  216. </section1>
  217. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  218. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  219. <p>This specification defines the following XML namespace:</p>
  220. <ul>
  221. <li>urn:xmpp:jingle:dtmf:0</li>
  222. </ul>
  223. <p>Upon advancement of this specification from a status of Experimental to a status of Draft, the &REGISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  224. </section2>
  225. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  226. &NSVER;
  227. </section2>
  228. </section1>
  229. <section1 topic='XML Schema' anchor='schema'>
  230. <code><![CDATA[
  231. <?xml version='1.0' encoding='UTF-8'?>
  232. <xs:schema
  233. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  234. targetNamespace='urn:xmpp:jingle:dtmf:0'
  235. xmlns='urn:xmpp:jingle:dtmf:0'
  236. elementFormDefault='qualified'>
  237. <xs:element name='dtmf'>
  238. <xs:complexType>
  239. <xs:simpleContent>
  240. <xs:extension base='empty'>
  241. <xs:attribute name='code'
  242. type='DTMFString'
  243. use='required'/>
  244. <xs:attribute name='duration'
  245. type='xs:nonNegativeInteger'
  246. use='optional'
  247. default='100'/>
  248. <xs:attribute name='volume'
  249. type='VolumeDigit'
  250. use='optional'/>
  251. </xs:extension>
  252. </xs:simpleContent>
  253. </xs:complexType>
  254. </xs:element>
  255. <xs:simpleType name="DTMFString">
  256. <xs:restriction base="xs:string">
  257. <xs:pattern value="(#|\*|0|1|2|3|4|5|6|7|8|9|A|B|C|D)" />
  258. </xs:restriction>
  259. </xs:simpleType>
  260. <xs:simpleType name="VolumeDigit">
  261. <xs:restriction base="xs:integer">
  262. <xs:minInclusive value="0"/>
  263. <xs:maxInclusive value="63"/>
  264. </xs:restriction>
  265. </xs:simpleType>
  266. <xs:simpleType name='empty'>
  267. <xs:restriction base='xs:string'>
  268. <xs:enumeration value=''/>
  269. </xs:restriction>
  270. </xs:simpleType>
  271. </xs:schema>
  272. ]]></code>
  273. </section1>
  274. <section1 topic='Acknowledgements' anchor='ack'>
  275. <p>Thanks to Diana Cionoiu, Olivier Cr&#234;te, Robert McQueen, and Paul Witty for their feedback. Several sentences were borrowed from <cite>RFC 4733</cite>.</p>
  276. </section1>
  277. </xep>