The
utility
is the isdn4bsd package daemon which manages all ISDN related connection
and disconnection of ISDN devices supported by the package.
The options are as follows:
-c
Use
configfile
as the name of the runtime configuration filename for
instead of the default file
/etc/isdn/isdnd.rc
-d
If debugging support is compiled into
this option is used to specify the debugging level, or better which kind
of debugging messages are displayed.
The debugging level is the sum of the
following values:
0x001
general debugging.
0x002
rates calculation.
0x004
timing calculations.
0x008
state transitions.
0x010
retry handling.
0x020
dialing.
0x040
process handling.
0x080
isdn4bsd kernel i/o calls.
0x100
controller and channel busy/free messages.
0x200
isdnd.rc configuration file processing.
0x400
outgoing call budget handling.
0x800
valid keyword and holiday file processing.
The value can be specified in any number base supported by the
sscanf(3)
library routine.
In addition, this option accepts also the character 'n' as an argument to
disable displaying debug messages on the full-screen display.
-f
Specifying this option causes
to enter the full-screen mode of operation.
When operating in this mode,
entering the control character
Control-L
causes the display to be refreshed and entering
Carriage-Return
or
Enter
will pop-up a command window.
Because the
utility will not listen to messages while the command window is active,
this command window will disappear automatically after 5 seconds without
any command key press.
While the command window is active,
Tab
or
Space
advances to the next menu item.
To execute a command, press
Return
or
Enter
for the highlighted menu item, or enter the number corresponding to the
item to be executed or enter the capitalized character in the menu item
description.
-l
If this option is set, logging is not done via the
syslogd(8)
facility but instead is appended to a file.
-L
Specifies the name of the logfile which is used when the option
-l
is set.
See also the keyword
rotatesuffix
in the system section of
isdnd.rc5.
-P
This option prints out the parsed and verified isdnd configuration in the same
format as the isdnd.rc file.
This output can be used as an isdnd.rc file.
This
feature is especially useful when debugging an isdnd.rc file to see, what the
default settings of options are when they are not set in the isdnd.rc input
file.
The
exits after the printout is done.
-F
This option prevents
to detach from the controlling tty and become a daemon.
-r
In conjunction with the
-t
option,
device
specifies a terminal device which becomes the controlling tty for
and on which the full-screen mode output is displayed.
-s
This option may be used to specify the logging facility in case
syslog(3)
logging is configured and another facility than the default LOCAL0
facility shall be used.
The facility is to be specified as an integer in
the range 0-11 or 16-23 (see the file /usr/include/syslog.h).
-t
In conjunction with the
-f
and
-r
options,
terminaltype
specifies a terminal type or termcap entry name (such as vt220) for the device
used for
full-screen output.
This is useful if an unused (no getty running) tty line is
used for full-screen output for which no
TERM
environment variable exists.
-u
Specifies the length of a charging unit in case the config file entry
keyword
unitlenghtsrc
is set to
cmdl
-m
If the isdn daemon is compiled with local or remote monitoring support,
this option disables all monitoring access.
It overrides the config
file option
monitor-allowed
INTERACTION WITH THE KERNEL
The
utility
communicates with the kernel part of isdn4bsd by receiving status and
event messages
(read2
from device
/dev/i4b
and by transmitting commands and responses
(ioctl2
from device
/dev/i4b )
The messages and message parameters are documented in the include
file
/usr/include/i4b/i4b_ioctl.h
Supported command and response messages (ioctls) to the kernel are:
I4B_CDID_REQ
Request a unique Call Description IDentifier (cdid) which identifies
uniquely a single interaction of the local D channel with the exchange.
I4B_CONNECT_REQ
Actively request a call setup to a remote ISDN subscriber.
I4B_CONNECT_RESP
Respond to an incoming call, either accept, reject or ignore it.
I4B_DISCONNECT_REQ
Actively terminate a connection.
I4B_CTRL_INFO_REQ
Request information about an installed ISDN controller card.
I4B_DIALOUT_RESP
Give information about call setup to driver who requested dialing out.
I4B_TIMEOUT_UPD
Update the kernels timeout value(s) in case of dynamically calculated
shorthold mode timing changes.
I4B_UPDOWN_IND
Inform the kernel userland drivers about interface soft up/down status
changes.
I4B_CTRL_DOWNLOAD
Download firmware to active card(s).
I4B_ACTIVE_DIAGNOSTIC
Return diagnostic information from active cards.
Supported status and event messages from the kernel are:
MSG_CONNECT_IND
An incoming call from a remote ISDN user is indicated.
MSG_CONNECT_ACTIVE_IND
After an incoming call has been accepted locally or an outgoing call has
been accepted by a remote, the exchange signaled an active connection
and the corresponding B-channel is switched through.
MSG_DISCONNECT_IND
A call was terminated.
MSG_DIALOUT_IND
A userland interface driver requests the daemon to dial out (typically a
network interface when a packet arrives in its send queue).
MSG_IDLE_TIMEOUT_IND
A call was terminated by the isdn4bsd kernel driver because a B-channel
idle timeout occurred.
MSG_ACCT_IND
Accounting information from a network driver.
MSG_CHARGING_IND
Charging information from the kernel.
OUTGOING CALLS
Currently the only possibility to trigger an outgoing call is that an
isdn4bsd network driver
(ipr<n>)
sends a
MSG_DIALOUT_IND
to the
utility.
The daemon requests a new CDID from the kernel by using the
I4B_CDID_REQ
ioctl message, this CDID is now used in all interactions with the kernel
to identify this single call until a disconnect occurs.
After getting the CDID, the daemon looks up several additional information
in its entry section of the configuration corresponding to that connection
and issues a
I4B_CONNECT_REQ
ioctl message to the kernel.
The kernel now dials the remote side and
if the remote side accepts the call, the kernel sends a
MSG_CONNECT_ACTIVE_IND
to the daemon.
The call is terminated by either the local side timing out or the remote
side hanging up the connection or the local side actively sending a
I4B_DISCONNECT_REQ
ioctl message, both events are signaled to the
by the kernel sending the
I4B_DISCONNECT_IND
message and the CDID corresponding to the call is no longer valid.
INCOMING CALLS
Incoming calls are signaled to the
by the kernel transmitting the
MSG_CONNECT_IND
message to the daemon.
With the information contained in this message, the
searches the entry section of its configuration database and if a match is
found, it accepts or rejects the call or, if no match is found, it ignores the
call - all by issuing a
I4B_CONNECT_RESP
ioctl message with the appropriate parameters to the kernel.
In case the daemon decided to accept the call, the kernel signals this
by sending a
MSG_CONNECT_ACTIVE_IND
message to the daemon.
The call is terminated by either the local side timing out or the remote
side hanging up the connection or the local side actively sending a
I4B_DISCONNECT_REQ
ioctl message, both events are signaled to the
by the kernel sending the
I4B_DISCONNECT_IND
message and the CDID corresponding to the call is no longer valid.
SIGNALS
Sending a HUP signal to
causes all open connections to be terminated and the configuration file is
reread.
In case aliasfile handling was enabled, the aliasfile is also
reread.
Sending a USR1 signal to
causes the accounting file and the logfile (if logging to a file is used
instead of logging via the
syslog(3)
facility) to be closed and reopened to make logfile rotation possible.
ENVIRONMENT
The following environment variables affect the execution of
:
TERM
The terminal type when running in full-screen display mode.
See
environ(7)
for more information.
FILES
/dev/i4b
The device-file used to communicate with the kernel ISDN driver subsystem.
/var/log/messages
A record of the actions in case of syslogd logging support.
/var/log/isdnd.acct
The default accounting information filename (if accounting is configured).
/var/log/isdnd.log
The default logging filename (if logging to a file is configured).
/var/run/isdnd.pid
The process id of the isdn daemon (also known as "lockfile" to isdnd, preventing multiple invocations of it).
/usr/local/lib/isdn
/etc/isdn
The directory where isdnd expects some supplementary data files and programs
for telephone answering support.
/etc/isdn/isdnd.rc
The default runtime configuration file.
/etc/isdn/isdnd.rates
The default unit charging rates specification file.
/etc/isdn/isdntel.alias
The default table (if aliasing is enabled) to convert phone number to caller's name.
EXIT STATUS
Exit status is 0 on success, 1 on error.
EXAMPLES
For a first try, the following command should be used to start
in foreground mode for better debugging the configuration setup:
isdnd -d0xf9 -F
This will start isdnd with reasonable debugging settings and produce
output on the current terminal.
The
utility can then be terminated by entering Control-C.
Another example, the command:
isdnd -d0xf9 -f -r /dev/ttyv3 -t vt100
will start
with reasonable debugging messages enabled, full-screen mode of operation,
full-screen display redirected to /dev/ttyv3 and using a termcap entry
for vt100 on this display.