README.misdn 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. mISDN Channel Driver for Asterisk PBX
  2. ======================================
  3. This package contains the mISDN Channel Driver for the Asterisk PBX. It
  4. supports every mISDN Hardware and provides an interface for asterisk.
  5. Features:
  6. ---------
  7. * NT and TE mode
  8. * PP and PMP mode
  9. * BRI and PRI (with BNE1 and BN2E1 Cards)
  10. * Hardware Bridging
  11. * DTMF Detection in HW+mISDNdsp (much better than asterisks internal!)
  12. * Display Messages to Phones (which support display msg)
  13. * HOLD/RETRIEVE/TRANSFER on ISDN Phones : )
  14. * Screen/ Not Screen User Number
  15. * Basic EchoCancellation
  16. * Volume Control
  17. * Crypting with mISDNdsp (Blowfish)
  18. * Data (HDLC) callthrough
  19. * Data Calling (with app_ptyfork +pppd)
  20. * Echo cancellation
  21. * CallDeflection
  22. * Some other
  23. Supported Hardware:
  24. -------------------
  25. chan_misdn supports any mISDN compatible Hardware.
  26. Overview
  27. --------
  28. - Fast Installation Guide
  29. - Pre-Requisites
  30. - Compilation
  31. - Installation
  32. - Configuration
  33. - Dial and Options String
  34. - misdn cli commands
  35. - mISDN Variables
  36. - Debugging and sending Bugreports
  37. - Examples
  38. - Known working Configurations
  39. - Known Problems
  40. - Changes
  41. Fast Installation Guide
  42. -----------------------
  43. It is easy to install mISDN and mISDNuser. Using the Makefile from
  44. channels/misdn. You just need to type:
  45. cd channels/misdn
  46. make misdn
  47. Then all the necessary files are fetched from isdn4linux.de.
  48. Pre-Requisites
  49. --------------
  50. To compile and install this driver, you'll need at least one mISDN Driver and
  51. the mISDNuser package. Chan_misdn works with both, the current release version
  52. and the development (svn trunk) version of Asterisk. mISDNuser and mISDN must
  53. be fetched from cvs.isdn4linux.de.
  54. Please Note that mISDN works good for the linux-2.6.x kernels. Some of the
  55. mISDN drivers do not compile against the 2.4.x or older kernels, you can patch
  56. them, but than you'll get mysterious errors.
  57. Using Kernels > 2.6.9 works perfect.
  58. Ok so far so good, now follow the compilation instructions.
  59. !! Dont forget to create the /dev/mISDN device node.
  60. Compilation
  61. -----------
  62. The compilation of chan_misdn requires a library which will be generated under
  63. channels/misdn/.
  64. To compile this library you just need to go into this directory and type
  65. make. Now you can go back to the asterisk source root and type make install
  66. again, which now should compile and install chan_misdn.
  67. Installation
  68. ------------
  69. Chan_misdn is automatically installed by the asterisk installation process.
  70. There is a sample init.d script for loading the mISDN modules (mISDN.sample),
  71. 5Asimply copy it to /etc/init.d/ and modify it, there you can enter your cards.
  72. !! Forget to use capi together with chan_misdn.
  73. Configuration
  74. -------------
  75. First of all you must configure the mISDN drivers. Each driver module has got
  76. an options and layermask option, which tells the driver wether to start in
  77. TE, NT, PP or PMP mode (there are lots more, please read docs in misdn for
  78. that).
  79. After thinking about the above you'll probably want to configure the
  80. misdn.conf file which resides in the asterisk config directory (normally
  81. /etc/asterisk).
  82. - misdn.conf: [general]
  83. The misdn.conf file contains a "general" Section, and user sections which
  84. contain misdn port settings and different Asterisk contexts.
  85. The general section contains especially a variable named context with which
  86. the default context is set. There is also the very important debug variable
  87. which you can set from the Asterisk cli (command line interface) or in this
  88. configuration file, bigger numbers will lead to more debug output. There's also a
  89. tracefile option, which takes a path+filename where debug output is written
  90. to.
  91. - misdn.conf: [default] section
  92. The default section is another special section which can contain all the
  93. options available int the usr/port sections. the user/port section inherit
  94. their parameters from the default section.
  95. - misdn.conf: user/port sections
  96. The user sections have names which are unequal to "general". Those sections
  97. contain the ports variable which mean the mISDN Ports. Here you can add
  98. multiple ports, comma separated.
  99. Espacially for TE-Mode Ports there is a msns variable. This variable tells the
  100. chan_misdn driver to listen for incomming calls with the given msns, you can
  101. insert a '*' as single msn, which leads in getting every incoming call (if
  102. you want to share on PMP TE S0 with a asterisk and a phone or isdn card you
  103. should insert here the msns which you'll like to give the Asterisk). Finally
  104. a context variable resides in the user sections, which tells chan_misdn where
  105. to send incoming calls to in the Asterisk dial plan (extension.conf).
  106. Dial and Options String
  107. -----------------------
  108. The dial string of chan_misdn got more complex, because we added more features,
  109. so the generic dial string looks like:
  110. mISDN/<port>|g:<group>/<extension>[/<OPTIONSSTRING>]
  111. The Optionsstring looks Like:
  112. :<optchar1><OptParam1>:<optchar2><OptParam2>
  113. the ":" character is the delimiter.
  114. The available Optchars are:
  115. d - Send display text on called phone, text is the optparam
  116. n - don't detect dtmf tones on called channel
  117. h - make digital outgoing call
  118. c - make crypted outgoing call, param is keyindex
  119. e - perform echo cancelation on this channel,
  120. takes taps as arguments (32,64,128,256)
  121. s - send Non Inband DTMF as inband
  122. vr - rxgain control
  123. vt - txgain control
  124. chan_misdn registers a new dial plan application "misdn_set_opt" when
  125. loaded. This application takes the Optionsstring as argument. The Syntax is:
  126. misdn_set_opt(<OPTIONSSTRING>)
  127. When you set options in the dialstring, the options are set in the external
  128. channel. When you set options with misdn_set_opt, they are set in the current
  129. incoming channel. So if you like to use static encryption, the scenario looks
  130. as follows:
  131. Phone1 --> * Box 1 --> PSTN_TE
  132. PSTN_TE --> * Box 2 --> Phone2
  133. The Encryption must be done on the PSTN sides, so the dialplan on the boxes
  134. are:
  135. * Box 1:
  136. exten => _${CRYPT_PREFIX}X.,1,Dial(mISDN/g:outbound/:c1)
  137. * Box 2:
  138. exten => ${CRYPT_MSN},1,misdn_set_opt(:c1)
  139. exten => ${CRYPT_MSN},2,dial(${PHONE2})
  140. misdn cli commands
  141. ------------------
  142. At the Asterisk cli you can try to type in:
  143. misdn <tab> <tab>
  144. Now you should see the misdn cli commands:
  145. - clean
  146. -> pid (cleans a broken call, use with care, leads often
  147. to a segmentation fault)
  148. - send
  149. -> display (sends a Text Message to a Asterisk channel,
  150. this channel must be an misdn channel)
  151. - set
  152. -> debug (sets debug level)
  153. - show
  154. -> config (shows the configuration options)
  155. -> channels (shows the current active misdn channels)
  156. -> channel (shows details about the given misdn channels)
  157. -> stacks (shows the currend ports, there protocols and states)
  158. -> fullstacks (shows the current active and inactive misdn channels)
  159. - restart
  160. -> port (restarts given port (L2 Restart) )
  161. - reload (reloads misdn.conf)
  162. You can only use "misdn send display" when an Asterisk channel is created and
  163. isdn is in the correct state. "correct state" means that you have established a
  164. call to another phone (mustn't be isdn though).
  165. Then you use it like this:
  166. misdn send display mISDN/1/101 "Hello World!"
  167. where 1 is the Port of the Card where the phone is plugged in, and 101 is the
  168. msn (callerid) of the Phone to send the text to.
  169. mISDN Variables
  170. ---------------
  171. mISDN Exports/Imports a few Variables:
  172. - MISDN_ADDRESS_COMPLETE : Is either set to 1 from the Provider, or you
  173. can set it to 1 to force a sending complete.
  174. Debugging and sending bug reports
  175. ---------------------------------
  176. If you encounter problems, you should set up the debugging flag, usually debug=1
  177. should be enough. the messages are divided in asterisk and misdn parts.
  178. Misdn Debug messages begin with an 'I', asterisk messages begin with an '*',
  179. the rest is clear I think.
  180. Please take a trace of the problem and open a report in the Asterisk issue
  181. tracker at http://bugs.digium.com in the "channel drivers" project,
  182. "chan_misdn" category. Read the bug guidelines to make sure you
  183. provide all the information needed.
  184. Examples
  185. --------
  186. Here are some examples of how to use chan_misdn in the dialplan (extensions.conf):
  187. [globals]
  188. OUT_PORT=1 ; The physical Port of the Card
  189. OUT_GROUP=ExternE1 ; The Group of Ports defined in misdn.conf
  190. [misdnIn]
  191. exten => _X.,1,Dial(mISDN/${OUT_PORT}/${EXTEN})
  192. exten => _0X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1})
  193. exten => _1X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1}/:dHello)
  194. exten => _1X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1}/:dHello Test:n)
  195. In the last line you will notice the last argument (Hello), this is sended
  196. as Display Message to the Phone.
  197. Known working configurations
  198. ----------------------------
  199. In this section I'll put working configurations for chan_misdn. Beware It
  200. seems that between Kernel 2.6.3 and Kernel 2.6.8 there were lots of mISDN
  201. Bugs. I use Kernel 2.6.9 now, it works quite ok, Kernel 2.6.10+ has changed
  202. the pci_find_subgsys funktion, so hfc_multi from mISDN doesn't compile against
  203. it, you can just change pci_find_subsys to pci_get_subsys, this works.
  204. - chan_misdn-0.2.1
  205. * linux-kernel >= 2.6.8 (but at least 2.6)
  206. * asterisk >= v1.2 , also CVS Head
  207. * mISDN/mISDNuser (3.0) from isdn.jolly.de
  208. Known Problems
  209. --------------
  210. * When I use mISDN->IAX I cannot make Trunk calls
  211. -> You need to use ztdummy as dummy zaptel interface for the iax timing in
  212. trunking mode, simply grab libpri, zaptel and compile them (i think you need
  213. to modify the makefile in zaptel to add ztdummy to the defaultly compiled
  214. modules) then modprobe ztdummy, this resolves the problem.
  215. * I cannot hear any tone after succesfull CONNECT to other end
  216. -> you forgot to load mISDNdsp, which is now needed by chan_misdn for switching
  217. and dtmf tone detection
  218. * I have strange ISDN behavior: sometimes I hear the other end, sometimes
  219. not. Also I get STATUS Events with cause 100, with misdn debugging
  220. -> Please update to newest version of chan_misdn and set the te_choose_channel
  221. option in misdn.conf to yes
  222. Changes
  223. -------
  224. in the Changes File