FAQ chan mISDN
From mISDN.org
FAQ for chan_misdn
Why can't i configure my NT Port in PTP (Point To Point) Mode ?
mISDN is a very flexible Layer Management System. Since mISDN came from the isdn4linux guys, who only had a TE Stack, the whole TE Stack lives in the Kernel Modules: mISDN_l1. mISDN_l2 and l3udss1. The NT Stack is new, and because new things may be buggy, they have decided to implement the NT stack in the Userspace, so it is implemented in mISDNuser. When all the work has been finished the NT Stack can be moved into a kernel Module. This means: you can configure if a mISDN port is NT or TE by providing the module parameters. The PTP Setting is a L2 Setting, which must be setted in User Space, so in mISDNuser. You can only do this from within chan_misdn, therefore you need to set the PTP Option additionally in the misdn.conf for each port, which needs to be PTP: e.g.:
ports=1ptp,2,3ptp
Hint: In the 0.3.0 Version of chan_misdn, you don't need to set this option anymore, chan_misdn will then parse /etc/misdn-init.conf and find out which ports need to be PTP
What was the dialstring of chan_misdn again ?
The dial string of chan_misdn got more complex, because we added more features, so the generic dial string looks like:
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 cancelation on this channel,
takes taps as arguments (!=off,32,64,128,256)
s - send Non Inband DTMF as inband
vr - rxgain control
vt - txgain control
Not documented (stolen from Sourcecode ;) ):
a - uses Asterisk DSP instead of mISDN_DSP for DTMF ?? Also disables jitterbuffer.
p - callerpres takes as argument (allowed,not_screened)
i - Ignore detected dtmf tones, don't signal them to asterisk, they will be transported inband.
f - Faxdetect
j - enable jitterbuffer (jb=4000 jt=0)
jb - jitterbuffer length 100-8000
jt - jitterbuffer upper threshold < length
jn - no jitterbuffer
e.g.: Dial(mISDN/g:extern/1234) or Dial(mISDN/2/321)
Example for sending DTMF 1112*1 to called Number with 0.5s pause (w) between each DTMF
Attention !!
h:s:D(w1w1w1w2w*w1) are options from the asterisk dial command
/vt1:vr1 is the Optionsstring from chan_misdn
exten => 906,1,dial,misdn/4/08003302424/vt1:vr1|60|h:s:D(w1w1w1w2w*w1)
For more options of the dial command see http://www.voip-info.org/wiki-Asterisk+cmd+Dial
Why can't i make proper group calls on NT Port Groups?
It makes not much sense to group multiple NT Ports, if you plan to connect phones to them. The problem is, that chan_misdn does not know on which Port which phone is connected to, so what should chan_misdn do if you try to make a group call on NT Ports (like dial(mISDN/g:NTPorts/111) ? chan_misdn could for example try to dial on the first port (if theres a free channel), then it needed to wait for a timeout, and try on the second port and so on.. but that would take quite long, because chan_misdn needed to wait for timeouts each time. Also multiple phones with the same number could be connected on different ports .. There are numerous other issues with grouping NT Ports (for phones).
So the easiest way is to define a Phone location, not only by its number but also by the isdnport where it's connected to. So if you want to call a phone on port 3 with number 1 just do dial(mISDN/3/1)
How can i dial-in into my box running chan_misdn with a data call (ppp)?
Dialin works reliable only in the 0.3.0 branch of chan_misdn. You'll need the application app_pipe, which can be gathered at http://www.beronet.com/downloads/apps/app_bundle.tar.gz, unpack and install it.
Then do something like that in your dialplan:
exten => 123,1,Pipe(/usr/sbin/pppd|mru|800|mtu|800|notty|noauth|192.168.1.10:192.168.1.11)
add more pppd options to the arguments as you wish. The above example works to dialin without a password. The most crucial options are: notty + mtu/mru <=1000 !
It is also important to tell chan_misdn explicitly to use hdlc coding/decoding for the bchannel. In the 0.3.x branch you can easily do that by setting the option "hdlc=yes" in the misdn.conf for the specific port, or by using the 'h1' option in either misdn_set_opt(h1) or in dial(mISDN/1/123/h1).
Asterisk stops responding and my syslog is filled with rport queue overflow messages
We have added a configureable jitterbuffer in 0.3.0. You'll probably need to enable a bit buffering for better performance. Without buffer the voiceframes are sent directly to Asterisk, they might block there and lock mISDN therefore! Before (0.2.x) we had a static not configureable jitterbuffer, so it worked a bit better.
Just add these lines to your general section:
jitterbuffer=4000 jitterbuffer_upper_threshold=0
I don't hear a dialtone when i Off Hook my ISDN Phone, what's wrong ?
chan_misdn supports the asterisk indication tone zone settings since 0.3.0-rc8 or so.. that means you need to configure the file /etc/asterisk/indications.conf, this file needs to be there!
Why does the L1 goes DOWN on my PMP Isdn Link? Or why do i get No free chan even after group call from chan_misdn if dialing out on my PMP Link?
Answer: The telco shuts down the L1 after a while, thats normal, he wants to save power costs. chan_misdn checks in groupcalls if the L1 is UP if not it takes the next port, that's why we can't call out on that group if every L1 is down. You can avoid that problem either by making a call directly on a port like "dial(mISDN/1/1234)" instead of the group call "dial(mISDN/g:out/1234)". Or you can set the pmp_l1_check=no option for that group in the misdn.conf file.
Since chan_misdn-0.3.1-rc34 we have a new application, that helps a lot when multiple PMP lines are grouped together.
Let's assume you have the group "out", then you can solve the problem by checking/fixing the l2/l1 layer before dialing with the following extensions snippet:
exten => _X.,1,misdn_check_l2l1(g:out|2)
exten => _X.,n,Dial(mISDN/g:out/${EXTEN})
The application misdn_check_l2l1 checks if the L1/L2 of any port in the group "out" is up, if not it tries to get them UP and waits at least 2 seconds so that every port with a real connection get UP. Now it is safe to make a dial on that group.
How do i activate CLIP/No Screening with chan_misdn ?
It is important to set the localdialplan=4 in the misdn.conf, also set the presentation=0 and screening=0 this should do the trick!
Why do i get a 0 or 00 prefixed in my dad, called party number?
You have probably a ptp Line and your provider is sending you the number in the national or international format. chan_misdn adds in these cases the defined nationalprefix or internationalprefix. You can change these prefixes to your local prefixes. you can also ommit these prefixes by just defining:
nationalprefix= internationalprefix=
This will tell chan_misdn not to add anything to the dad number. If you do not define the prefix options they will default to 0/00.
I have issues to get mISDN and chan_misdn running properly on trixxbox
The trixxbox maintainers have made patches to asterisk which are in conflict with chan_misdn. If you want to run chan_misdn on trixxbox you should run our asterisk installation package which you get from: www.beronet.com/downloads/install-asterisk.tar.gz
I can't dial out on my box, and i get weird Alarms recently
If you have lines like that in your misdn.log or at the asterisk CLI:
Mon Dec 4 16:24:26 2006: P[ 6] % GOT L2 Activate Info. but we're activated already.. this l2 is faulty, blocking port Mon Dec 4 16:24:28 2006: P[ 6] Port is blocked Mon Dec 4 16:24:28 2006: P[ 0] Could not create channel on port:6 with extensions:XXXX
then you should set the following option in your misdn.conf, preferably in the [default] - section:
block_on_alarm=no
Overlapdial with Freepbx and Co (especially in Austria and Switzerland)
modify the misdn.conf for the ports with incoming calls like:
... [trunk] ports=1,2 msns=* immediate=yes context=misdn-in ...
You should create a context like that in your extensions_custom.conf:
[misdn-in]
exten => s,1,Waitfordigits(3000,,,,2)
;Main Number
exten => s,2,Goto(from-pstn|s|1)
;extensions
exten => _X.,1,Waitfordigits(3000,,,,2)
exten => _X.,2,Goto(from-pstn|${EXTEN}|1)
;special 1 digit extensions (like 0)
exten => 0,1,Waitfordigits(3000,,,,2)
exten => 0,2,Goto(from-pstn|${EXTEN}|1)
This should do the overlapdial trick :-)
Overlapdial with DDI (especially in Germany and countries where we get the basenr. (Anlagenanschluss) )
In the DDI Scenario you have a base number, lets say 1234 and for example 2 Digits for DDI, lets say the 0 is the main number (1234 0). chan_misdn automatically handles overlapdial and direct incoming calls, just create a dialplan for the incoming calls like:
[fromISDN-TE-PTP] exten => _1234XX,1,Goto(handleDDI) exten => _1234XX,2,hangup exten => 12340,1,Goto(handleMain) exten => 12340,2,hangup
So easy can it be.
