Howto configure isdn4linux
==========================

the naming system
-----------------
/dev/ttyI0	isdn modem emulation device. Note that the user interface
		emulates a modem (it understands AT commands); this emulation
		doesn't mean you can use it to call an analog modem.
/dev/cui0	isdn modem emulation device : old form. don't use (obsolete).
/dev/ippp0	synchronous ppp device
ippp0		isdn network device. This name is used if you transfer with
		syncPPP encapsulation. You have to create the connection to
		/dev/ippp0 (for the kernel it's only a name without meaning).
		If you have multiple ippp devices, assign the one you want to
		have the default route to 'ippp0', this is what is expected by
		the default scripts.
isdn0		isdn network device. This name is used with rawIP network
		connections.

see also : ttyI(4) cui(4)
	

ISDN kernel modules
-------------------
If you compile your own kernel :
 - Don't use the old teles driver; use HiSax instead (standard in
   kernels > 2.0.30, best use >= 2.0.36)
 - Configure lilo to pass the right options to the kernel.
   E.g. in /etc/lilo.conf : append="hisax=3,2,10,0xd80,0,line0"

If you use modules (preferable):
 - Use modconf, select the modules "isdn" and "hisax" with the right
   options. Don't use the teles modules, use hisax instead.
 - You can look what modconf did:
   /etc/modules should have the lines
	isdn
	hisax type=3 protocol=2 io=0x180 irq=15 id=line0
   If you want kerneld to load the modules, you don't need the
   /etc/modules entry, but additional entries in /etc/conf.modules:
	options hisax type=3 protocol=2 io=0x180 irq=15 id=line0
	alias ippp0 isdn
	alias char-major-43 hisax
	alias char-major-44 hisax
	alias char-major-45 hisax

See also: /usr/src/linux/Documentation/isdn/README.HiSax
	and other files in that directory (or wherever your kernel doc is).


ISDNLOG
-------

Isdnlog is a tool to keep a log of all ISDN calls. It also allows you
to start specific programs upon certain events, such as an incoming
call.

One isdnlog may be started per ISDN card. The corresponding config file
with a number of examples, which needs to be edited before isdnlog will
be activated, is found in:

    /etc/isdn/isdnlog.DEVICE

DEVICE can be isdnctrl0, isdnctrl2, ...

A special case is using two ISDN cards, where one of the cards is connected
"wrong": its receiving line is connected to what is usually the transmit line.
This means it can listen to what other ISDN equipment is sending out, e.g.
which number is being dialled. This way you can monitor the outgoing calls from
the other equipment as well. This is called running isdnlog is "dual" mode, and
is done with the -2 option (see the isdnlog(8) manpage for futher info on this
option).


ISDN network device
-------------------

isdnconf will create example files with lots of comments, which need to
be edited before the configuration will be used:

    /etc/isdn/device.DEVICE

DEVICE can be isdn0, isdn1 ... (used for rawip devices)
or ippp0, ippp1, ippp2 ... (used for ippp devices).
See also: isdnctrl(8) ifconfig(8) route(8)
	  isdnctrl help text (pppbind is not documented in the man page)
	  and any book about unix networking for ifconfig/route details.
ippp0 should be the interface that is the default route; if not, you need to
edit the device.xxx file(s).

/etc/init.d/netbase may need to be modified for "IP spoofing protection".
Basically, replace all "eth1" by "ippp0" or "isdn0" (whatever interface is
appropriate).


ISDN ppp daemon
---------------

isdnconfig will create example files with lots of comments, which need to
be edited before ipppd will be started:

    /etc/isdn/ipppd.DEVICE

DEVICE can be ippp0, ippp1 ...
Note: there is no connection between the network device "ipppX" and the
real device /dev/ipppX, unless you create a pppbind with isdnctrl.
Default in debian is to create pppbinds and let one ipppd handle one
connection.

The ipppd does not support ioptions.<tty>. And this setup will neither
read /etc/ppp/options nor ioptions. Put the whole configuration into
/etc/isdn/ipppd.DEVICE !

Ipppd will run the /etc/ppp/ip-up script when a connection is made and will run
the /etc/ppp/ip-down script when a connection goes down. If you have the ppp
package installed (as is recommended), those scripts will run each of the
scripts in the /etc/ppp/ip-up.d/ and /etc/ppp/ip-down.d/ directories. Isdnutils
will have put a script into each of these directories; this can be useful for
setting the default route (if you have dynamic IP numbers). You can also do
other things; read the comments in /etc/ppp/ip-up and /etc/ppp/ip-down, and
also in the /etc/ppp/ip-up.d/isdnutils and /etc/ppp/ip-down.d/isdnutils scripts.

see also : ipppd(8)


ISDN modem emulation
--------------------

With iprofd you can store your ttyI modem settings with AT&W as if it
were a modem. isdnconf will create an empty file (or use "touch
/etc/isdn/iprofd.data"). Do not change this file when iprofd is running!

see also : iprofd(8)


ISDN ttyI devices
-----------------

You can use these devices with any program like normal modem devices
ttyS (e.g. uucp, minicom, pppd). With pppd you can create asynchronous
ppp connections (that's nonsence with isdn, but you can do that).

The first two devices ttyI0 and ttyI1 belong to your first isdn card,
the next two devices to the next card etc. And after that it starts
again with the first card. If you only have one isdn card, all devices
are used with that card. If you have two cards, the devices 0,1,4,5,8,9
... are used by the first card, the devices 2,3,6,7,10,11 ... are used
by the second card.

A device is not bound to a channel. You can use several device at the
same time (e.g. have vboxgetty waiting for incoming calls on 5 devices,
and use two devices with minicom at the same time).


ISDN voice box
--------------

Edit /etc/inittab to activate vboxgetty. example for ttyI0:

    I0:2345:respawn:/usr/sbin/vboxgetty -d /dev/ttyI0

Also see the /var/spool/vbox/USER/vbox.conf file.
