2005-10-31 22:51:12 +00:00
|
|
|
mISDN Channel Driver for Asterisk PBX
|
|
|
|
======================================
|
|
|
|
|
|
|
|
|
|
|
|
This package contains the mISDN Channel Driver for the Asterisk PBX. It
|
|
|
|
supports every mISDN Hardware and provides an interface for asterisk.
|
|
|
|
|
|
|
|
Features:
|
2005-12-01 22:54:58 +00:00
|
|
|
---------
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
* NT and TE mode
|
|
|
|
* PP and PMP mode
|
|
|
|
* BRI and PRI (with BNE1 and BN2E1 Cards)
|
|
|
|
* DTMF Detection in HW+mISDNdsp (much better than asterisks internal!)
|
|
|
|
* Display Messages to Phones (which support display msg)
|
|
|
|
* HOLD/RETRIEVE/TRANSFER on ISDN Phones : )
|
|
|
|
* Screen/ Not Screen User Number
|
|
|
|
* Basic EchoCancellation
|
|
|
|
* Volume Control
|
|
|
|
* Crypting with mISDNdsp (Blowfish)
|
|
|
|
* Data (HDLC) callthrough
|
2005-12-01 22:54:58 +00:00
|
|
|
* Data Calling (with app_ptyfork +pppd)
|
|
|
|
* Echo cancellation
|
|
|
|
* Some other
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
Supported Hardware:
|
2005-12-01 22:54:58 +00:00
|
|
|
-------------------
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
chan_misdn supports any mISDN compatible Hardware. Especially the 1-8 Port
|
|
|
|
BRI Cards available from http://shop.beronet.com
|
|
|
|
|
|
|
|
Overview
|
|
|
|
--------
|
|
|
|
|
|
|
|
- Fast Installation Guide
|
|
|
|
- Pre-Requisites
|
|
|
|
- Compilation
|
|
|
|
- Installation
|
|
|
|
- Configuration
|
|
|
|
- Dial and Options String
|
|
|
|
- misdn cli commands
|
|
|
|
- Debugging and sending Bugreports
|
|
|
|
- Examples
|
|
|
|
- Known working Configurations
|
|
|
|
- Known Problems
|
|
|
|
- Changes
|
|
|
|
|
|
|
|
|
|
|
|
Fast Installation Guide
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
You have two options on how to install chan_misdn.
|
|
|
|
|
|
|
|
(1) Requirements:
|
|
|
|
- mISDN and mISDNuser from jolly (see Pre-Requisites below)
|
|
|
|
Installation:
|
|
|
|
- cd <asterisk-src-dir>/channels/misdn
|
|
|
|
- edit Makefile so that MISDNUSER points to your mISDNuser directory
|
|
|
|
- run 'make'
|
|
|
|
- cd <asterisk-src-dir>
|
|
|
|
- compile and install asterisk via 'make install'
|
|
|
|
|
|
|
|
(2) Requirements:
|
|
|
|
- Asterisk headers and Kernel headers
|
|
|
|
Description:
|
|
|
|
The Makefile gets the newest mISDN and mISDNuser Sources from
|
|
|
|
jollys webpage and the newest release of chan_misdn from beronets
|
|
|
|
Servers. After that it compiles and installs everything (hopefully).
|
|
|
|
Installation:
|
|
|
|
- cd /usr/src
|
|
|
|
- wget http://www.beronet.com/downloads/install-misdn.tar.gz
|
|
|
|
- tar zxf install-misdn.tar.gz
|
|
|
|
- cd install-misdn
|
|
|
|
- make install
|
|
|
|
|
|
|
|
|
|
|
|
Pre-Requisites
|
|
|
|
--------------
|
|
|
|
|
|
|
|
To compile and install this driver, you'll need at least one mISDN Driver, the
|
2005-12-01 22:54:58 +00:00
|
|
|
mISDNuser package and the Asterisk includes (which will be inside of the
|
|
|
|
sources). Chan_misdn works with both, the current release version and the
|
|
|
|
development (svn trunk) version of Asterisk.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
To get the mISDN stuff please follow the instructions at
|
|
|
|
http://www.isdn4linux.de. Please Note that mISDN works good for the
|
|
|
|
linux-2.6.x kernels. Some of the mISDN drivers do not compile against the
|
2005-12-01 22:54:58 +00:00
|
|
|
2.4.x or older kernels, you can patch them, but than you'll get mysterious
|
2005-10-31 22:51:12 +00:00
|
|
|
errors.
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
I use Kernels > 2.6.9 and it works perfect. with kernels >= 2.6.10 there is a
|
2005-10-31 22:51:12 +00:00
|
|
|
very litle bug in hfc_multi.c which causes the module not to compile, it can
|
2005-12-01 22:54:58 +00:00
|
|
|
be easily fixed by changing pci_findsubsys to pci_getsubsys in code.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
Ok so far so good, now follow the compilation instructions.
|
|
|
|
|
|
|
|
!! Dont forget to create the /dev/mISDN device node.
|
|
|
|
|
|
|
|
Compilation
|
|
|
|
-----------
|
|
|
|
|
|
|
|
!! Be aware, in the actual mISDNuser package theres a bug in the Makefile
|
|
|
|
!! the compilation stops near iapplication.h, this isn't very important
|
|
|
|
!! at this step you are ready.
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
After you've successfully installed mISDN, mISDNuser and Asterisk, you should
|
2005-10-31 22:51:12 +00:00
|
|
|
modify the Makefile in the chan_misdn source path. There you can tell the
|
|
|
|
Makefile where to install the driver, sample-conf, and most important where it
|
2005-12-01 22:54:58 +00:00
|
|
|
can find the linux kernel includes, the mISDNuser package and the Asterisk
|
|
|
|
includes. If you use the development version of Asterisk (or at least a newer
|
|
|
|
version than release) uncomment the CCFLAGS+=-DASTERISK_STABLE, the release
|
|
|
|
version of Asterisk is at the moment v1-2 as subversion branch.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
Now you can type in:
|
|
|
|
|
|
|
|
make
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
This should compile chan_misdn.so, if there's an error check the paths in the
|
2005-10-31 22:51:12 +00:00
|
|
|
Makefile again.
|
|
|
|
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
|
|
|
After successful compilation of chan_misdn, you should simply type in:
|
|
|
|
|
|
|
|
make install
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
as privileged user to put chan_misdn.so in the Asterisk modules
|
2005-10-31 22:51:12 +00:00
|
|
|
directory.
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
You should see a message like: "Successfully installed chan_misdn".
|
2005-10-31 22:51:12 +00:00
|
|
|
Congratulations.
|
|
|
|
|
|
|
|
Theres a sample init.d script for loading the mISDN modules (mISDN.sample),
|
|
|
|
simply copy it to /etc/init.d/ and modify it, there you can enter your cards.
|
|
|
|
|
|
|
|
!! Forget to use capi together with chan_misdn.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
|
|
|
First of all you must configure the mISDN drivers. Each driver module has got
|
|
|
|
an options and layermask option, which tells the driver wether to start in
|
2005-12-01 22:54:58 +00:00
|
|
|
TE, NT, PP or PMP mode (there are lots more, please read docs in misdn for
|
2005-10-31 22:51:12 +00:00
|
|
|
that).
|
|
|
|
|
|
|
|
After thinking about the above you'll probably want to configure the
|
2005-12-01 22:54:58 +00:00
|
|
|
misdn.conf file which resides in the asterisk config directory (normally
|
|
|
|
/etc/asterisk).
|
2005-10-31 22:51:12 +00:00
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
- misdn.conf: [general]
|
2005-10-31 22:51:12 +00:00
|
|
|
The misdn.conf file contains a "general" Section, and user sections which
|
2005-12-01 22:54:58 +00:00
|
|
|
contain misdn port settings and different Asterisk contexts.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
The general section contains especially a variable named context with which
|
|
|
|
the default context is set. There is also the very important debug variable
|
2005-12-01 22:54:58 +00:00
|
|
|
which you can set from the Asterisk cli (command line interface) or in this
|
|
|
|
configuration file, bigger numbers will lead to more debug output. There's also a
|
|
|
|
tracefile option, which takes a path+filename where debug output is written
|
2005-10-31 22:51:12 +00:00
|
|
|
to.
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
- misdn.conf: user/port sections
|
|
|
|
The user sections have names which are unequal to "general". Those sections
|
2005-10-31 22:51:12 +00:00
|
|
|
contain the ports variable which mean the mISDN Ports. Here you can add
|
2005-12-01 22:54:58 +00:00
|
|
|
multiple ports, comma separated.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
Espacially for TE-Mode Ports there is a msns variable. This variable tells the
|
|
|
|
chan_misdn driver to listen for incomming calls with the given msns, you can
|
2005-12-01 22:54:58 +00:00
|
|
|
insert a '*' as single msn, which leads in getting every incoming call (if
|
2005-10-31 22:51:12 +00:00
|
|
|
you want to share on PMP TE S0 with a asterisk and a phone or isdn card you
|
2005-12-01 22:54:58 +00:00
|
|
|
should insert here the msns which you'll like to give the Asterisk). Finally
|
2005-10-31 22:51:12 +00:00
|
|
|
a context variable resides in the user sections, which tells chan_misdn where
|
2005-12-01 22:54:58 +00:00
|
|
|
to send incoming calls to in the Asterisk dial plan (extension.conf).
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
In NT-Mode Ports there is a new option, directly after the port number you can
|
2005-12-01 22:54:58 +00:00
|
|
|
write ptp, this enables PP Mode for this port, please look at misdn.conf.sample for
|
2005-10-31 22:51:12 +00:00
|
|
|
an example.
|
|
|
|
|
|
|
|
|
|
|
|
Dial and Options String
|
|
|
|
-----------------------
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
The dial string of chan_misdn got more complex, because we added more features,
|
|
|
|
so the generic dial string looks like:
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
mISDN/<port>|g:<group>/<extension>[/<OPTIONSSTRING>]
|
|
|
|
|
|
|
|
The Optionsstring looks Like:
|
|
|
|
:<optchar1><OptParam1>:<optchar2><OptParam2>
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
the ":" character is the delimiter.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
The available Optchars are:
|
|
|
|
d - Send display text on called phone, text is the optparam
|
|
|
|
n - don't detect dtmf tones on called channel
|
|
|
|
h - make digital outgoing call
|
|
|
|
c - make crypted outgoing call, param is keyindex
|
2005-12-01 22:54:58 +00:00
|
|
|
e - perform echo cancelation on this channel,
|
|
|
|
takes taps as arguments (32,64,128,256)
|
2005-10-31 22:51:12 +00:00
|
|
|
s - send Non Inband DTMF as inband
|
|
|
|
vr - rxgain control
|
|
|
|
vt - txgain control
|
|
|
|
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
chan_misdn registers a new dial plan application "misdn_set_opt" when loaded. This
|
2005-10-31 22:51:12 +00:00
|
|
|
application takes the Optionsstring as argument. The Syntax is:
|
|
|
|
|
|
|
|
misdn_set_opt(<OPTIONSSTRING>)
|
|
|
|
|
|
|
|
|
|
|
|
When you set options in the dialstring, the options are set in the external
|
|
|
|
channel. When you set options with misdn_set_opt, they are set in the current
|
|
|
|
incoming channel. So if you like to use static encryption, the scenario looks
|
|
|
|
as follows:
|
|
|
|
|
|
|
|
Phone1 --> * Box 1 --> PSTN_TE
|
|
|
|
PSTN_TE --> * Box 2 --> Phone2
|
|
|
|
|
|
|
|
The Encryption must be done on the PSTN sides, so the dialplan on the boxes
|
|
|
|
are:
|
|
|
|
|
|
|
|
* Box 1:
|
|
|
|
exten => _${CRYPT_PREFIX}X.,1,Dial(mISDN/g:outbound/:c1)
|
|
|
|
|
|
|
|
* Box 2:
|
|
|
|
exten => ${CRYPT_MSN},1,misdn_set_opt(:c1)
|
|
|
|
exten => ${CRYPT_MSN},2,dial(${PHONE2})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
misdn cli commands
|
|
|
|
------------------
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
At the Asterisk cli you can try to type in:
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
misdn <tab> <tab>
|
|
|
|
|
|
|
|
Now you should see the misdn cli commands:
|
|
|
|
|
|
|
|
- clean
|
|
|
|
-> pid (cleans a broken call, use with care, leads often
|
|
|
|
to a segmentation fault)
|
|
|
|
- send
|
2005-12-01 22:54:58 +00:00
|
|
|
-> display (sends a Text Message to a Asterisk channel,
|
2005-10-31 22:51:12 +00:00
|
|
|
this channel must be an misdn channel)
|
|
|
|
- set
|
|
|
|
-> debug (sets debug level)
|
|
|
|
- show
|
|
|
|
-> config (shows the configuration options)
|
|
|
|
-> channels (shows the current active misdn channels)
|
|
|
|
-> channel (shows details about the given misdn channels)
|
|
|
|
-> stacks (shows the currend ports, there protocols and states)
|
|
|
|
-> fullstacks (shows the current active and inactive misdn channels)
|
|
|
|
|
|
|
|
- restart
|
|
|
|
-> port (restarts given port (L2 Restart) )
|
|
|
|
|
|
|
|
- reload (reloads misdn.conf)
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
You can only use "misdn send display" when an Asterisk channel is created and
|
|
|
|
isdn is in the correct state. "correct state" means that you have established a
|
|
|
|
call to another phone (mustn't be isdn though).
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
Then you use it like this:
|
|
|
|
|
|
|
|
misdn send display mISDN/1/101 "Hello World!"
|
|
|
|
|
|
|
|
where 1 is the Port of the Card where the phone is plugged in, and 101 is the
|
|
|
|
msn (callerid) of the Phone to send the text to.
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
Debugging and sending bug reports
|
2005-10-31 22:51:12 +00:00
|
|
|
---------------------------------
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
If you encounter problems, you should set up the debugging flag, usually debug=1
|
|
|
|
should be enough. the messages are divided in asterisk and misdn parts.
|
|
|
|
Misdn Debug messages begin with an 'I', asterisk messages begin with an '*',
|
|
|
|
the rest is clear I think.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
Merged revisions 7265-7266,7268-7275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7265 | oej | 2005-12-01 17:18:14 -0600 (Thu, 01 Dec 2005) | 2 lines
Changing bug report address to the Asterisk issue tracker
........
r7266 | kpfleming | 2005-12-01 17:18:29 -0600 (Thu, 01 Dec 2005) | 3 lines
Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful
........
r7268 | kpfleming | 2005-12-01 17:34:58 -0600 (Thu, 01 Dec 2005) | 2 lines
ensure channel's scheduling context is freed (issue #5788)
........
r7269 | kpfleming | 2005-12-01 17:49:44 -0600 (Thu, 01 Dec 2005) | 2 lines
don't block waiting for the Festival server forever when it goes away (issue #5882)
........
r7270 | kpfleming | 2005-12-01 18:26:12 -0600 (Thu, 01 Dec 2005) | 2 lines
allow variables to exist on both 'halves' of the Local channel (issue #5810)
........
r7271 | kpfleming | 2005-12-01 18:28:48 -0600 (Thu, 01 Dec 2005) | 2 lines
protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
........
r7272 | kpfleming | 2005-12-01 18:39:00 -0600 (Thu, 01 Dec 2005) | 3 lines
properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)
........
r7273 | kpfleming | 2005-12-01 18:42:40 -0600 (Thu, 01 Dec 2005) | 2 lines
allow previous context-searching behavior to be used if desired (issue #5899)
........
r7274 | kpfleming | 2005-12-01 18:51:15 -0600 (Thu, 01 Dec 2005) | 2 lines
inherit channel variables into channels created by Page() application (issue #5888)
........
r7275 | oej | 2005-12-01 18:52:13 -0600 (Thu, 01 Dec 2005) | 2 lines
Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 01:01:11 +00:00
|
|
|
Please take a trace of the problem and open a report in the Asterisk issue
|
|
|
|
tracker at http://bugs.digium.com in the "channel drivers" project,
|
|
|
|
"chan_misdn" category. Read the bug guidelines to make sure you
|
|
|
|
provide all the information needed.
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
Here are some examples of how to use chan_misdn in the dialplan (extensions.conf):
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
[globals]
|
|
|
|
OUT_PORT=1 ; The physical Port of the Card
|
|
|
|
OUT_GROUP=ExternE1 ; The Group of Ports defined in misdn.conf
|
|
|
|
|
|
|
|
[misdnIn]
|
|
|
|
exten => _X.,1,Dial(mISDN/${OUT_PORT}/${EXTEN})
|
|
|
|
exten => _0X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1})
|
|
|
|
exten => _1X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1}/:dHello)
|
|
|
|
exten => _1X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1}/:dHello Test:n)
|
|
|
|
|
|
|
|
In the last line you will notice the last argument (Hello), this is sended
|
|
|
|
as Display Message to the Phone.
|
|
|
|
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
Known working configurations
|
2005-10-31 22:51:12 +00:00
|
|
|
----------------------------
|
|
|
|
|
2005-12-01 22:54:58 +00:00
|
|
|
In this section I'll put working configurations for chan_misdn. Beware It
|
2005-10-31 22:51:12 +00:00
|
|
|
seems that between Kernel 2.6.3 and Kernel 2.6.8 there were lots of mISDN
|
|
|
|
Bugs. I use Kernel 2.6.9 now, it works quite ok, Kernel 2.6.10+ has changed
|
|
|
|
the pci_find_subgsys funktion, so hfc_multi from mISDN doesn't compile against
|
|
|
|
it, you can just change pci_find_subsys to pci_get_subsys, this works.
|
|
|
|
|
|
|
|
|
|
|
|
- chan_misdn-0.0.3-rc1:
|
|
|
|
* linux-kernel >= 2.6.3 (but at least 2.6)
|
|
|
|
* asterisk >= v1-0
|
|
|
|
* mISDN/mISDNuser since September/04
|
|
|
|
|
|
|
|
- chan_misdn-0.0.3-rc3:
|
|
|
|
* linux-kernel >= 2.6.3 (but at least 2.6)
|
|
|
|
* asterisk >= v1-0.2
|
|
|
|
* mISDN/mISDNuser since December/04
|
|
|
|
|
|
|
|
- chan_misdn-0.0.3-rc4:
|
|
|
|
* linux-kernel >= 2.6.8 (but at least 2.6)
|
|
|
|
* asterisk >= v1-0.2
|
|
|
|
* mISDN/mISDNuser head on cvs.isdn4linux.de
|
|
|
|
|
|
|
|
- chan_misdn-0.0.3-rc6:
|
|
|
|
* linux-kernel >= 2.6.8 (but at least 2.6)
|
|
|
|
* asterisk >= v1-0.2
|
|
|
|
* mISDN/mISDNuser head on cvs.isdn4linux.de
|
|
|
|
|
|
|
|
- chan_misdn-0.1.0
|
|
|
|
* linux-kernel >= 2.6.8 (but at least 2.6)
|
|
|
|
* asterisk >= v1-0.2 , also CVS Head
|
|
|
|
* mISDN/mISDNuser (3.0-beta) from isdn.jolly.de
|
|
|
|
|
|
|
|
|
|
|
|
Known Problems
|
|
|
|
--------------
|
|
|
|
|
|
|
|
* When I use mISDN->IAX I cannot make Trunk calls
|
|
|
|
|
|
|
|
-> You need to use ztdummy as dummy zaptel interface for the iax timing in
|
|
|
|
trunking mode, simply grab libpri, zaptel and compile them (i think you need
|
|
|
|
to modify the makefile in zaptel to add ztdummy to the defaultly compiled
|
|
|
|
modules) then modprobe ztdummy, this resolves the problem.
|
|
|
|
|
|
|
|
|
|
|
|
* I cannot hear any tone after succesfull CONNECT to other end
|
|
|
|
|
|
|
|
-> you forgot to load mISDNdsp, which is now needed by chan_misdn for switching
|
|
|
|
and dtmf tone detection
|
|
|
|
|
|
|
|
* I have strange ISDN behavior: sometimes I hear the other end, sometimes
|
2005-12-01 22:54:58 +00:00
|
|
|
not. Also I get STATUS Events with cause 100, with misdn debugging
|
2005-10-31 22:51:12 +00:00
|
|
|
|
|
|
|
-> Please update to newest version of chan_misdn and set the te_choose_channel
|
|
|
|
option in misdn.conf to yes
|
|
|
|
|
|
|
|
Changes
|
|
|
|
-------
|
|
|
|
in the Changes File
|
|
|
|
|