]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - usr.sbin/i4b/isdnd/isdnd.8
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / usr.sbin / i4b / isdnd / isdnd.8
1 .\"
2 .\" Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\"     $Id: isdnd.8,v 1.29 2000/05/02 11:50:28 hm Exp $
26 .\"
27 .\" $FreeBSD$
28 .\"
29 .\"     last edit-date: [Wed May  2 10:48:30 2001]
30 .\"
31 .Dd July 5, 2007
32 .Dt ISDND 8
33 .Os
34 .Sh NAME
35 .Nm isdnd
36 .Nd isdn4bsd ISDN connection management daemon
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl c Ar configfile
40 .Op Fl d Ar debuglevel
41 .Op Fl f
42 .Op Fl F
43 .Op Fl l
44 .Op Fl L Ar logfile
45 .Op Fl P
46 .Op Fl r Ar device
47 .Op Fl s Ar facility
48 .Op Fl t Ar terminaltype
49 .Op Fl u Ar charging unit length
50 .Op Fl m
51 .Sh DESCRIPTION
52 The
53 .Nm
54 utility
55 is the isdn4bsd package daemon which manages all ISDN related connection
56 and disconnection of ISDN devices supported by the package.
57 .Pp
58 The options are as follows:
59 .Bl -tag -width Ds
60 .It Fl c
61 Use
62 .Ar configfile
63 as the name of the runtime configuration filename for
64 .Nm
65 instead of the default file
66 .Li /etc/isdn/isdnd.rc .
67 .It Fl d
68 If debugging support is compiled into
69 .Nm
70 this option is used to specify the debugging level, or better which kind
71 of debugging messages are displayed.
72 The debugging level is the sum of the
73 following values:
74 .Pp
75 .Bl -tag -width Ds -compact -offset indent
76 .It Ar 0x001
77 general debugging.
78 .It Ar 0x002
79 rates calculation.
80 .It Ar 0x004
81 timing calculations.
82 .It Ar 0x008
83 state transitions.
84 .It Ar 0x010
85 retry handling.
86 .It Ar 0x020
87 dialing.
88 .It Ar 0x040
89 process handling.
90 .It Ar 0x080
91 isdn4bsd kernel i/o calls.
92 .It Ar 0x100
93 controller and channel busy/free messages.
94 .It Ar 0x200
95 isdnd.rc configuration file processing.
96 .It Ar 0x400
97 outgoing call budget handling.
98 .It Ar 0x800
99 valid keyword and holiday file processing.
100 .El
101 .Pp
102 The value can be specified in any number base supported by the
103 .Xr sscanf 3
104 library routine.
105 .Pp
106 In addition, this option accepts also the character 'n' as an argument to
107 disable displaying debug messages on the full-screen display.
108 .Pp
109 .It Fl f
110 Specifying this option causes
111 .Nm
112 to enter the full-screen mode of operation.
113 When operating in this mode,
114 entering the control character
115 .Em Control-L
116 causes the display to be refreshed and entering
117 .Em Carriage-Return
118 or
119 .Em Enter
120 will pop-up a command window.
121 Because the
122 .Nm
123 utility will not listen to messages while the command window is active,
124 this command window will disappear automatically after 5 seconds without
125 any command key press.
126 .Pp
127 While the command window is active,
128 .Em Tab
129 or
130 .Em Space
131 advances to the next menu item.
132 To execute a command, press
133 .Em Return
134 or
135 .Em Enter
136 for the highlighted menu item, or enter the number corresponding to the
137 item to be executed or enter the capitalized character in the menu item
138 description.
139 .It Fl l
140 If this option is set, logging is not done via the
141 .Xr syslogd 8
142 facility but instead is appended to a file.
143 .It Fl L
144 Specifies the name of the logfile which is used when the option
145 .Em -l
146 is set.
147 See also the keyword
148 .Em rotatesuffix
149 in the system section of
150 .Xr isdnd.rc 5 .
151 .It Fl P
152 This option prints out the parsed and verified isdnd configuration in the same
153 format as the isdnd.rc file.
154 This output can be used as an isdnd.rc file.
155 This
156 feature is especially useful when debugging an isdnd.rc file to see, what the
157 default settings of options are when they are not set in the isdnd.rc input
158 file.
159 .Pp
160 The
161 .Nm
162 exits after the printout is done.
163 .It Fl F
164 This option prevents
165 .Nm
166 to detach from the controlling tty and become a daemon.
167 .It Fl r
168 In conjunction with the
169 .Fl t
170 option,
171 .Ar device
172 specifies a terminal device which becomes the controlling tty for
173 .Nm
174 and on which the full-screen mode output is displayed.
175 .It Fl s
176 This option may be used to specify the logging facility in case
177 .Xr syslog 3
178 logging is configured and another facility than the default LOCAL0
179 facility shall be used.
180 The facility is to be specified as an integer in
181 the range 0-11 or 16-23 (see the file /usr/include/syslog.h).
182 .It Fl t
183 In conjunction with the
184 .Fl f
185 and
186 .Fl r
187 options,
188 .Ar terminaltype
189 specifies a terminal type or termcap entry name (such as vt220) for the device
190 used for
191 .Nm
192 full-screen output.
193 This is useful if an unused (no getty running) tty line is
194 used for full-screen output for which no
195 .Li TERM
196 environment variable exists.
197 .It Fl u
198 Specifies the length of a charging unit in case the config file entry
199 keyword
200 .Em unitlenghtsrc
201 is set to
202 .Em cmdl .
203 .It Fl m
204 If the isdn daemon is compiled with local or remote monitoring support,
205 this option disables all monitoring access.
206 It overrides the config
207 file option
208 .Em monitor-allowed .
209 .El
210 .Sh INTERACTION WITH THE KERNEL
211 The
212 .Nm
213 utility
214 communicates with the kernel part of isdn4bsd by receiving status and
215 event messages
216 .Xr ( read 2
217 from device
218 .Pa /dev/i4b )
219 and by transmitting commands and responses
220 .Xr ( ioctl 2
221 from device
222 .Pa /dev/i4b ) .
223 .Pp
224 The messages and message parameters are documented in the include
225 file
226 .Em /usr/include/i4b/i4b_ioctl.h .
227 .Pp
228 Supported command and response messages (ioctls) to the kernel are:
229 .Bl -tag -width Ds -compact -offset indent
230 .It Ar I4B_CDID_REQ
231 Request a unique Call Description IDentifier (cdid) which identifies
232 uniquely a single interaction of the local D channel with the exchange.
233 .It Ar I4B_CONNECT_REQ
234 Actively request a call setup to a remote ISDN subscriber.
235 .It Ar I4B_CONNECT_RESP
236 Respond to an incoming call, either accept, reject or ignore it.
237 .It Ar I4B_DISCONNECT_REQ
238 Actively terminate a connection.
239 .It Ar I4B_CTRL_INFO_REQ
240 Request information about an installed ISDN controller card.
241 .It Ar I4B_DIALOUT_RESP
242 Give information about call setup to driver who requested dialing out.
243 .It Ar I4B_TIMEOUT_UPD
244 Update the kernels timeout value(s) in case of dynamically calculated
245 shorthold mode timing changes.
246 .It Ar I4B_UPDOWN_IND
247 Inform the kernel userland drivers about interface soft up/down status
248 changes.
249 .It Ar I4B_CTRL_DOWNLOAD
250 Download firmware to active card(s).
251 .It Ar I4B_ACTIVE_DIAGNOSTIC
252 Return diagnostic information from active cards.
253 .El
254 .Pp
255 .Pp
256 Supported status and event messages from the kernel are:
257 .Bl -tag -width Ds -compact -offset indent
258 .It Ar MSG_CONNECT_IND
259 An incoming call from a remote ISDN user is indicated.
260 .It Ar MSG_CONNECT_ACTIVE_IND
261 After an incoming call has been accepted locally or an outgoing call has
262 been accepted by a remote, the exchange signaled an active connection
263 and the corresponding B-channel is switched through.
264 .It Ar MSG_DISCONNECT_IND
265 A call was terminated.
266 .It Ar MSG_DIALOUT_IND
267 A userland interface driver requests the daemon to dial out (typically a
268 network interface when a packet arrives in its send queue).
269 .It Ar MSG_IDLE_TIMEOUT_IND
270 A call was terminated by the isdn4bsd kernel driver because a B-channel
271 idle timeout occurred.
272 .It Ar MSG_ACCT_IND
273 Accounting information from a network driver.
274 .It Ar MSG_CHARGING_IND
275 Charging information from the kernel.
276 .El
277 .Pp
278 .Ss OUTGOING CALLS
279 Currently the only possibility to trigger an outgoing call is that an
280 isdn4bsd network driver
281 .Em (ipr<n>)
282 sends a
283 .Em MSG_DIALOUT_IND
284 to the
285 .Nm
286 utility.
287 .Pp
288 The daemon requests a new CDID from the kernel by using the
289 .Em I4B_CDID_REQ
290 ioctl message, this CDID is now used in all interactions with the kernel
291 to identify this single call until a disconnect occurs.
292 .Pp
293 After getting the CDID, the daemon looks up several additional information
294 in its entry section of the configuration corresponding to that connection
295 and issues a
296 .Em I4B_CONNECT_REQ
297 ioctl message to the kernel.
298 The kernel now dials the remote side and
299 if the remote side accepts the call, the kernel sends a
300 .Em MSG_CONNECT_ACTIVE_IND
301 to the daemon.
302 .Pp
303 The call is terminated by either the local side timing out or the remote
304 side hanging up the connection or the local side actively sending a
305 .Em I4B_DISCONNECT_REQ
306 ioctl message, both events are signaled to the
307 .Nm
308 by the kernel sending the
309 .Em I4B_DISCONNECT_IND
310 message and the CDID corresponding to the call is no longer valid.
311 .Pp
312 .Ss INCOMING CALLS
313 Incoming calls are signaled to the
314 .Nm
315 by the kernel transmitting the
316 .Em MSG_CONNECT_IND
317 message to the daemon.
318 .Pp
319 With the information contained in this message, the
320 .Nm
321 searches the entry section of its configuration database and if a match is
322 found, it accepts or rejects the call or, if no match is found, it ignores the
323 call - all by issuing a
324 .Em I4B_CONNECT_RESP
325 ioctl message with the appropriate parameters to the kernel.
326 .Pp
327 In case the daemon decided to accept the call, the kernel signals this
328 by sending a
329 .Em MSG_CONNECT_ACTIVE_IND
330 message to the daemon.
331 .Pp
332 The call is terminated by either the local side timing out or the remote
333 side hanging up the connection or the local side actively sending a
334 .Em I4B_DISCONNECT_REQ
335 ioctl message, both events are signaled to the
336 .Nm
337 by the kernel sending the
338 .Em I4B_DISCONNECT_IND
339 message and the CDID corresponding to the call is no longer valid.
340 .Sh SIGNALS
341 Sending a HUP signal to
342 .Nm
343 causes all open connections to be terminated and the configuration file is
344 reread.
345 In case aliasfile handling was enabled, the aliasfile is also
346 reread.
347 .Pp
348 Sending a USR1 signal to
349 .Nm
350 causes the accounting file and the logfile (if logging to a file is used
351 instead of logging via the
352 .Xr syslog 3
353 facility) to be closed and reopened to make logfile rotation possible.
354 .Sh ENVIRONMENT
355 The following environment variables affect the execution of
356 .Nm :
357 .Bl -tag -width Ds
358 .It Ev TERM
359 The terminal type when running in full-screen display mode.
360 See
361 .Xr environ 7
362 for more information.
363 .El
364 .Sh FILES
365 .Bl -tag -width /etc/isdn/isdnd.rates
366 .It Pa /dev/i4b
367 The device-file used to communicate with the kernel ISDN driver subsystem.
368 .It Pa /var/log/messages
369 A record of the actions in case of syslogd logging support.
370 .It Pa /var/log/isdnd.acct
371 The default accounting information filename (if accounting is configured).
372 .It Pa /var/log/isdnd.log
373 The default logging filename (if logging to a file is configured).
374 .It Pa /var/run/isdnd.pid
375 The process id of the isdn daemon (also known as "lockfile" to isdnd, preventing multiple invocations of it).
376 .It Pa /usr/local/lib/isdn
377 .It Pa /etc/isdn
378 The directory where isdnd expects some supplementary data files and programs
379 for telephone answering support.
380 .It Pa /etc/isdn/isdnd.rc
381 The default runtime configuration file.
382 .It Pa /etc/isdn/isdnd.rates
383 The default unit charging rates specification file.
384 .It Pa /etc/isdn/isdntel.alias
385 The default table (if aliasing is enabled) to convert phone number to caller's name.
386 .El
387 .Sh EXIT STATUS
388 Exit status is 0 on success, 1 on error.
389 .Sh EXAMPLES
390 For a first try, the following command should be used to start
391 .Nm
392 in foreground mode for better debugging the configuration setup:
393 .Bd -literal -offset indent
394 isdnd -d0xf9 -F
395 .Ed
396 .Pp
397 This will start isdnd with reasonable debugging settings and produce
398 output on the current terminal.
399 The
400 .Nm
401 utility can then be terminated by entering Control-C.
402 .Pp
403 Another example, the command:
404 .Bd -literal -offset indent
405 isdnd -d0xf9 -f -r /dev/ttyv3 -t vt100
406 .Ed
407 .Pp
408 will start
409 .Nm
410 with reasonable debugging messages enabled, full-screen mode of operation,
411 full-screen display redirected to /dev/ttyv3 and using a termcap entry
412 for vt100 on this display.
413 .Sh SEE ALSO
414 .Xr i4bing 4 ,
415 .Xr i4bipr 4 ,
416 .Xr i4bisppp 4 ,
417 .Xr isdnd.rates 5 ,
418 .Xr isdnd.rc 5 ,
419 .Xr isdntel 8 ,
420 .Xr isdntrace 8 ,
421 .Xr syslogd 8
422 .Sh AUTHORS
423 The
424 .Nm
425 utility and this manual page were written by
426 .An Hellmuth Michaelis Aq hm@FreeBSD.org .
427 .Sh BUGS
428 Still one or more left.