Manual browser: isdnd(8)
|System Manager's Manual
NAMEisdnd — isdn4bsd ISDN connection management daemon
|[-c configfile] [-d debuglevel] [-f] [-F] [-l] [-L logfile] [-P] [-r device] [-s facility] [-t terminaltype] [-u charging unit length] [-m]
DESCRIPTIONisdnd is the isdn4bsd package demon which manages all ISDN related connection and disconnection of ISDN devices supported by the package.
The options are as follows:
- Use configfile as the name of the runtime configuration filename for isdnd instead of the default file /etc/isdn/isdnd.rc.
If debugging support is compiled into isdnd 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:
- general debugging.
- rates calculation.
- timing calculations.
- state transitions.
- retry handling.
- process handling.
- isdn4bsd kernel i/o calls.
- controller and channel busy/free messages.
- isdnd.rc configuration file processing.
- outgoing call budget handling.
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.
Specifying this option causes isdnd 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 isdnd daemon 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.
- If this option is set, logging is not done via the syslogd(8) facility but instead is appended to a file.
- 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.rc(5).
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 isdnd exits after the printout is done.
- This option prevents isdnd to detach from the controlling tty and become a daemon.
- In conjunction with the -t option, device specifies a terminal device which becomes the controlling tty for isdnd and on which the full-screen mode output is displayed.
- 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).
In conjunction with the -f and -r options, terminaltype specifies a terminal type or terminfo entry name (such as vt220) for the device used for isdnd full-screen output. This is useful if an unused (no getty running) tty line is used for full-screen output for which no
TERMenvironment variable exists.
- Specifies the length of a charging unit in case the config file entry keyword unitlengthsrc is set to cmdl.
- 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 KERNELisdnd communicates with the kernel part of isdn4bsd by receiving status and event messages (via read(2) from device /dev/isdn) and by transmitting commands and responses (via ioctl(2) on device /dev/isdn).
The messages and message parameters are documented in the include file /usr/include/machine/i4b_ioctl.h.
Supported command and response messages (ioctl's) to the kernel are:
- Request a unique Call Description IDentifier (cdid) which identifies uniquely a single interaction of the local D channel with the exchange.
- Actively request a call setup to a remote ISDN subscriber.
- Respond to an incoming call, either accept, reject or ignore it.
- Actively terminate a connection.
- Request information about an installed ISDN controller card.
- Give information about call setup to driver who requested dialing out.
- Update the kernels timeout value(s) in case of dynamically calculated shorthold mode timing changes.
- Inform the kernel userland drivers about interface soft up/down status changes.
- Download firmware to active card(s).
- Return diagnostic information from active cards.
Supported status and event messages from the kernel are:
- An incoming call from a remote ISDN user is indicated.
- 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.
- A call was terminated.
- A userland interface driver requests the daemon to dial out (typically a network interface when a packet arrives in its send queue).
- A call was terminated by the isdn4bsd kernel driver because a B-channel idle timeout occurred.
- Accounting information from a network driver.
- Charging information from the kernel.
OUTGOING CALLSCurrently the only possibility to trigger an outgoing call is that an isdn4bsd network driver (isdn<n>) sends a MSG_DIALOUT_IND to the isdnd daemon.
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 site 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 isdnd by the kernel sending the I4B_DISCONNECT_IND message and the CDID corresponding to the call is no longer valid.
INCOMING CALLSIncoming calls are signaled to isdnd by the kernel transmitting the MSG_CONNECT_IND message to the daemon.
With the information contained in this message, isdnd 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 site 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 isdnd by the kernel sending the I4B_DISCONNECT_IND message and the CDID corresponding to the call is no longer valid.
SIGNALSSending a HUP signal to isdnd 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 isdnd 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.
ENVIRONMENTThe following environment variables affect the execution of isdnd:
- The terminal type when running in full-screen display mode. See environ(7) for more information.
- The device-file used to communicate with the kernel ISDN driver subsystem.
- A record of the actions in case of syslogd logging support.
- The default accounting information filename (if accounting is configured).
- The default logging filename (if logging to a file is configured).
- The process id of the ISDN daemon (also known as "lockfile" to isdnd, preventing multiple invocations of it).
- The directory where isdnd expects some supplementary data files and programs for telephone answering support.
- The default runtime configuration file.
- The default unit charging rates specification file.
- The default table (if aliasing is enabled) to convert phone number to caller's name.
EXAMPLESFor a first try, the following command should be used to start isdnd 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. isdnd can then be terminated by entering Control-C.
Another example, the command:
isdnd -d0xf9 -f -r /dev/ttyv3 -t vt100
will start isdnd with reasonable debugging messages enabled, full-screen mode of operation, full-screen display redirected to /dev/ttyv03 and using a terminfo entry for vt100 on this display.
DIAGNOSTICSExit status is 0 on success, 1 on error.
AUTHORSThe isdnd daemon and this manual page were written by <email@example.com>.
|April 5, 2012