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-0341.xml 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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>Rayo CPA</title>
  10. <abstract>This specification defines an extension to the Rayo protocol (XEP-0327) to provide provision for performing Call Progress Analysis on a call under the control of a Rayo client.</abstract>
  11. &LEGALNOTICE;
  12. <number>0341</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-0327 Rayo</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>NOT_YET_ASSIGNED</shortname>
  24. <author>
  25. <firstname>Ben</firstname>
  26. <surname>Langfeld</surname>
  27. <email>ben@langfeld.me</email>
  28. <jid>ben@langfeld.me</jid>
  29. <uri>http://langfeld.me</uri>
  30. </author>
  31. <revision>
  32. <version>0.2</version>
  33. <date>2017-09-11</date>
  34. <initials>XEP Editor (jwi)</initials>
  35. <remark>Defer due to lack of activity.</remark>
  36. </revision>
  37. <revision>
  38. <version>0.1</version>
  39. <date>2014-01-14</date>
  40. <initials>psa</initials>
  41. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.0.2</version>
  45. <date>2014-01-14</date>
  46. <initials>bl</initials>
  47. <remark><p>Second draft.</p></remark>
  48. </revision>
  49. <revision>
  50. <version>0.0.1</version>
  51. <date>2013-10-02</date>
  52. <initials>bl</initials>
  53. <remark><p>First draft.</p></remark>
  54. </revision>
  55. </header>
  56. <section1 topic='Introduction' anchor='intro'>
  57. <p>Rayo allows for the third-party control of media sessions such as telephone calls. A common requirement in telephony applications is to establish the progress characteristics of the session, such as dtmf, fax or modem tones, or to differentiate between a human and an answering machine. This specification extends the core Rayo specification, and specifically its Input component to describe a protocol for establishing such progress analysis and gathering its results.</p>
  58. </section1>
  59. <section1 topic='Terminology' anchor='terms'>
  60. <section2 topic='Glossary' anchor='terms-glossary'>
  61. <dl>
  62. <di>
  63. <dt>CPA</dt>
  64. <dd>Call progress analysis.</dd>
  65. </di>
  66. </dl>
  67. </section2>
  68. </section1>
  69. <section1 topic='Session Flow' anchor='session'>
  70. <p>This section describes the form, function and order of Rayo stanzas sent across the wire, and the circumstances in which they apply and/or may arise.</p>
  71. <p>CPA is achieved as a special case of the core input component. All rules regarding component execution and the input component in particular apply from the core specification. When a call's controlling party wishes to begin detection of signals from the suported set, it SHOULD begin an input component with the mode attribute set as 'cpa'.</p>
  72. <p>The grammars supplied determine the types of signal detected and parameters applied to their detection. The grammars MUST be referenced by URI in the format described <link url="#def-grammar">below</link>. If a Rayo server supports this specification, it MUST invoke its supported CPA function using the parameters provided from the grammars; if it does not support this specification or any of the supplied parameters within the grammar, it MUST raise an error according to the rules in the core specification.</p>
  73. <example caption='Client requests CPA from a call, indicating interest in speech detection and DTMF'><![CDATA[
  74. <iq from='juliet@capulet.lit/balcony'
  75. to='9f00061@call.shakespeare.lit'
  76. type='set'
  77. id='h7ed2'>
  78. <input xmlns='urn:xmpp:rayo:input:1' mode='cpa'>
  79. <grammar url="urn:xmpp:rayo:cpa:speech:1?maxTime=4000;minSpeechDuration=4000;minVolume=10;finalSilence=2000;terminate=true" />
  80. <grammar url="urn:xmpp:rayo:cpa:dtmf:1" />
  81. </input>
  82. </iq>
  83. ]]></example>
  84. <p>The server MUST validate that it has appropriate resources/mechanisms to collect the requested signals before acknowledging the component creation.</p>
  85. <section2 topic='Events' anchor='session-events'>
  86. <p>If the meta-attribute named 'terminate' is set to true in the grammar, the component MUST terminate on the first signal match it detects. If it is set to false, signals MUST be reported as events until the component is instructed to stop.</p>
  87. <example caption="Component indicates that a signal was detected"><![CDATA[
  88. <presence from='9f00061@call.shakespeare.lit/eh3u28' to='juliet@capulet.lit/courtyard'>
  89. <signal xmlns="urn:xmpp:rayo:cpa:1" type="urn:xmpp:rayo:cpa:dtmf:1" duration="4690" value="1"/>
  90. </presence>
  91. ]]></example>
  92. </section2>
  93. <section2 topic='Completion' anchor='session-completion'>
  94. <p>The input completion reason MUST be one of the supported reasons from the core specification or a <link url='#def-signal'>signal</link>, indicating that the CPA engine detected one of the requested signals. Any signals other than those requested by the input grammar should be ignored.</p>
  95. <example caption="Component indicates it has completed due to one of the grammars matching a detected signal"><![CDATA[
  96. <presence from='9f00061@call.shakespeare.lit/eh3u28'
  97. to='juliet@capulet.lit/courtyard'
  98. type='unavailable'>
  99. <complete xmlns='urn:xmpp:rayo:ext:1'>
  100. <signal xmlns="urn:xmpp:rayo:cpa:1" type="urn:xmpp:rayo:cpa:speech:1" duration="4690" value="machine"/>
  101. </complete>
  102. </presence>
  103. ]]></example>
  104. </section2>
  105. </section1>
  106. <section1 topic='Formal Definition' anchor='def'>
  107. <section2 topic='Grammar Format' anchor='def-grammar'>
  108. <p>The grammar URI declares the signal type of interest and the parameters which apply to their detection. The URI should be composed of a URN from <link url='#def-signal-types'>the following list of allowed signal types</link>, and parameters to modify their detection as a query string. The names and allowed values of these parameters are implementation specific. Servers MUST support one reserved parameter named 'terminate', whose value indicates the termination behaviour of the component on signal detection as described <link url='#session-events'>above</link>.</p>
  109. </section2>
  110. <section2 topic='Signal Element' anchor='def-signal'>
  111. <p>Describes a detected signal.</p>
  112. <p>The attributes of the &lt;grammar/&gt; element are as follows.</p>
  113. <table caption='Attributes of Signal Element'>
  114. <tr>
  115. <th>Attribute</th>
  116. <th>Definition</th>
  117. <th>Possible Values</th>
  118. <th>Default</th>
  119. <th>Inclusion</th>
  120. </tr>
  121. <tr>
  122. <td>type</td>
  123. <td>Indicates the type of signal detected.</td>
  124. <td>Any URI value from <link url='#def-signal-types'>the listed signal types</link></td>
  125. <td>none</td>
  126. <td>REQUIRED</td>
  127. </tr>
  128. <tr>
  129. <td>duration</td>
  130. <td>Indicates the duration of the received signal in milliseconds</td>
  131. <td>An integer value in milliseconds.</td>
  132. <td>none</td>
  133. <td>OPTIONAL</td>
  134. </tr>
  135. <tr>
  136. <td>value</td>
  137. <td>Indicates the value of the signal received if applicable.</td>
  138. <td>For dtmf tones it is the digit detected, for speech may be human|machine|notsure and for beeps may be a frequency in Hz.</td>
  139. <td>none</td>
  140. <td>OPTIONAL</td>
  141. </tr>
  142. </table>
  143. </section2>
  144. <section2 topic='Signal Types' anchor='def-signal-types'>
  145. <p>Signal types may be one of the following:</p>
  146. <table caption='Signal type URIs'>
  147. <tr>
  148. <th>URI</th>
  149. <th>Description</th>
  150. </tr>
  151. <tr>
  152. <td>urn:xmpp:rayo:cpa:beep:1</td>
  153. <td>Detect a beep.</td>
  154. </tr>
  155. <tr>
  156. <td>urn:xmpp:rayo:cpa:dtmf:1</td>
  157. <td>Detect DTMF tones.</td>
  158. </tr>
  159. <tr>
  160. <td>urn:xmpp:rayo:cpa:vad:1</td>
  161. <td>Detect voice activity.</td>
  162. </tr>
  163. <tr>
  164. <td>urn:xmpp:rayo:cpa:speech:1</td>
  165. <td>Detect speech and decide human or machine.</td>
  166. </tr>
  167. <tr>
  168. <td>urn:xmpp:rayo:cpa:fax-ced:1</td>
  169. <td>Detect a fax CED tone.</td>
  170. </tr>
  171. <tr>
  172. <td>urn:xmpp:rayo:cpa:fax-cng:1</td>
  173. <td>Detect a fax CNG tone.</td>
  174. </tr>
  175. <tr>
  176. <td>urn:xmpp:rayo:cpa:ring:1</td>
  177. <td>Detect a ringing tone.</td>
  178. </tr>
  179. <tr>
  180. <td>urn:xmpp:rayo:cpa:busy:1</td>
  181. <td>Detect a busy tone.</td>
  182. </tr>
  183. <tr>
  184. <td>urn:xmpp:rayo:cpa:congestion:1</td>
  185. <td>Detect a congestion tone.</td>
  186. </tr>
  187. <tr>
  188. <td>urn:xmpp:rayo:cpa:sit:1</td>
  189. <td>Detect a Special Information Tone.</td>
  190. </tr>
  191. <tr>
  192. <td>urn:xmpp:rayo:cpa:modem:1</td>
  193. <td>Detect a modem tone.</td>
  194. </tr>
  195. <tr>
  196. <td>urn:xmpp:rayo:cpa:offhook:1</td>
  197. <td>Detect an off-hook tone.</td>
  198. </tr>
  199. </table>
  200. </section2>
  201. </section1>
  202. <section1 topic='Determining Support' anchor='support'>
  203. <p>If a Rayo server supports Rayo CPA, it MUST advertise that fact by returning a feature of "urn:xmpp:rayo|cpa:0" &VNOTE; in response to a &xep0030; information request.</p>
  204. <example caption="Service Discovery Information Request - Client to Server"><![CDATA[
  205. <iq from='kingclaudius@shakespeare.lit/castle'
  206. id='disco1'
  207. to='call.rayo.org'
  208. type='get'>
  209. <query xmlns='http://jabber.org/protocol/disco#info'/>
  210. </iq>
  211. ]]></example>
  212. <example caption="Service Discovery Information Response - Client to Server"><![CDATA[
  213. <iq from='call.rayo.org'
  214. id='disco1'
  215. to='kingclaudius@shakespeare.lit/castle'
  216. type='result'>
  217. <query xmlns='http://jabber.org/protocol/disco#info'>
  218. <feature var='urn:xmpp:rayo:0'/>
  219. <feature var='urn:xmpp:rayo:cpa:0'/>
  220. </query>
  221. </iq>
  222. ]]></example>
  223. <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>
  224. </section1>
  225. <section1 topic='Implementation Notes' anchor='impl'>
  226. <p>A server MUST document any cases where its behaviour differs from that in this specification (such as lack of support for particular options/components/etc) and return an error whenever a command is not understood. A server MUST NOT silently ignore any instructions.</p>
  227. </section1>
  228. <section1 topic='Security Considerations' anchor='security'>
  229. <p>This document introduces no additional security considerations above and beyond those defined in the documents on which it depends.</p>
  230. </section1>
  231. <section1 topic='IANA Considerations' anchor='iana'>
  232. <p>This document requires no interaction with &IANA;.</p>
  233. </section1>
  234. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  235. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  236. <p>This specification defines the following XML namespaces:</p>
  237. <ul>
  238. <li>urn:xmpp:rayo:cpa:1</li>
  239. <li>urn:xmpp:rayo:cpa:beep:1</li>
  240. <li>urn:xmpp:rayo:cpa:dtmf:1</li>
  241. <li>urn:xmpp:rayo:cpa:vad:1</li>
  242. <li>urn:xmpp:rayo:cpa:speech:1</li>
  243. <li>urn:xmpp:rayo:cpa:fax-ced:1</li>
  244. <li>urn:xmpp:rayo:cpa:fax-cng:1</li>
  245. <li>urn:xmpp:rayo:cpa:ring:1</li>
  246. <li>urn:xmpp:rayo:cpa:busy:1</li>
  247. <li>urn:xmpp:rayo:cpa:congestion:1</li>
  248. <li>urn:xmpp:rayo:cpa:sit:1</li>
  249. <li>urn:xmpp:rayo:cpa:modem:1</li>
  250. <li>urn:xmpp:rayo:cpa:offhook:1</li>
  251. </ul>
  252. <p>The &REGISTRAR; includes the foregoing namespaces in its registry at &NAMESPACES;, as governed by &xep0053;.</p>
  253. </section2>
  254. <section2 topic='Namespace Versioning' anchor='registrar-versioning'>
  255. <p>If the protocol defined in this specification undergoes a major revision that is not fully backward-compatible with an older version, or that contains significant new features, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of <cite>XEP-0053</cite>.</p>
  256. </section2>
  257. </section1>
  258. <section1 topic='XML Schema' anchor='schema'>
  259. <section2 topic='Rayo CPA' anchor='schema-rayo-cpa'>
  260. <code><![CDATA[
  261. <?xml version="1.0" encoding="UTF-8"?>
  262. <schema xmlns="http://www.w3.org/2001/XMLSchema"
  263. targetNamespace="urn:xmpp:rayo:input:1"
  264. xmlns:tns="urn:xmpp:rayo:cpa:1"
  265. elementFormDefault="qualified"
  266. xmlns:core="urn:xmpp:rayo:1">
  267. <annotation>
  268. <documentation>
  269. The protocol documented by this schema is defined at http://rayo.org/xep
  270. </documentation>
  271. </annotation>
  272. <!-- Signal element -->
  273. <element name="signal">
  274. <annotation>
  275. <documentation>
  276. Describes a detected signal.
  277. </documentation>
  278. </annotation>
  279. <complexType>
  280. <simpleContent>
  281. <attribute name="type" use="required">
  282. <annotation>
  283. <documentation>
  284. Indicates the type of signal detected.
  285. </documentation>
  286. </annotation>
  287. <simpleType>
  288. <restriction base="token">
  289. <enumeration value="urn:xmpp:rayo:cpa:beep:1" />
  290. <enumeration value="urn:xmpp:rayo:cpa:dtmf:1" />
  291. <enumeration value="urn:xmpp:rayo:cpa:vad:1" />
  292. <enumeration value="urn:xmpp:rayo:cpa:speech:1" />
  293. <enumeration value="urn:xmpp:rayo:cpa:fax-ced:1" />
  294. <enumeration value="urn:xmpp:rayo:cpa:fax-cng:1" />
  295. <enumeration value="urn:xmpp:rayo:cpa:ring:1" />
  296. <enumeration value="urn:xmpp:rayo:cpa:busy:1" />
  297. <enumeration value="urn:xmpp:rayo:cpa:congestion:1" />
  298. <enumeration value="urn:xmpp:rayo:cpa:sit:1" />
  299. <enumeration value="urn:xmpp:rayo:cpa:modem:1" />
  300. <enumeration value="urn:xmpp:rayo:cpa:offhook:1" />
  301. </restriction>
  302. </simpleType>
  303. </attribute>
  304. <attribute name="duration" type="core:durationType" use="optional" default="">
  305. <annotation>
  306. <documentation>
  307. Indicates the duration of the received signal in milliseconds
  308. </documentation>
  309. </annotation>
  310. </attribute>
  311. <attribute name="value" type="token" use="optional" default="">
  312. <annotation>
  313. <documentation>
  314. Indicates the value of the signal received if applicable. For dtmf tones it is the digit detected, for speech may be human|machine|notsure and for beeps may be a frequency in Hz.
  315. </documentation>
  316. </annotation>
  317. </attribute>
  318. </simpleContent>
  319. </complexType>
  320. </element>
  321. </schema>
  322. ]]></code>
  323. </section2>
  324. </section1>
  325. <section1 topic='Acknowledgements' anchor='acknowledgements'>
  326. <p>The authors would like to acknowledge the input of teams at Tropo Inc, Mojo Lingo and Grasshopper in the development of this specification.</p>
  327. <p>Specific individuals who have contributed to the specification or to software significant to its completion include:</p>
  328. <ul>
  329. <li>Ben Langfeld</li>
  330. <li>Chris Rienzo</li>
  331. <li>Martín Pérez</li>
  332. </ul>
  333. </section1>
  334. </xep>