asterisk/doc/misdn.tex

267 lines
8.1 KiB
TeX
Raw Normal View History

\subsection{Introduction}
This package contains the mISDN Channel Driver for the Asterisk PBX. It
supports every mISDN Hardware and provides an interface for asterisk.
\subsection{Features}
\begin{itemize}
\item NT and TE mode
\item PP and PMP mode
\item BRI and PRI (with BNE1 and BN2E1 Cards)
\item Hardware Bridging
\item DTMF Detection in HW+mISDNdsp
\item Display Messages on Phones (on those that support display msg)
\item app\_SendText
\item HOLD/RETRIEVE/TRANSFER on ISDN Phones : )
\item Screen/ Not Screen User Number
\item EchoCancellation
\item Volume Control
\item Crypting with mISDNdsp (Blowfish)
\item Data (HDLC) callthrough
\item Data Calling (with app\_ptyfork +pppd)
\item Echo cancellation
\item CallDeflection
\item Some other
\end{itemize}
\subsection{Fast Installation Guide}
It is easy to install mISDN and mISDNuser. Just fetch the newest head of the
cvs, this can be done by:
\begin{verbatim}
cvs -d:pserver:anonymous:readonly@cvs.isdn4linux.de:/i4ldev co mISDN mISDNuser
\end{verbatim}
then compile and install both with:
\begin{verbatim}
cd mISDN ;
make && make install
\end{verbatim}
(you will need at least your kernel headers to compile mISDN).
\begin{verbatim}
cd mISDNuser ;
make && make install
\end{verbatim}
Now you can compile chan\_misdn, just by making asterisk:
\begin{verbatim}
cd asterisk ;
./configure && make && make install
\end{verbatim}
That's all!
Follow the instructions in the mISDN Package for how to load the Kernel
Modules.
\subsection{Pre-Requisites}
To compile and install this driver, you'll need at least one mISDN Driver and
the mISDNuser package. Chan\_misdn works with both, the current release version
and the development (svn trunk) version of Asterisk. mISDNuser and mISDN must
be fetched from cvs.isdn4linux.de.
You should use Kernels >= 2.6.9
\subsection{Configuration}
First of all you must configure the mISDN drivers, please follow the
instructions in the mISDN package to do that, the main config file and config
script is:
\begin{verbatim}
/etc/init.d/misdn-init and
/etc/misdn-init.conf
\end{verbatim}
Now you will want to configure the misdn.conf file which resides in the
asterisk config directory (normally /etc/asterisk).
\subsubsection{misdn.conf: [general]}
The misdn.conf file contains a "general" subsection, and user subsections which
contain misdn port settings and different Asterisk contexts.
In the general subsection you can set options that are not directly port
related. There is for example the very important debug variable 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 to.
\subsubsection{misdn.conf: [default] subsection}
The default subsection is another special subsection which can contain all the
options available in the user/port subsections. the user/port subsection inherit
their parameters from the default subsection.
\subsubsection{misdn.conf: user/port subsections}
The user subsections have names which are unequal to "general". Those subsections
contain the ports variable which mean the mISDN Ports. Here you can add
multiple ports, comma separated.
Espacially for TE-Mode Ports there is a msns option. This option tells the
chan\_misdn driver to listen for incoming calls with the given msns, you can
insert a '*' as single msn, which leads in getting every incoming call (if you
want to share on PMP TE S0 with a asterisk and a phone or isdn card you should
insert here the msns which you'll like to give the Asterisk). Finally a
context variable resides in the user subsections, which tells chan\_misdn where to
send incoming calls to in the Asterisk dial plan (extension.conf).
\subsubsection{Dial and Options String}
The dial string of chan\_misdn got more complex, because we added more features,
so the generic dial string looks like:
\begin{verbatim}
mISDN/<port>|g:<group>/<extension>[/<OPTIONSSTRING>]
The Optionsstring looks Like:
:<optchar1><OptParam1>:<optchar2><OptParam2>
the ":" character is the delimiter.
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
e - perform echo cancellation on this channel,
takes taps as arguments (32,64,128,256)
s - send Non Inband DTMF as inband
vr - rxgain control
vt - txgain control
\end{verbatim}
chan\_misdn registers a new dial plan application "misdn\_set\_opt" when
loaded. This application takes the Optionsstring as argument. The Syntax is:
\begin{verbatim}
misdn_set_opt(<OPTIONSSTRING>)
\end{verbatim}
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:
\begin{verbatim}
Phone1 --> * Box 1 --> PSTN_TE
PSTN_TE --> * Box 2 --> Phone2
\end{verbatim}
The Encryption must be done on the PSTN sides, so the dialplan on the boxes
are:
\begin{verbatim}
* 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})
\end{verbatim}
\subsection{mISDN CLI commands}
At the Asterisk cli you can try to type in:
\begin{verbatim}
misdn <tab> <tab>
\end{verbatim}
Now you should see the misdn cli commands:
\begin{verbatim}
- clean
-> pid (cleans a broken call, use with care, leads often
to a segmentation fault)
- send
-> display (sends a Text Message to a Asterisk channel,
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 current ports, their protocols and states)
-> fullstacks (shows the current active and inactive misdn channels)
- restart
-> port (restarts given port (L2 Restart) )
- reload (reloads misdn.conf)
\end{verbatim}
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).
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.
\subsection{mISDN Variables}
Merged revisions 49313 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r49313 | crichter | 2007-01-03 10:06:50 +0100 (Mi, 03 Jan 2007) | 41 lines Merged revisions 48319,48321,48467,48552,48576,49135,49303 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48319 | crichter | 2006-12-06 15:35:25 +0100 (Mi, 06 Dez 2006) | 1 line changed a few debugs to higher debug levels ........ r48321 | crichter | 2006-12-06 16:48:45 +0100 (Mi, 06 Dez 2006) | 1 line added the export and import of the MISDN_ADDRESS_COMPLETE Variable to inidcate wether the extension is already completely dialed or if there might come additional digits by information elements. also added some docs for that. ........ r48467 | crichter | 2006-12-14 14:03:49 +0100 (Do, 14 Dez 2006) | 1 line removed FIXUP state. added check for channel allocation conflict when we create a setup while the other site creates a setup on the same channel, besides the check we resolve this conflict. ........ r48552 | crichter | 2006-12-18 11:19:39 +0100 (Mo, 18 Dez 2006) | 1 line when our PTP Partner sends us a SETUP with a preselected channel we just accept it, even when we're NT. added some checks for segfaults. ........ r48576 | crichter | 2006-12-19 14:08:51 +0100 (Di, 19 Dez 2006) | 1 line when we reject a channel, because it's in use already, we shouldn't process the setup anymore. made the channel allocation a bit easier and more understandable, removed a few unused lines ........ r49135 | crichter | 2007-01-02 11:07:22 +0100 (Di, 02 Jan 2007) | 1 line added check for channel ranges in the set/empty channel functions. set pmp_l1_check default to no. added misdn restart pid cli command. added cleaning of channel when we send a RELEASE_COMPLETE. ........ r49303 | crichter | 2007-01-03 09:24:00 +0100 (Mi, 03 Jan 2007) | 9 lines * Added check for bridging in misdn_call to avoid setting echocancellation when 2 mISDN channels are involved and when bridging is set. That lead to a kernel panic before under different situations, because we switched about 2 times between hardware bridging and echocancelation * readded MISDN_URATE variable which got lost before, this should make app_v110 work again * fixed typo ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 11:15:02 +00:00
mISDN Exports/Imports a few Variables:
\begin{verbatim}
Merged revisions 49313 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r49313 | crichter | 2007-01-03 10:06:50 +0100 (Mi, 03 Jan 2007) | 41 lines Merged revisions 48319,48321,48467,48552,48576,49135,49303 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48319 | crichter | 2006-12-06 15:35:25 +0100 (Mi, 06 Dez 2006) | 1 line changed a few debugs to higher debug levels ........ r48321 | crichter | 2006-12-06 16:48:45 +0100 (Mi, 06 Dez 2006) | 1 line added the export and import of the MISDN_ADDRESS_COMPLETE Variable to inidcate wether the extension is already completely dialed or if there might come additional digits by information elements. also added some docs for that. ........ r48467 | crichter | 2006-12-14 14:03:49 +0100 (Do, 14 Dez 2006) | 1 line removed FIXUP state. added check for channel allocation conflict when we create a setup while the other site creates a setup on the same channel, besides the check we resolve this conflict. ........ r48552 | crichter | 2006-12-18 11:19:39 +0100 (Mo, 18 Dez 2006) | 1 line when our PTP Partner sends us a SETUP with a preselected channel we just accept it, even when we're NT. added some checks for segfaults. ........ r48576 | crichter | 2006-12-19 14:08:51 +0100 (Di, 19 Dez 2006) | 1 line when we reject a channel, because it's in use already, we shouldn't process the setup anymore. made the channel allocation a bit easier and more understandable, removed a few unused lines ........ r49135 | crichter | 2007-01-02 11:07:22 +0100 (Di, 02 Jan 2007) | 1 line added check for channel ranges in the set/empty channel functions. set pmp_l1_check default to no. added misdn restart pid cli command. added cleaning of channel when we send a RELEASE_COMPLETE. ........ r49303 | crichter | 2007-01-03 09:24:00 +0100 (Mi, 03 Jan 2007) | 9 lines * Added check for bridging in misdn_call to avoid setting echocancellation when 2 mISDN channels are involved and when bridging is set. That lead to a kernel panic before under different situations, because we switched about 2 times between hardware bridging and echocancelation * readded MISDN_URATE variable which got lost before, this should make app_v110 work again * fixed typo ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 11:15:02 +00:00
- MISDN_ADDRESS_COMPLETE : Is either set to 1 from the Provider, or you
can set it to 1 to force a sending complete.
\end{verbatim}
Merged revisions 49313 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r49313 | crichter | 2007-01-03 10:06:50 +0100 (Mi, 03 Jan 2007) | 41 lines Merged revisions 48319,48321,48467,48552,48576,49135,49303 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48319 | crichter | 2006-12-06 15:35:25 +0100 (Mi, 06 Dez 2006) | 1 line changed a few debugs to higher debug levels ........ r48321 | crichter | 2006-12-06 16:48:45 +0100 (Mi, 06 Dez 2006) | 1 line added the export and import of the MISDN_ADDRESS_COMPLETE Variable to inidcate wether the extension is already completely dialed or if there might come additional digits by information elements. also added some docs for that. ........ r48467 | crichter | 2006-12-14 14:03:49 +0100 (Do, 14 Dez 2006) | 1 line removed FIXUP state. added check for channel allocation conflict when we create a setup while the other site creates a setup on the same channel, besides the check we resolve this conflict. ........ r48552 | crichter | 2006-12-18 11:19:39 +0100 (Mo, 18 Dez 2006) | 1 line when our PTP Partner sends us a SETUP with a preselected channel we just accept it, even when we're NT. added some checks for segfaults. ........ r48576 | crichter | 2006-12-19 14:08:51 +0100 (Di, 19 Dez 2006) | 1 line when we reject a channel, because it's in use already, we shouldn't process the setup anymore. made the channel allocation a bit easier and more understandable, removed a few unused lines ........ r49135 | crichter | 2007-01-02 11:07:22 +0100 (Di, 02 Jan 2007) | 1 line added check for channel ranges in the set/empty channel functions. set pmp_l1_check default to no. added misdn restart pid cli command. added cleaning of channel when we send a RELEASE_COMPLETE. ........ r49303 | crichter | 2007-01-03 09:24:00 +0100 (Mi, 03 Jan 2007) | 9 lines * Added check for bridging in misdn_call to avoid setting echocancellation when 2 mISDN channels are involved and when bridging is set. That lead to a kernel panic before under different situations, because we switched about 2 times between hardware bridging and echocancelation * readded MISDN_URATE variable which got lost before, this should make app_v110 work again * fixed typo ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 11:15:02 +00:00
\subsection{Debugging and sending bug reports}
If you encounter problems, you should set up the debugging flag, usually
debug=2 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.
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
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
provide all the information needed.
\subsection{Examples}
Here are some examples of how to use chan\_misdn in the dialplan
(extensions.conf):
\begin{verbatim}
[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)
\end{verbatim}
On the last line, you will notice the last argument (Hello); this is sent
as Display Message to the Phone.
\subsection{Known Problems}
\begin{verbatim}
* I cannot hear any tone after a successful CONNECT to the other end
-> you forgot to load mISDNdsp, which is now needed by chan\_misdn for switching
and dtmf tone detection
\end{verbatim}