rayo.conf.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <configuration name="rayo.conf" description="Rayo server config">
  2. <!-- rayo params -->
  3. <settings>
  4. <!-- ends idle calls : unbridged calls that have not been controlled by client in some time -->
  5. <param name="max-idle-sec" value="300"/>
  6. <!-- conference profile to use for mixers- sla = shared line appearance / conference /w no audio -->
  7. <param name="mixer-conf-profile" value="sla"/>
  8. <!-- if true, to attribute in offer uses URI instead of name/number -->
  9. <param name="offer-uri" value="true"/>
  10. <!-- how offers are distributed to clients (all, first, random). -->
  11. <param name="offer-algorithm" value="all"/>
  12. <!-- If offer is not answered after timeout, next client is offered (based on algorithm picked).
  13. If no other clients are available, the call is rejected. Set to 0 to disable -->
  14. <param name="offer-timeout-ms" value="5000"/>
  15. <!-- if true, channel variables are added to rayo client offer -->
  16. <param name="add-variables-to-offer" value="false"/>
  17. <!-- if true, channel variables are added to offer, ringing, answered, and end events sent to rayo clients -->
  18. <param name="add-variables-to-events" value="false"/>
  19. </settings>
  20. <!-- record component params -->
  21. <record>
  22. <param name="record-file-prefix" value="$${recordings_dir}/"/>
  23. </record>
  24. <!-- input component params -->
  25. <input>
  26. <param name="default-recognizer" value="pocketsphinx"/>
  27. </input>
  28. <!-- send/receivefax component params -->
  29. <fax>
  30. <!-- where to store incoming faxes -->
  31. <param name="receivefax-file-prefix" value="/tmp/"/>
  32. </fax>
  33. <!-- Call progress analysis configuration -->
  34. <!-- Define CPA detectors. These are sources for Rayo CPA signal events -->
  35. <!-- Detectors must fire an event that can be translated by mod_rayo into a CPA signal event -->
  36. <cpa>
  37. <!-- map DTMF events to CPA -->
  38. <detector name="core_dtmf_event">
  39. <event class="DTMF" value-header="DTMF-Digit" duration-header="DTMF-Duration">
  40. <signal-type value="dtmf"/>
  41. </event>
  42. </detector>
  43. <!-- map mod_spandsp fax detector to the Rayo CPA events. Fires DETECTED_FAX_* event once and quits. -->
  44. <detector name="mod_spandsp_fax_ced">
  45. <start application="spandsp_start_fax_detect" data="event 'Event-Name=CUSTOM,Event-Subclass=DETECTED_FAX_CED' 500 ced"/>
  46. <stop application="spandsp_stop_fax_detect" data=""/>
  47. <event class="CUSTOM" subclass="DETECTED_FAX_CED">
  48. <signal-type value="fax-ced"/>
  49. </event>
  50. </detector>
  51. <detector name="mod_spandsp_fax_cng">
  52. <start application="spandsp_start_fax_detect" data="event 'Event-Name=CUSTOM,Event-Subclass=DETECTED_FAX_CNG' 500"/>
  53. <stop application="spandsp_stop_fax_detect" data=""/>
  54. <event class="CUSTOM" subclass="DETECTED_FAX_CNG">
  55. <signal-type value="fax-cng"/>
  56. </event>
  57. </detector>
  58. <!-- map mod_spandsp call progress tone detector to Rayo CPA signal events. Fires DETECTED_TONE events until stopped. -->
  59. <detector name="mod_spandsp_tone">
  60. <start application="spandsp_start_tone_detect" data="1"/>
  61. <stop application="spandsp_stop_tone_detect" data=""/>
  62. <!-- map tone events to Rayo CPA signal type -->
  63. <event class="DETECTED_TONE" type-header="Detected-Tone">
  64. <signal-type header-value="SIT" value="sit"/>
  65. <signal-type header-value="BUSY_TONE" value="busy"/>
  66. <signal-type header-value="REORDER_TONE" value="congestion"/>
  67. <signal-type header-value="RING_TONE" value="ring"/>
  68. </event>
  69. </detector>
  70. <!-- map mod_avmd detector to Rayo CPA beep event. Fires avmd::beep event once. -->
  71. <detector name="mod_avmd">
  72. <start application="avmd" data=""/>
  73. <stop application="avmd" data="stop"/>
  74. <event class="CUSTOM" subclass="avmd::beep">
  75. <signal-type value="beep"/>
  76. </event>
  77. </detector>
  78. <!-- Alternative beep detector using mod_vmd. Fires vmd::beep events until stopped. -->
  79. <!--detector name="mod_vmd">
  80. <start application="vmd" data=""/>
  81. <stop application="vmd" data="stop"/>
  82. <event class="CUSTOM" subclass="vmd::beep">
  83. <signal-type value="beep"/>
  84. </event>
  85. </detector-->
  86. </cpa>
  87. <!-- XMPP server domain -->
  88. <domain name="$${rayo_domain_name}" shared-secret="ClueCon">
  89. <!-- use this instead if you want secure XMPP client to server connections. Put .crt and .key file in freeswitch/certs -->
  90. <!--domain name="$${rayo_domain_name}" shared-secret="ClueCon" cert="$${base_dir}/certs/$${rayo_domain_name}.crt" key="$${base_dir}/certs/$${rayo_domain_name}.key"-->
  91. <!-- Listeners for new Rayo client connections -->
  92. <!--listen type="c2s" port="5222" address="$${local_ip_v4}" acl="rayo-clients"/-->
  93. <listen type="c2s" port="5222" address="$${rayo_ip}" acl=""/>
  94. <!-- Listeners for new server connections -->
  95. <!--listen type="s2s" port="5269" address="$${local_ip_v4}" acl="rayo-servers"/-->
  96. <!-- servers to connect to -->
  97. <!--connect port="5269" address="node.example.com" domain="example.com"/-->
  98. <!-- Authorized users -->
  99. <users>
  100. <user name="usera" password="1"/>
  101. </users>
  102. </domain>
  103. <!-- URI mapping to endpoint / gateway -->
  104. <dial-gateways>
  105. <dial-gateway uriprefix="default" dialprefix="sofia/gateway/outbound/" strip="0"/>
  106. <dial-gateway uriprefix="sip:" dialprefix="sofia/external/" strip="0"/>
  107. <dial-gateway uriprefix="tel:" dialprefix="sofia/gateway/outbound/" strip="4"/>
  108. <!-- pass through user and sofia unaltered -->
  109. <dial-gateway uriprefix="user/" dialprefix="" strip=""/>
  110. <dial-gateway uriprefix="sofia/" dialprefix="" strip=""/>
  111. <dial-gateway uriprefix="loopback/" dialprefix="" strip=""/>
  112. </dial-gateways>
  113. <!-- IQ request aliases. Used mainly for testing purposes or for controlling a rayo call via the console -->
  114. <aliases>
  115. <alias name="detect" target="call" args="1"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:$1:1"/></input>]]></alias>
  116. <alias name="detect-once" target="call" args="1"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:$1:1?terminate=true"/></input>]]></alias>
  117. <alias name="detect-tones" target="call"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:busy:1"/><grammar url="urn:xmpp:rayo:cpa:congestion:1"/><grammar url="urn:xmpp:rayo:cpa:sit:1"/></input>]]></alias>
  118. <alias name="ping" target="external"><![CDATA[<iq type="get"><ping xmlns="urn:xmpp:ping"/></iq>]]></alias>
  119. <alias name="dial" target="server" args="2"><![CDATA[<dial xmlns="urn:xmpp:rayo:1" from="$1" to="$2"/>]]></alias>
  120. <alias name="answer" target="call"><![CDATA[<answer xmlns="urn:xmpp:rayo:1"/>]]></alias>
  121. <alias name="hangup" target="call"><![CDATA[<hangup xmlns="urn:xmpp:rayo:1"/>]]></alias>
  122. <alias name="join" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" call-uri="xmpp:$1"/>]]></alias>
  123. <alias name="join_mixer_duplex" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="duplex"/>]]></alias>
  124. <alias name="join_mixer_send" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="send"/>]]></alias>
  125. <alias name="join_mixer_recv" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="recv"/>]]></alias>
  126. <alias name="unjoin_mixer" target="call" args="1"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1" mixer-name="$1"/>]]></alias>
  127. <alias name="unjoin" target="call"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1"/>]]></alias>
  128. <alias name="unjoin_call" target="call" args="1"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1" call-uri="xmpp:$1"/>]]></alias>
  129. <alias name="stop" target="component"><![CDATA[<stop xmlns="urn:xmpp:rayo:ext:1"/>]]></alias>
  130. <alias name="output_bad" target="call"><![CDATA[<output xmlns="urn:xmpp:rayo:output:1" repeat-time="100"></output>]]></alias>
  131. <alias name="pause" target="output"><![CDATA[<pause xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
  132. <alias name="resume" target="output"><![CDATA[<resume xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
  133. <alias name="speed-up" target="output"><![CDATA[<speed-up xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
  134. <alias name="speed-down" target="output"><![CDATA[<speed-down xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
  135. <alias name="volume-up" target="output"><![CDATA[<volume-up xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
  136. <alias name="volume-down" target="output"><![CDATA[<volume-down xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
  137. <alias name="receivefax" target="call"><![CDATA[<receivefax xmlns="urn:xmpp:rayo:fax:1"/>]]></alias>
  138. <alias name="sendfax" target="call" args="1"><![CDATA[<sendfax xmlns="urn:xmpp:rayo:fax:1"><document xmlns="urn:xmpp:rayo:fax:1" url="$1"/></sendfax>]]></alias>
  139. <alias name="record" target="call"><![CDATA[<record xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
  140. <alias name="record_pause" target="record"><![CDATA[<pause xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
  141. <alias name="record_resume" target="record"><![CDATA[<resume xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
  142. <alias name="prompt_barge" target="call">
  143. <![CDATA[
  144. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
  145. <output xmlns="urn:xmpp:rayo:output:1" repeat-times="5">
  146. <document content-type="application/ssml+xml">
  147. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  148. </document>
  149. </output>
  150. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
  151. <grammar content-type="application/srgs+xml">
  152. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
  153. </grammar>
  154. </input>
  155. </prompt>
  156. ]]>
  157. </alias>
  158. <alias name="prompt_no_barge" target="call">
  159. <![CDATA[
  160. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="false">
  161. <output xmlns="urn:xmpp:rayo:output:1" repeat-times="5">
  162. <document content-type="application/ssml+xml">
  163. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  164. </document>
  165. </output>
  166. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
  167. <grammar content-type="application/srgs+xml">
  168. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
  169. </grammar>
  170. </input>
  171. </prompt>
  172. ]]>
  173. </alias>
  174. <alias name="prompt_long" target="call">
  175. <![CDATA[
  176. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
  177. <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
  178. <document content-type="application/ssml+xml">
  179. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  180. </document>
  181. </output>
  182. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
  183. <grammar content-type="application/srgs+xml">
  184. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
  185. </grammar>
  186. </input>
  187. </prompt>
  188. ]]>
  189. </alias>
  190. <alias name="prompt_multi_digit" target="call">
  191. <![CDATA[
  192. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
  193. <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
  194. <document content-type="application/ssml+xml">
  195. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  196. </document>
  197. </output>
  198. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
  199. <grammar content-type="application/srgs+xml">
  200. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
  201. </grammar>
  202. </input>
  203. </prompt>
  204. ]]>
  205. </alias>
  206. <alias name="prompt_terminator" target="call">
  207. <![CDATA[
  208. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
  209. <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
  210. <document content-type="application/ssml+xml">
  211. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  212. </document>
  213. </output>
  214. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
  215. <grammar content-type="application/srgs+xml">
  216. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
  217. </grammar>
  218. </input>
  219. </prompt>
  220. ]]>
  221. </alias>
  222. <alias name="prompt_input_bad" target="call">
  223. <![CDATA[
  224. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
  225. <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
  226. <document content-type="application/ssml+xml">
  227. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  228. </document>
  229. </output>
  230. <input xmlns="urn:xmpp:rayo:input:1" mode="dtf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
  231. <grammar content-type="application/srgs+xml">
  232. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
  233. </grammar>
  234. </input>
  235. </prompt>
  236. ]]>
  237. </alias>
  238. <alias name="prompt_output_bad" target="call">
  239. <![CDATA[
  240. <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
  241. <output xmlns="urn:xmpp:rayo:output:1" repeat-time="100">
  242. <document content-type="application/ssml+xml">
  243. <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
  244. </document>
  245. </output>
  246. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
  247. <grammar content-type="application/srgs+xml">
  248. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
  249. </grammar>
  250. </input>
  251. </prompt>
  252. ]]>
  253. </alias>
  254. <alias name="input" target="call">
  255. <![CDATA[
  256. <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
  257. <grammar content-type="application/srgs+xml">
  258. <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
  259. </grammar>
  260. </input>
  261. ]]>
  262. </alias>
  263. <alias name="input_voice_yesno_unimrcp" target="call">
  264. <![CDATA[
  265. <input xmlns="urn:xmpp:rayo:input:1" mode="voice" recognizer="unimrcp">
  266. <grammar content-type="application/srgs+xml>
  267. <![CDATA[
  268. <grammar xmlns="http://www.w3.org/2001/06/grammar"
  269. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  270. xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
  271. xml:lang="en-US" version="1.0">
  272. <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
  273. ]]]]><![CDATA[>
  274. </grammar>
  275. </input>
  276. ]]>
  277. </alias>
  278. <alias name="input_voice_yesno_unimrcp_timeout" target="call">
  279. <![CDATA[
  280. <input xmlns="urn:xmpp:rayo:input:1" mode="voice" recognizer="unimrcp" max-silence="5000" initial-timeout="5000">
  281. <grammar content-type="application/srgs+xml>
  282. <![CDATA[
  283. <grammar xmlns="http://www.w3.org/2001/06/grammar"
  284. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  285. xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
  286. xml:lang="en-US" version="1.0">
  287. <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
  288. ]]]]><![CDATA[>
  289. </grammar>
  290. </input>
  291. ]]>
  292. </alias>
  293. <alias name="input_voice_yesno_pocketsphinx" target="call">
  294. <![CDATA[
  295. <input xmlns="urn:xmpp:rayo:input:1" mode="voice" recognizer="pocketsphinx" max-silence="5000" initial-timeout="5000">
  296. <grammar content-type="application/srgs+xml>
  297. <![CDATA[
  298. <grammar xmlns="http://www.w3.org/2001/06/grammar"
  299. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  300. xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
  301. xml:lang="en-US" version="1.0">
  302. <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
  303. ]]]]><![CDATA[>
  304. </grammar>
  305. </input>
  306. ]]>
  307. </alias>
  308. <alias name="input_voice_yesno_default" target="call">
  309. <![CDATA[
  310. <input xmlns="urn:xmpp:rayo:input:1" mode="voice" max-silence="5000" initial-timeout="5000">
  311. <grammar content-type="application/srgs+xml>
  312. <![CDATA[
  313. <grammar xmlns="http://www.w3.org/2001/06/grammar"
  314. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  315. xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
  316. xml:lang="en-US" version="1.0">
  317. <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
  318. ]]]]><![CDATA[>
  319. </grammar>
  320. </input>
  321. ]]>
  322. </alias>
  323. </aliases>
  324. </configuration>