freetdm.conf.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. <!-- Please refer to http://wiki.freeswitch.org/wiki/FreeTDM for further documentation -->
  2. <!--
  3. This is a sample FreeSWITCH XML configuration for FreeTDM
  4. Remember you still need to configure freetdm.conf (no XML extension) in $prefix/conf/
  5. directory of FreeSWITCH. The freetdm.conf (no XML extension) is a simple text file
  6. definining the I/O interfaces (Sangoma, DAHDI etc). This file (freetdm.conf.xml) deals
  7. with the signaling protocols that you can run on top of your I/O interfaces.
  8. -->
  9. <configuration name="freetdm.conf" description="FreeTDM Configuration">
  10. <settings>
  11. <param name="debug" value="0"/>
  12. <!--<param name="hold-music" value="$${moh_uri}"/>-->
  13. <!-- Analog global options (they apply to all spans)
  14. Remember you can only choose between either call-swap
  15. or 3-way, not both!
  16. -->
  17. <!--<param name="enable-analog-option" value="call-swap"/>-->
  18. <!--<param name="enable-analog-option" value="3-way"/>-->
  19. <!--
  20. Refuse to load the module if there is configuration errors
  21. Defaults to 'no'
  22. -->
  23. <!--<param name="fail-on-error" value="no"/>-->
  24. </settings>
  25. <!-- Sample analog configuration (The analog_spans tag is for ftmod_analog) -->
  26. <analog_spans>
  27. <!-- The span name must match the name in your freetdm.conf -->
  28. <span name="myAnalog">
  29. <!--<param name="hold-music" value="$${moh_uri}"/>-->
  30. <!--
  31. 3-way allows you to flash your FXS line and dial
  32. another number and put all the parties in a conference
  33. call-swap allows you to flash your FXS line and swap
  34. between one call and another
  35. Remember you can only choose between either call-swap
  36. or 3-way, not both!
  37. <param name="enable-analog-option" value="call-swap"/>
  38. <param name="enable-analog-option" value="3-way"/>
  39. -->
  40. <!-- Tones are defined in tones.conf
  41. This setting is very important for analog lines to
  42. work properly
  43. -->
  44. <param name="tonegroup" value="us"/>
  45. <!-- How much time to wait for digits (in FXS lines) -->
  46. <param name="digit-timeout" value="2000"/>
  47. <!-- Maximum number of digits to wait for (in FXS lines) -->
  48. <param name="max-digits" value="11"/>
  49. <!-- whether you want to wait for caller id -->
  50. <param name="enable-callerid" value="true"/>
  51. <!-- How much to wait for dial tone (0 if you just want to dial out immediately without waiting for dial tone) -->
  52. <!--<param name="wait-dialtone-timeout" value="5000"/>-->
  53. <!-- whether you want to enable callwaiting feature -->
  54. <!--<param name="callwaiting" value="true"/>-->
  55. <!-- whether you want to answer/hangup on polarity reverse for outgoing calls in FXO devices
  56. and send polarity reverse on answer/hangup for incoming calls in FXS devices -->
  57. <!--<param name="answer-polarity-reverse" value="false"/>-->
  58. <!--<param name="hangup-polarity-reverse" value="false"/>-->
  59. <!--
  60. Minimum delay (in milliseconds) required between an answer polarity reverse
  61. and hangup polarity reverse in order to assume the second polarity reverse is a real hangup
  62. <param name="polarity-delay" value="600"/>
  63. -->
  64. <!-- Retrieve caller id on polarity reverse -->
  65. <!--
  66. <param name="polarity-callerid" value="true"/>
  67. -->
  68. <!-- regex to stop dialing when it matches -->
  69. <!--<param name="dial-regex" value="5555"/>-->
  70. <!-- regex to stop dialing when it does not match -->
  71. <!--<param name="fail-dial-regex" value="^5"/>-->
  72. <!-- FreeSWITCH dialplan type and context to send the calls -->
  73. <param name="dialplan" value="XML"/>
  74. <param name="context" value="default"/>
  75. </span>
  76. </analog_spans>
  77. <!--
  78. openr2 (MFC-R2 signaling) spans (ftmod_r2)
  79. In order to use this type of spans your FreeTDM must have been compiled with ftmod_r2 module.
  80. The module is compiled if the openr2 library is present when running the ./configure script
  81. in the FreeTDM source code
  82. MFC-R2 signaling has lots of variants from country to country and even sometimes
  83. minor variants inside the same country. The only mandatory parameters here are:
  84. variant, but typically you also want to set max_ani and max_dnis.
  85. IT IS RECOMMENDED that you leave the default values (leaving them commented) for the
  86. other parameters unless you have problems or you have been instructed to change some
  87. parameter. OpenR2 library uses the 'variant' parameter to try to determine the
  88. best defaults for your country. If you want to contribute your configs for a particular
  89. country send them to the e-mail of the primary OpenR2 developer that you can find in the
  90. AUTHORS file of the OpenR2 package, they will be added to the samples directory of openr2.
  91. -->
  92. <r2_spans>
  93. <span name="wp1" cfgprofile="testr2">
  94. <!--
  95. MFC/R2 variant. This depends on the OpenR2 supported variants
  96. A list of values can be found by executing the openr2 command r2test -l
  97. some valid values are:
  98. mx (Mexico)
  99. ar (Argentina)
  100. br (Brazil)
  101. ph (Philippines)
  102. itu (per ITU spec)
  103. -->
  104. <param name="variant" value="mx"/>
  105. <!-- switch parameters (required), where to send calls to -->
  106. <param name="dialplan" value="XML"/>
  107. <param name="context" value="default"/>
  108. <!--
  109. Max amount of ANI (caller id digits) to ask for
  110. <param name="max_ani" value="4"/>
  111. -->
  112. <!--
  113. Max amount of DNIS to ask for
  114. <param name="max_dnis" value="4"/>
  115. -->
  116. <!-- Do not set parameters below this line unless you desire to tweak it because is not working -->
  117. <!--
  118. Whether or not to get the ANI before getting DNIS (only affects incoming calls)
  119. Some telcos require ANI first some others do not care, if default go wrong on
  120. incoming calls, change this value
  121. <param name="get_ani_first" value="yes"/>
  122. -->
  123. <!--
  124. Caller Category to send. Accepted values:
  125. - national_subscriber
  126. - national_priority_subscriber
  127. - international_subscriber
  128. - international_priority_subscriber
  129. - collect_call
  130. Usually national_subscriber (the default) works just fine
  131. <param name="category" value="national_subscriber"/>
  132. -->
  133. <!--
  134. Brazil uses a special calling party category for collect calls (llamadas por cobrar)
  135. instead of using the operator (as in Mexico). The R2 spec in Brazil says a special GB tone
  136. should be used to reject collect calls. If you want to ALLOW collect calls specify 'yes',
  137. if you want to BLOCK collect calls then say 'no'. Default is to block collect calls.
  138. (see also 'double_answer')
  139. <param name="allow_collect_calls" value="yes"/>
  140. -->
  141. <!--
  142. This feature is related but independent of allow_collect_calls
  143. Some PBX's require a double-answer process to block collect calls, if
  144. you ever have problems blocking collect calls using Group B signals (allow_collect_calls=no)
  145. then you may want to try with double_answer=yes, this will cause that every answer signal
  146. is changed to perform 'answer -> clear back -> answer' (sort of a flash)
  147. (see also 'allow_collect_calls')
  148. <param name="double_answer" value="yes"/>
  149. -->
  150. <!--
  151. This feature allows to skip the use of Group B/II signals and go directly
  152. to the accepted state for incoming calls
  153. <param name="immediate_accept" value="yes"/>
  154. -->
  155. <!--
  156. Skip request of calling party category and ANI
  157. <param name="skip_category" value="yes"/>
  158. -->
  159. <!--
  160. Brazil use a special signal to force the release of the line (hangup) from the
  161. backward perspective. When forced_release=no, the normal clear back signal
  162. will be sent on hangup, which is OK for all mfcr2 variants I know of, except for
  163. Brazilian variant, where the central will leave the line up for several seconds (30, 60)
  164. which sometimes is not what people really want. When forced_release=yes, a different
  165. signal will be sent to hangup the call indicating that the line should be released immediately
  166. <param name="forced_release" value="yes"/>
  167. -->
  168. <!--
  169. Whether or not report to the other end 'accept call with charge'
  170. This setting has no effect with most telecos, usually is safe
  171. leave the default (yes), but once in a while when interconnecting with
  172. old PBXs this may be useful.
  173. Concretely this affects the Group B signal used to accept calls
  174. <param name="charge_calls" value="yes"/>
  175. -->
  176. <!--
  177. MFC/R2 value in milliseconds for the MF timeout. Any negative value
  178. means 'default', smaller values than 500ms are not recommended
  179. and can cause malfunctioning. If you experience protocol error
  180. due to MF timeout try incrementing this value in 500ms steps
  181. <param name="mfback_timeout" value="1500"/>
  182. -->
  183. <!--
  184. MFC/R2 value in milliseconds for the metering pulse timeout.
  185. Metering pulses are sent by some telcos for some R2 variants
  186. during a call presumably for billing purposes to indicate costs,
  187. however this pulses use the same signal that is used to indicate
  188. call hangup, therefore a timeout is sometimes required to distinguish
  189. between a *real* hangup and a billing pulse that should not
  190. last more than 500ms, If you experience call drops after some
  191. minutes of being stablished try setting a value of some ms here,
  192. values greater than 500ms are not recommended.
  193. BE AWARE that choosing the proper protocol variant parameter
  194. implicitly sets a good recommended value for this timer, use this
  195. parameter only when you *really* want to override the default, otherwise
  196. just comment out this value.
  197. <param name="metering_pulse_timeout" value="1000"/>
  198. -->
  199. <!--
  200. WARNING: advanced users only! I really mean it
  201. this parameter is commented by default because
  202. YOU DON'T NEED IT UNLESS YOU REALLY GROK MFC/R2
  203. READ COMMENTS on doc/r2proto.conf in openr2 package
  204. for more info
  205. <param name="advanced_protocol_file" value="/usr/local/freeswitch/conf/r2proto.conf"/>
  206. -->
  207. <!-- USE THIS FOR DEBUGGING MFC-R2 PROTOCOL -->
  208. <!--
  209. Where to dump advanced call file protocol logs
  210. <param name="logdir" value="$${base_dir}/log/mfcr2"/>
  211. -->
  212. <!--
  213. MFC/R2 valid logging values are: all,error,warning,debug,notice,cas,mf,nothing
  214. error,warning,debug and notice are self-descriptive
  215. 'cas' is for logging ABCD CAS tx and rx
  216. 'mf' is for logging of the Multi Frequency tones
  217. You can mix up values, like: loglevel=error,debug,mf to log just error, debug and
  218. multi frequency messages
  219. 'all' is a special value to log all the activity
  220. 'nothing' is a clean-up value, in case you want to not log any activity for
  221. a channel or group of channels
  222. BE AWARE that the level of output logged will ALSO depend on
  223. the value you have in FreeSWITCH logging configurations, if you disable output FreeSWITCH
  224. then it does not matter if you specify 'all' here, nothing will be logged
  225. so FreeSWITCH has the last word on what is going to be logged
  226. <param name="logging" value="debug,notice,warning,error,mf,cas"/>
  227. -->
  228. <!--
  229. whether or not to drop protocol call files into 'logdir'
  230. <param name="call_files" value="yes"/>
  231. -->
  232. <!--
  233. Use only for very technical debugging
  234. This is the size (if 0, dumps are disabled) of MF dump files. MF dump files
  235. are audio files that are dumped when a protocol error occurs.
  236. The files are dumped in whatever you set in the logdir parameter.
  237. Value -1 uses a default recommended size (which stores 5 seconds of audio)
  238. <param name="mf_dump_size" value="-1"/>
  239. -->
  240. </span>
  241. </r2_spans>
  242. <!-- Sangoma ISDN PRI/BRI spans. Requires libsng_isdn to be installed -->
  243. <sangoma_pri_spans>
  244. <span name="wp1">
  245. <!--
  246. Switch emulation/Variant
  247. Possible values are:
  248. national
  249. 4ess
  250. 5ess
  251. qsig
  252. euroisdn
  253. ntt
  254. <param name="switchtype" value="national"/>
  255. -->
  256. <!--
  257. Signalling
  258. Possible values are:
  259. net
  260. cpe
  261. <param name="signalling" value="cpe"/>
  262. -->
  263. <!--
  264. Overlap - whether to support overlap receive
  265. Possible values are: Yes/No
  266. <param name="overlap" value="yes"/>
  267. -->
  268. <!--
  269. Facility - whether to support facility messages
  270. Possible values are: Yes/No
  271. <param name="facility" value="yes"/>
  272. -->
  273. <!--
  274. Minimum Digits
  275. In overlap receive mode.
  276. Minimum number of digits to receive before sending notification
  277. to the dialplan
  278. Possible values are: <Any digit>
  279. <param name="min-digits" value="8"/>
  280. -->
  281. <!--
  282. TEI - default value for Terminal Equipment Identifier.
  283. Used in Point-to-point connections
  284. Possible values are: <1-127>
  285. <param name="tei" value="0"/>
  286. -->
  287. <!--
  288. Type of Number (TON)
  289. Set the TON on outbound calls
  290. Possible values are:
  291. unknown
  292. international
  293. national
  294. network-specific
  295. subscriber-number
  296. abbreviated-number
  297. <param name="outbound-called-ton" value="unknown"/>
  298. <param name="outbound-calling-ton" value="unknown"/>
  299. <param name="outbound-rdnis-ton" value="unknown"/>
  300. -->
  301. <!--
  302. Numbering Plan Indendification (NPI)
  303. Set the NPI on outbound calls
  304. Possible values are:
  305. unknown
  306. isdn
  307. data
  308. telex
  309. national
  310. private
  311. reserved
  312. <param name="outbound-called-npi" value="unknown"/>
  313. <param name="outbound-calling-npi" value="unknown"/>
  314. <param name="outbound-rdnis-npi" value="unknown"/>
  315. -->
  316. <!--
  317. Bearer Capability - Transfer Capability
  318. Set the Bearer Capability - Transfer Capability on outbound calls
  319. Possible values are:
  320. speech
  321. unrestricted-digital-information
  322. restricted-digital-information
  323. 3.1-Khz-audio
  324. 7-Khz-audio
  325. 15-Khz-audio
  326. video
  327. <param name="outbound-bc-transfer-cap" value="speech"/>
  328. -->
  329. <!--
  330. Bearer Capability - User Layer 1
  331. Set the Bearer Capability - User Layer 1 on outbound calls
  332. Possible values are:
  333. V.110
  334. ulaw
  335. alaw
  336. <param name="outbound-bc-user-layer1" value="speech"/>
  337. -->
  338. <!--
  339. Channel Restart Timeout
  340. If we do not receive a RESTART message within this timeout on link
  341. UP, we will send a channel restart.
  342. <param name="channel-restart-timeout" value="20"/>
  343. -->
  344. <!--
  345. Local Number (MSN)
  346. On incoming calls, we will only respond to this call if
  347. the Called Party Number matches this value.
  348. Note: Up to 8 local numbers can be added per span.
  349. <param name="local-number" value="9054741990"/>
  350. -->
  351. <!--
  352. Facility Timeout
  353. Amount of time to wait for the FACILITY message after a SETUP message is
  354. received
  355. <param name="facility-timeout" value="1"/>
  356. -->
  357. <!--
  358. Transfer Timeout
  359. Amount of time to wait for the remote switch to respond to a transfer request
  360. <param name="transfer-timeout" value="20"/>
  361. -->
  362. <!--
  363. AT&T Transfer - Remove DTMF
  364. Whether to remove DTMF tones received from remote switch when performing
  365. AT&T Transfer.
  366. <param name="att-remove-dtmf" value="yes/no"/>
  367. -->
  368. <!--
  369. Facility Information Element Decoding
  370. Whether to decode contents within Facility IE. You should only disable this option if your custom application has its own Facility IE decoding.
  371. <param name="facility-ie-decode" value="yes/no"/>
  372. -->
  373. <!--
  374. Ignore cause value
  375. When using 5ESS switchtype, whether or not do initiate disconnects based on cause code.
  376. <param name="ignore-cause-value" value="yes/no"/>
  377. -->
  378. <!--
  379. Trace (Interpreted)
  380. Whether or not to enable Q921/Q931 trace on start
  381. <param name="q931-trace" value="yes/no"/>
  382. <param name="q921-trace" value="yes/no"/>
  383. -->
  384. <!--
  385. Trace (Raw)
  386. Whether or not to enable Q921/Q931 trace on start
  387. <param name="q931-raw-trace" value="yes/no"/>
  388. <param name="q921-raw-trace" value="yes/no"/>
  389. -->
  390. <!--
  391. Force sending complete
  392. Will add Sending Complete IE to outgoing SETUP message
  393. By default, enabled on EuroISDN, disabled on US variants.
  394. <param name="force-sending-complete" value="yes/no"/>
  395. -->
  396. <!--
  397. Early Media Override
  398. Assume early media is available, even if Q.931 message does not have
  399. progress indicator IE = in-band data ready
  400. Possible values
  401. on-proceed
  402. on-progress
  403. on-alert
  404. <param name="early-media-override" value="on-alert"/>
  405. -->
  406. <!--
  407. Invert Channel ID Invert Bit
  408. Invert the Channel ID Extend Bit
  409. <param name="chan-id-invert-extend-bit" value="yes/no"/>
  410. -->
  411. <!--
  412. CID Name transmit method
  413. How to transmit Caller ID Name
  414. Possible values:
  415. display-ie
  416. user-user-ie
  417. facility-ie
  418. default (will transmit CID-Name based on variant)
  419. <param name="cid-name-transmit-method" value="default"/>
  420. -->
  421. <!--
  422. CID Name transmit
  423. Whether to transmit Caller ID Name
  424. Possible values:
  425. yes - always send CID-name
  426. no - nether send CID-name
  427. default (will transmit CID-Name based on variant)
  428. <param name="cid-name-transmit-method" value="default"/>
  429. -->
  430. <!--
  431. Send CONNECT ACK
  432. Whether to send a Connect Ack
  433. Possible values:
  434. yes - send connect ack
  435. no - do not send connect ack
  436. default (will transmit Connect Ack based on variant + signaling)
  437. <param name="send-connect-ack" value="yes"/>
  438. -->
  439. <!--
  440. Q.931 Timers in seconds
  441. Override default Q.931 values
  442. timers:
  443. timer-t301
  444. timer-t302
  445. timer-t303
  446. timer-t304
  447. timer-t305
  448. timer-t306
  449. timer-t307
  450. timer-t308
  451. timer-t310
  452. timer-t312
  453. timer-t313
  454. timer-t314
  455. timer-t316
  456. timer-t318
  457. timer-t319
  458. timer-t322
  459. <param name="timer-t301" value="10"/>
  460. -->
  461. </span>
  462. </sangoma_pri_spans>
  463. <!--
  464. PRI passive tapping spans. Requires patched version from libpri at http://svn.digium.com/svn/libpri/team/moy/tap-1.4
  465. You must also configure FreeTDM with "-with-pritap" (see ./configure help for details)
  466. -->
  467. <pritap_spans>
  468. <span name="tapped1">
  469. <!-- The peer span name used to tap the link -->
  470. <param name="peerspan" value="tapped2"/>
  471. <!--
  472. Whether to mix the audio from the peerspan with the audio from this span
  473. This is most likely what you want (and therefore the default) so you can hear
  474. the full conversation being tapped instead of just one side
  475. -->
  476. <!-- <param name="mixaudio" value="yes"/> -->
  477. <!-- switch parameters (required), where to send calls to -->
  478. <param name="dialplan" value="XML"/>
  479. <param name="context" value="default"/>
  480. </span>
  481. <span name="tapped2">
  482. <!-- This span is linked to "tapped1" through its peerspan parameter -->
  483. <param name="peerspan" value="tapped1"/>
  484. <!-- <param name="mixaudio" value="yes"/> -->
  485. <!-- switch parameters (required), where to send calls to -->
  486. <param name="dialplan" value="XML"/>
  487. <param name="context" value="default"/>
  488. </span>
  489. </pritap_spans>
  490. <!--
  491. GSM spans (libwat must be installed when configuring the freetdm build)
  492. -->
  493. <gsm_spans>
  494. <span name="gsm01">
  495. <!-- where to send inbound calls to -->
  496. <param name="dialplan" value="XML" />
  497. <param name="context" value="module1" />
  498. <!--
  499. GSM module type
  500. Accepted values: "telit", "telit-gc864", "telit-he910", "telit-cc864", "telit-de910", "motorola"
  501. -->
  502. <param name="moduletype" value="telit-gc864" />
  503. <!--
  504. Debug mask (accepted values: all, uart_raw, uart_raw, call_state, span_state, at_parse, at_handle, sms_encode, sms_decode, none)
  505. comma-separated values are accepted to combine those levels
  506. -->
  507. <param name="debug" value="all" />
  508. <!--
  509. Whether to enable HW DTMF in the hardware module
  510. Accepted values: true, generate, detect, false
  511. -->
  512. <param name="hwdtmf" value="true" />
  513. <!--
  514. This enables conditional forwarding on module startup
  515. -->
  516. <!-- <param name="conditional-forwarding-prefix" value="*71" /> -->
  517. <!-- <param name="conditional-forwarding-number" value="123456789" /> -->
  518. <!--
  519. This enables immediate forwarding logic to simulate hunt groups
  520. The syntax for immediate-forwarding-numbers ia a comma-separated
  521. list of elements in the form [<span-name>:]<number>
  522. if span-name is specified, the span will be checked for availability
  523. before enabling forwarding to that span number
  524. The span-name must be a defined freetdm span name
  525. If the span-name is not specified then only first number specified is used for
  526. forwarding whenever this span is busy
  527. -->
  528. <!-- <param name="immediate-forwarding-prefix" value="*72" /> -->
  529. <!-- <param name="immediate-forwarding-numbers" value="gsm02:123456789" /> -->
  530. <!-- Number to dial to disable forwarding when the call ends (if immediate forwarding was enabled) -->
  531. <!-- <param name="disable-forwarding-number" value="*73" /> -->
  532. <!-- Startup raw AT commands to run, you can repeat this parameter as many times as needed -->
  533. <!-- <param name="startup-command" value="AT$GPSP=1" /> -->
  534. <!-- <param name="startup-command" value="AT$GPSAT=1" /> -->
  535. </span>
  536. </gsm_spans>
  537. </configuration>