1 .\" $NetBSD: isdnd.8,v 1.10 2003/05/07 08:01:08 wiz Exp $
3 .\" Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" $Id: isdnd.8,v 1.11 2005/12/26 19:11:17 elad Exp $
30 .\" last edit-date: [Tue May 2 13:45:12 2000]
37 .Nd isdn4bsd ISDN connection management daemon
40 .Op Fl c Ar configfile
41 .Op Fl d Ar debuglevel
49 .Op Fl t Ar terminaltype
50 .Op Fl u Ar charging unit length
54 is the isdn4bsd package demon which manages all ISDN related connection
55 and disconnection of ISDN devices supported by the package.
57 The options are as follows:
62 as the name of the runtime configuration filename for
64 instead of the default file
65 .Pa /etc/isdn/isdnd.rc .
67 If debugging support is compiled into
69 this option is used to specify the debugging level, or better which kind
70 of debugging messages are displayed. The debugging level is the sum of the
73 .Bl -tag -width Ds -compact -offset indent
89 isdn4bsd kernel i/o calls.
91 controller and channel busy/free messages.
93 isdnd.rc configuration file processing.
95 outgoing call budget handling.
98 The value can be specified in any number base supported by the
102 In addition, this option accepts also the character
105 disable displaying debug messages on the full-screen display.
108 Specifying this option causes
110 to enter the full-screen mode of operation. When operating in this mode,
111 entering the control character
113 causes the display to be refreshed and entering
117 will pop-up a command window. Because the
119 daemon will not listen to messages while the command window is active,
120 this command window will disappear automatically after 5 seconds without
121 any command key press.
123 While the command window is active,
127 advances to the next menu item. To execute a command, press
131 for the highlighted menu item, or enter the number corresponding to the
132 item to be executed or enter the capitalized character in the menu item
135 If this option is set, logging is not done via the
137 facility but instead is appended to a file.
139 Specifies the name of the logfile which is used when the option
141 is set. See also the keyword
143 in the system section of
146 This option prints out the parsed and verified isdnd configuration in the same
147 format as the isdnd.rc file. This output can be used as an isdnd.rc file. This
148 feature is especially useful when debugging an isdnd.rc file to see what the
149 default settings of options are when they are not set in the isdnd.rc input
154 exits after the printout is done.
158 to detach from the controlling tty and become a daemon.
160 In conjunction with the
164 specifies a terminal device which becomes the controlling tty for
166 and on which the full-screen mode output is displayed.
168 This option may be used to specify the logging facility in case
170 logging is configured and another facility than the default LOCAL0
171 facility shall be used. The facility is to be specified as an integer in
172 the range 0-11 or 16-23 (see the file
173 .Pa /usr/include/syslog.h ) .
175 In conjunction with the
181 specifies a terminal type or termcap entry name (such as vt220) for the device
184 full-screen output. This is useful if an unused (no getty running) tty line is
185 used for full-screen output for which no
187 environment variable exists.
189 Specifies the length of a charging unit in case the config file entry
195 If the ISDN daemon is compiled with local or remote monitoring support,
196 this option disables all monitoring access. It overrides the config
198 .Em monitor-allowed .
200 .Sh INTERACTION WITH THE KERNEL
202 communicates with the kernel part of isdn4bsd by receiving status and
207 and by transmitting commands and responses (via
212 The messages and message parameters are documented in the include
214 .Em /usr/include/machine/i4b_ioctl.h .
216 Supported command and response messages (ioctl's) to the kernel are:
217 .Bl -tag -width Ds -compact -offset indent
219 Request a unique Call Description IDentifier (cdid) which identifies
220 uniquely a single interaction of the local D channel with the exchange.
221 .It Ar I4B_CONNECT_REQ
222 Actively request a call setup to a remote ISDN subscriber.
223 .It Ar I4B_CONNECT_RESP
224 Respond to an incoming call, either accept, reject or ignore it.
225 .It Ar I4B_DISCONNECT_REQ
226 Actively terminate a connection.
227 .It Ar I4B_CTRL_INFO_REQ
228 Request information about an installed ISDN controller card.
229 .It Ar I4B_DIALOUT_RESP
230 Give information about call setup to driver who requested dialing out.
231 .It Ar I4B_TIMEOUT_UPD
232 Update the kernels timeout value(s) in case of dynamically calculated
233 shorthold mode timing changes.
234 .It Ar I4B_UPDOWN_IND
235 Inform the kernel userland drivers about interface soft up/down status
237 .It Ar I4B_CTRL_DOWNLOAD
238 Download firmware to active card(s).
239 .It Ar I4B_ACTIVE_DIAGNOSTIC
240 Return diagnostic information from active cards.
243 Supported status and event messages from the kernel are:
244 .Bl -tag -width Ds -compact -offset indent
245 .It Ar MSG_CONNECT_IND
246 An incoming call from a remote ISDN user is indicated.
247 .It Ar MSG_CONNECT_ACTIVE_IND
248 After an incoming call has been accepted locally or an outgoing call has
249 been accepted by a remote, the exchange signaled an active connection
250 and the corresponding B-channel is switched through.
251 .It Ar MSG_DISCONNECT_IND
252 A call was terminated.
253 .It Ar MSG_DIALOUT_IND
254 A userland interface driver requests the daemon to dial out (typically a
255 network interface when a packet arrives in its send queue).
256 .It Ar MSG_IDLE_TIMEOUT_IND
257 A call was terminated by the isdn4bsd kernel driver because a B-channel
258 idle timeout occurred.
260 Accounting information from a network driver.
261 .It Ar MSG_CHARGING_IND
262 Charging information from the kernel.
265 Currently the only possibility to trigger an outgoing call is that an
266 isdn4bsd network driver
267 .Em ( isdn\*[Lt]n\*[Gt] )
274 The daemon requests a new CDID from the kernel by using the
276 ioctl message, this CDID is now used in all interactions with the kernel
277 to identify this single call until a disconnect occurs.
279 After getting the CDID, the daemon looks up several additional information
280 in its entry section of the configuration corresponding to that connection
283 ioctl message to the kernel. The kernel now dials the remote side and
284 if the remote side accepts the call, the kernel sends a
285 .Em MSG_CONNECT_ACTIVE_IND
288 The call is terminated by either the local site timing out or the remote
289 side hanging up the connection or the local side actively sending a
290 .Em I4B_DISCONNECT_REQ
291 ioctl message, both events are signaled to the
293 by the kernel sending the
294 .Em I4B_DISCONNECT_IND
295 message and the CDID corresponding to the call is no longer valid.
297 Incoming calls are signaled to
299 by the kernel transmitting the
301 message to the daemon.
303 With the information contained in this message,
305 searches the entry section of its configuration database and if a match is
306 found, it accepts or rejects the call or, if no match is found, it ignores the
307 call - all by issuing a
309 ioctl message with the appropriate parameters to the kernel.
311 In case the daemon decided to accept the call, the kernel signals this
313 .Em MSG_CONNECT_ACTIVE_IND
314 message to the daemon.
316 The call is terminated by either the local site timing out or the remote
317 side hanging up the connection or the local side actively sending a
318 .Em I4B_DISCONNECT_REQ
319 ioctl message, both events are signaled to
321 by the kernel sending the
322 .Em I4B_DISCONNECT_IND
323 message and the CDID corresponding to the call is no longer valid.
325 Sending a HUP signal to
327 causes all open connections to be terminated and the configuration file is
328 reread. In case aliasfile handling was enabled, the aliasfile is also
331 Sending a USR1 signal to
333 causes the accounting file and the logfile (if logging to a file is used
334 instead of logging via the
336 facility) to be closed and reopened to make logfile rotation possible.
338 The following environment variables affect the execution of
342 The terminal type when running in full-screen display mode.
345 for more information.
348 .Bl -tag -width /etc/isdn/isdnd.rates -compact
350 The device-file used to communicate with the kernel ISDN driver subsystem.
351 .It Pa /var/log/messages
352 A record of the actions in case of syslogd logging support.
353 .It Pa /var/log/isdnd.acct
354 The default accounting information filename (if accounting is configured).
355 .It Pa /var/log/isdnd.log
356 The default logging filename (if logging to a file is configured).
357 .It Pa /var/run/isdnd.pid
358 The process id of the ISDN daemon (also known as "lockfile" to isdnd, preventing multiple invocations of it).
360 The directory where isdnd expects some supplementary data files and programs
361 for telephone answering support.
362 .It Pa /etc/isdn/isdnd.rc
363 The default runtime configuration file.
364 .It Pa /etc/isdn/isdnd.rates
365 The default unit charging rates specification file.
366 .It Pa /etc/isdn/isdntel.alias
367 The default table (if aliasing is enabled) to convert phone number to caller's name.
370 For a first try, the following command should be used to start
372 in foreground mode for better debugging the configuration setup:
373 .Bd -literal -offset indent
377 This will start isdnd with reasonable debugging settings and produce
378 output on the current terminal.
380 can then be terminated by entering
383 Another example, the command:
384 .Bd -literal -offset indent
385 isdnd -d0xf9 -f -r /dev/ttyv3 -t vt100
390 with reasonable debugging messages enabled, full-screen mode of operation,
391 full-screen display redirected to /dev/ttyv03 and using a termcap entry
392 for vt100 on this display.
394 Exit status is 0 on success, 1 on error.
407 daemon and this manual page were written by
408 .An Hellmuth Michaelis Aq hm@kts.org .