1isdnlog(8) Linux System Administration isdnlog(8)
2
3
4
6 isdnlog - isdn log system (and more)
7
9 Isdnlog gets information from your isdn card, decodes this information,
10 and can do anything with it, such as logging, starting programs, and
11 more. All options to isdnlog can be given as command line flags, or you
12 can specify a file with options (recommended).
13
15 Isdnlog only works with the HiSax isdn driver. Other cards with their
16 own driver are not supported. Additionally you need to enable d-channel
17 logging (you can use "hisaxctrl <DriverId> 1 4" to do that, e.g.
18 "hisaxctrl line0 1 4"). Isdnlog can only log outgoing calls that origi‐
19 nate from your isdn card, and incoming calls. To get information about
20 outgoing calls from other isdn devices (e.g. telephones), you need a
21 second Teles isdn card, with crossed lines. Such a card is not usable
22 for communicating, but can log outgoing calls from any device (see dual
23 option below).
24
26 -V show version information and exit.
27
28 -fFILE read options from the config file FILE. This file is also
29 called the parameter file of isdnlog. The first line should be
30 "[options]". You may use blank lines and comments (starting with
31 a #). All config files for isdnlog have the format described in
32 isdn.conf(5). Debug options must be given on the command line,
33 they cannot be stored in a file.
34
35 /dev/DEVICE
36 isdnlog will read from this device and from /dev/isdninfo. You
37 should give /dev/isdnctrl0 for the first isdn card (or /dev/isd‐
38 nctrl2 for the second).
39
40 Isdnlog has a replay mode for debugging, where you can simulate
41 previous recorded events. In that case use "-" instead of a
42 device.
43
44 -Ax amt="value"
45 Set digits necessary to get an outside line, when connected
46 through a PABX. You can give several codes padded with a ":"
47 (e.g. -A0:80:81:82).
48
49 areacode="value"
50 (There is no commandline option for this.) Overwrite area code
51 from isdn.conf. A machine connected to subscriber lines with
52 different area codes and thus several isdnlogs running requires
53 this non global setting.
54
55 -Bvbn vbn="value"
56 Set the provider preselection to the given value. More prefixes
57 may be separated by a ":".
58 Values are e.g. "010" for DE, "10" for AT, "16:17" for NL, "9"
59 for FR.
60
61 -Rprefix preselected="value"
62 Set the preselected (i.e the provider choosen, if no prefix is
63 dialed) provider to value. Value should be without vbn.
64
65 skipProv=skiplist
66 (There is no commandline option for this.) Ignore certain
67 providers from the rate-file. The format of skiplist is the
68 same as for Q: tags in rate.conf and described in rate.conf(5).
69
70 -0x:y trim="value[:value]"
71 Suppress leading digits. If isdnlog is connected through a PABX,
72 it is sometimes not possible to let isdnlog distinguish between
73 a national and an international call, even with help of the -A
74 option.
75 This option requires two values separated with ":" as an argu‐
76 ment. These values tell isdnlog how many leading digits to
77 remove from incoming and outgoing calls respectively. If only
78 one value is given, it is used for both incoming and outgoing
79 calls.
80 Don't use this in combination with the -A option! This will con‐
81 fuse the system (and possibly you).
82
83 Example: a PABX in Germany shows the number of an incoming call
84 from Hamburg as "00040...". When calling out to Hamburg, it
85 shows the number as "0040...". This means that on incoming
86 calls, three zeroes must be removed, and on outgoing calls two
87 zeroes must be removed (the number must be normalized to be
88 without any leading zeroes in the case of a national number;
89 international numbers must have one leading zero). So, in this
90 case, the option -03:2 would be correct.
91
92 -ix internS0="value"
93 Telefon number shorter then value are considered to be internal
94 numbers on your PABX.
95
96 -o other={yes|no}
97 Normally "causes" (e.g. "non-selected user clearing") for other
98 connected ISDN devices are not displayed, only those which are
99 related to the connection will be shown. With this option the
100 causes for the other devices are also displayed.
101
102 -ux ignoreRR="value"
103 Ignore "housekeeping" frames. x may be 1 (ignore RR=Receiver
104 ready) or 2 (ignore EMP=Euracom Management Protokoll) frames.
105
106 -Ux[:y] ignoreCOLP="value[:value]"
107 Ignore COLP/CLIP frames when value is 1 or greater. Value 0 is
108 default, and tells isdnlog to not ignore COLP/CLIP frames. With
109 value 2 the ignored COLP/CLIP number is displayed.
110 The first value applies to COLP the second to CLIP. If only one
111 value is given, it applies to COLP and CLIP.
112 Sometimes the COLP number is a number in a different areacode to
113 the number that was dialled, and then the cost calculation would
114 be wrong.
115
116 ignoreUPD={yes|no}
117 (There is no commandline option for this.) A PABX may cause
118 numerous messages like "Unexpected discriminator 0x47 --
119 ignored!" resulting from protocol discriminator values in layer
120 3 not known to isdnlog. Set ignoreUPD to yes to suppress this
121 messages.
122
123 -2x dual="value"
124 Enable dual mode. You need this if you have a second isdn card
125 attached with crossed lines so it can listen to what other isdn
126 devices like telephones are doing. With x=2 you can increase the
127 debug output - every single digit will be displayed.
128
129 Some setups may require workarounds for reliable logging. These
130 workarounds are enabled by addition of the following numbers to
131 the dual value. They are intended for the dualmode but may also
132 be useful without. In this case, specify only the sum of the
133 following numbers without 1 or 2 for the dual mode.
134
135 0x100 Enable this when the destination number of an outgoing
136 call contains the number of the previous call, e.g. call‐
137 ing 222 after calling 111 before results in 111222 for
138 the second call.
139
140 This may also help in situations where an unanswered
141 incoming call causes incorrect logging of the following
142 outgoing call.
143
144 0x200 Enable this when outgoing calls are logged without a
145 source number (own MSN).
146
147 0x400 Enable this when unanswered incoming calls are logged
148 multiple times (revealed by isdnrep -E).
149
150 -1 A HFC-based card is used for echo mode. Enable echo mode for the
151 HFC card with
152 hisaxctrl id 10 1
153 hisaxctrl id 12 1
154
156 -r Replay a debug file (e.g. /tmp/isdnctrl0) to find bugs. With
157 this flag you should give a filename with the debug information
158 instead of a device. It will also work with files not created
159 by isdnlog (e.g. "cat /dev/isdnctrl0").
160
161 -n newline={yes|no}
162 Display throughput messages on the same line (only useful with
163 logging to stderr or a console device).
164
165 -WX width="value"
166 Limit all messages to X characters per line.
167
168 -vX log=X
169 Isdnlog can copy all information to /tmp/DEVICE (e.g. /tmp/isd‐
170 nctrl0 if you started isdnlog with /dev/isdnctrl0). Choose what
171 debugging you want from the following list, add the correspond‐
172 ing numbers together and use that for X:
173
174 1 copy all "HEX:" lines from the hisax isdn device driver.
175 2 copy /dev/isdnctrl output (or whatever device you speci‐
176 fied).
177 4 copy /dev/isdninfo output
178 8 copy transfer values ("ibyte","obyte").
179
180 Isdnlog will close and reopen this file after a "kill -HUP".
181
182 -s flush={yes|no}
183 Isdnlog will flush the debug file /tmp/DEVICE (e.g. /tmp/isdnc‐
184 trl0) after each write access.
185
186 -P pipe={yes|no}
187 Copy the debug information to stdout. This way you can run
188 isdnlog as the source of a pipe like "isdnlog -P /dev/isdnctrl0
189 |prog ... ".
190
191 -D daemon={yes|no}
192 Start isdnlog as daemon: it will fork into the background, and
193 use syslog as the default logging method (if you did not specify
194 -m).
195
196 -T Trace mode: isdnlog will wait for a key after processing a line
197 from /dev/isdnctrl0 (or whatever device you specified).
198
199 -K Print for every pressed key the thruput. Can not used together
200 with option -d.
201
202 -b If you are using a bilingual network terminator (NT), you must
203 give this flag, or isdnlog will show the own MSN's incorrectly.
204
206 You can define aliases for telephone numbers (see callerid.conf(5) and
207 isdn.conf(5) for more information). Isdnlog will compare all numbers to
208 the list of aliases, and when a match is found, the alias is displayed
209 instead of the number.
210
212 Isdnlog can log information via syslog, to stdout, and send information
213 to x11 clients. Calculate a code from these numbers by adding them, and
214 activate logging with -s, -m or -x. You can use normal numbers or hex
215 numbers. Default is stderr mode -m, unless daemon mode is enabled; then
216 it's syslog mode -l.
217
218 0x1 Errors
219
220 0x2 Warnings
221
222 0x4 Notice
223
224 0x8 Log messages to /tmp/DEVICE (e.g. /tmp/isdnctrl0 if isdnlog is
225 started with /dev/isdnctrl0)
226
227 0x10 Show telephone numbers immediately.
228
229 0x20 Show charge int and telephone costs with every charge signal (in
230 Germany, and perhaps other countries, you have to pay to get
231 these signals).
232
233 0x40 Show connect messages.
234
235 0x80 Show hang up messages.
236
237 0x100 Show cause message on hang up.
238
239 0x200 Show time messages.
240
241 0x400 Show throughput in bytes (every -wX seconds).
242
243 0x800 Show state of B-channels (use with -M monitor).
244
245 0x1000 Show service indicator.
246 You should log at least 0x7 (errors, warnings, notice) messages.
247
248 0x2000 Log estimated time till next charge signal.
249
250 0x4000 Show chargemax.
251
252 0x8000 Enable core file on SIGSEGV.
253
254 0x10000 ... 0x800000, show more diagnostic and debug messages.
255
256 -mX stdout="value"
257 Log to stderr.
258
259 -OX outfile="path"
260 Log to file X instead of stderr. Isdnlog will close this device
261 when it gets a signal -SIGHUP (-1). Only valid with -m option.
262 If the name starts with a "+", new data will be appended to the
263 existing file. Default behaviour is to truncate the file when
264 isdnlog opens it.
265
266 -C X console="path"
267 Log to console X instead of stderr. You can use -O and -C
268 together, so that isdnlog copies output to both. Specify a full
269 pathname. Beware: you must put a space between -C and X !
270
271 -M monitor={yes|no}
272 With this flag, isdnlog will generate output for monitor pro‐
273 grams like imon, imontty or isdnmon. You must also give -m with
274 0x800 enabled.
275
276 -lX syslog="value"
277 Log to syslog. X is the log code. You can log to syslog and to
278 stdout at the same time.
279
280 -xX xisdn="value"
281 Pass information to x11 client. X is the log code. You can pass
282 information to x11 clients and log to syslog and/or stdout at
283 the same time.
284
285 -pPORT port="value"
286 Pass information to x11 client on this PORT.
287
288 -cX calls="value"
289 Only with -xX : save the last X calls and pass this information
290 to an x11 client. Default value is 100.
291
292 -LX xlog="value"
293 Only with -xX : save the last X messages and pass this informa‐
294 tion to an x11 client. Default value is 500.
295
296 -wX thruput="value"
297 If you enabled throughput logging (0x400), isdnlog will log the
298 throughput every X seconds.
299
300 -Ix:y ciinterval="value[:value]"
301 Interval for printing of charge messages (0x20).
302 The first value is the interval for the calculated CI, the sec‐
303 ond value for the EH (AOC-D) messages. If only one value is
304 given, both intervals are set to this value.
305
307 -dx abclcr="value"
308 Value is a bitmap:
309 0 ... off
310 1 ... calls to different area / country
311 2 ... local calls too
312 4 ... special numbers e.g. ISP
313 This needs a kernel patch to work. If the kernel patch is not
314 found a simulation is done.
315 Note: depending on your telefon provider local area calls may or
316 may not be routed to alternate providers. For changing the ISP
317 a script is called. s. next option 'providerchange'
318
319 providerchange="path_top_script"
320 (There is no commandline option for this.) This script is
321 called with 3 parameters, the new provider number (from rate-
322 CC.dat), the number, which would be dialed, and the servicename.
323 The script should adjust routing, name resolution and so on to
324 connect to the ISP. If the script returns non zero, LCR will
325 not be done.
326
327
329 -tX time={0|1|2}
330 Isdnlog will set your local system time to the time transmitted
331 by your isdn service provider: -t1 = once, -t2 = every time.
332
334 -hX hangup="value"
335 The isdn kernel system has a chargehup system, so it will hang
336 up a few seconds before the next charge signal. If you don't get
337 a charge signal from your phone company, isdnlog can emulate it.
338
339 On every outgoing connection, isdnlog will calculate the charge
340 time from day of week, time of day and the distance zone of the
341 connection.
342
343 The kernel needs to know how long the charge time is, and how
344 many seconds before the next charge signal it should hang up.
345 You have to set the second parameter with X in the form num‐
346 ber:number (hang up seconds before next charge signal for charge
347 times greater than or equal to 20 seconds : for charge times of
348 less than 20 seconds).
349
350 With this information, isdnlog will call "isdnctrl chargeint
351 <device> <charge time>" and "isdnctrl huptimeout <device> <sec‐
352 onds before charge signal>" (it actually communicates directly
353 with isdn, without calling isdnctrl, but this would have the
354 same effect).
355
356 You should run isdnlog with -t1 or better with -t2, so isdnlog
357 sets the local time in sync with telephone switching office.
358
359 If there is a third number in value, this is the minimum connec‐
360 tion time for providers charging a basic rate per connection.
361 e.g. hangup 3:5:60
362
363
365 isdnlog can react on any event and start programs. This feature is dis‐
366 abled unless you activate it with:
367
368 -S start={yes|no}
369 active "START" feature. Please read callerid.conf(5) for more
370 information.
371
372 closefds={yes|no}
373 (There is no commandline option for this.) If set to yes,
374 isdnlog will close all unnecessarily opened file descriptors
375 before a "START" program is executed. This closing will also
376 take place at isdnlog's restart after SIGHUP. Default is no.
377
379 isdnlog will log all connections in /var/log/isdn.log. isdnrep can
380 parse this file and calculate costs.
381
383 If you have more than one isdn card, you need to run one isdnlog for
384 each card. And every process must have a different name, so you should
385 create a symbolic link isdnlog1 -> isdnlog, and start isdnlog1 for the
386 second card.
387
389 You cannot unload isdn kernel modules while an isdn device is in use,
390 e.g. a PPP interface is defined or isdnlog is running. Look at /var/run
391 for a file isdnlog.DEVICE.pid with the process id of isdnlog, and kill
392 that. After that you should be able to unload your isdn kernel modules.
393
395 /dev/DEVICE
396 isdnlog requires a device as a parameter to read from (e.g.
397 /dev/isdnctrl0 for the 1st isdn card).
398
399 /tmp/DEVICE
400 isdnlog can copy everything it reads to this file as debug
401 information (e.g. /tmp/isdnctrl0 if you started isdnlog with
402 /dev/isdnctrl0).
403
404 /var/run/isdnlog.DEVICE.pid
405 isdnlog creates this file with its process id. Useful to see if
406 isdnlog is running.
407
408 /var/lock/LCK..DEVICE
409 isdnlog creates a lock file for the device, so no other pro‐
410 cesses will access that device.
411
412 /etc/isdn/isdn.conf
413 isdnlog config file. Options to isdnlog can be given on the com‐
414 mand line, can be stored in this file in [options] (with command
415 line option -f/etc/isdn/isdn.conf), or in a different config
416 file, but isdnlog will look at this file for sections [global]
417 [variables] [isdnlog].
418
420 SIGHUP (-1)
421 On SIGHUP isdnlog restarts, and does therefore reread it's con‐
422 fig files.
423
424 SIGINT (-2), SIGTERM (-15), SIGQUIT (-3)
425 Isdnlog quits gracefully on receiving these termination signals.
426
427 SIGSEGV (-11)
428 If the log level contains 0x8000 (and your ulimits permit this)
429 isdnlog will generate a core file before terminating.
430
432 I start isdnlog with "isdnlog -f/etc/isdn/isdn.conf /dev/isdnctrl0".
433 This file contains a [options] section:
434
435 [options]
436 #newline=no # show all throughput messages in one line.
437 #width=80 # limit log messages to 80 characters per line
438 #amt=0:80:81 # digits to get a line through your PABX
439 log=15 # maximum debug mode
440 flush=no # flush logfile after every write
441 pipe=no # pipe log messages to stderr
442 daemon=yes # run isdnlog as daemon
443 stdout=0x1ff7 # stderr logging level
444 outfile=+/var/log/isdn.log # log to file
445 #console= # log to a console
446 monitor=yes # emulate output for imon/imontty/...
447 syslog=0x1ff7 # syslog logging level
448 #xisdn=0x07ff # x11 output level
449 #calls= # store call information for x11 client
450 #xlog= # store messages for x11 client
451 thruput=60 # if throughput logging is enabled: log every X seconds
452 time=2 # set time: 0 = never; 1 = once; 2 = every time
453 #hangup= # simulate charge signals
454 start=yes # enable starting programs
455
457 isdnconf(1) isdn.conf(5) callerid.conf(5)
458 rate-files(5) rate.conf(5)
459 isdnlog(5) isdnrep(1) isdnrate(1)
460
462 This manual page was written by Andreas Jellinghaus <aj@dun‐
463 geon.inka.de>, for Debian GNU/Linux and isdn4linux, updated by Leopold
464 Toetsch <lt@toetsch.at>.
465
466
467
468ISDN 4 Linux 3.9 2005/02/23 isdnlog(8)