Asterisk ISDN4Linux

Install and configure Asterisk for ISDN4Linux

Note: Asterisk 1.2 doesn't support isdn4linux. Instead use either CAPI (with chan_capi), or zaphfc, or mISDN (with Kernel 2.6) or the like.

First make sure your Linux has the isdn4linux module installed, i.e. with modprobe; example for a Teles 16.3 ISA card:
modprobe hisax type=3 protocol=2 io=0x180 irq=10

Check "man isdnctrl" for more general info and testing (you don't need isdnctrl to operate ISDN under Asterisk - likewise you could take a look at "man hisaxctrl" and "man isdninfo").

Now edit modem.conf to include:


For two-channel ISDN (BRI) you have two devices: /dev/ttyI0 and /dev/ttyI1 so you'll have to add those as well - modem.conf has a couple of documented isdn examples for the other required settings. Most likely you will define a group like "g1" to include both/all ISDN channels.

Watch out for the "stripmsd=" setting, that is often cause for headaches while trying to establish your first outgoing call... :-)

In extensions.conf you'll probably want to define g1 as trunk:

How to check that your changes are working after starting Asterisk?

Look for this line in the ASTERISK *CLI console after typing reload:
   [] => (ISDN4Linux Emulated Modem Driver)

Supposedly there is a "better" solution available that'll avoid chan_modem-i4l and the echo problems that appear to bug a couple of users. Take a look at chan_capi and search the Asterisk user mailing list (via Google) for details.
Next to this there is also a solution available to run the HylaFAX fax server together with Asterisk based upon ISDN (if the card works with CAPI4Linux)

Note 2: Since ISDN is a digital interface, it seems very unlikely that anything here is causing echo. More likely someone with an echo problem incorrectly blamed it on ISDN and started this rumor. Check out the VoIP echo information on this site to get a better understanding of this.

Note 3: Fedora 3 is a bit unusable to do the old isdn4linux (e.g. you added the card after installation). So check if your /dev/ttyI0 exist!. If not AND your hisax driver loads corretly (dmesg),. you have to create the devices yourself;)

This is a script that created my devises (man mknod AND locate your devices.txt will give away information about the mknod parameters):

#! /bin/sh

if [ ! -c /dev/ttyI0  >/dev/null 2>&1; then
   mknod -m 660 /dev/ttyI0 c 43 0
while [ $C -lt 20 ]; do
CE=`echo "scale=2; $CC+$C/100" | bc -l`
if [ ! -c /dev/ttyI$CE ] >/dev/null 2>&1; then
      let CN=$C+1
      mknod -m 660 /dev/ttyI$CN c 43 $CN
C=`expr $C + 1`


Note 4: Confirm that your ISDN card works before looking into asterisk troubleshooting.

Testing the card and the physical connection.
Use minicom or another program with similar functionality (e.g. seyon or even cu).

Start minicom isdn0 (nowadays you have to use minicom -s isdn0), and at port settings (ctrl-A O) enter /dev/ttyI0 as the device.
For modem init string enter "AT&E546851514^M~AT&B512^M" (my number is 0546-851514, so leave out the leading zero and the dash ; block size is set to 512). Set speed to 38400 or whatever; it doesn't really matter, as the speed will be 64kb/s anyway. Save these settings. Now choose exit (not exit minicom ).

Minicom will now initialize the "modem", and then you're connected to the ISDN modem emulator (note: only the AT commands are emulated; you cannot connect to analogue modems!). Type ATI<enter> , or AT&V<enter> to convince yourself of this.
In another xterm or virtual console do the same again as above; just change the following things: minicom isdn1 and /dev/ttyI1 a virtal ISDN tty can only be used once, of course. Preferably also use a different number (MSN).

It'll work with the same number used twice, but debugging is a lot easier if you use different numbers. Again, save these settings and choose exit .
Now, in the second screen, enter ATD851514<enter>. The areacode isn't necessary (of course, use the number you defined in the first screen!). In the first screen you should now see RING appear. With ATA<enter> you can accept the call; now, what you type in this screen should appear in the other, and vice versa.
If you don't see RING , then maybe you have to enter the number with areacode. Check the system logging to see to which number the call is directed.
If in the screen where you entered ATD you see BUSY apppear, then a number of things may be wrong; unfortunately most failures are simply indicated with BUSY (only when there is no physical connection working do you see a different message, namely NO CARRIER).
If BUSY appears after 1-3 seconds, then the message may be right, and the remote number is in fact busy. However, if it takes longer, then probably something else is the cause of the problem. Look in the system log messages for hints.

Solving DTMF problems

See also

Go back to Asterisk

Created by: JustRumours, Last modification: Sun 10 of Jun, 2012 (04:22 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+