1isdnlog(8)                Linux System Administration               isdnlog(8)
2
3
4

NAME

6       isdnlog - isdn log system (and more)
7

DESCRIPTION

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

RESTRICTION

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

GENERAL OPTIONS

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 chosen, 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              Telephone numbers shorter then value are considered to be inter‐
94              nal 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       -Hx watchdog
103
104       -N use new config
105
106       -Q sqldump
107
108       -a any
109
110       -ux  ignoreRR="value"
111              Ignore "housekeeping" frames.  x may be  1  (ignore  RR=Receiver
112              ready) or 2 (ignore EMP=Euracom Management Protokoll) frames.
113
114       -Ux[:y]   ignoreCOLP="value[:value]"
115              Ignore  COLP/CLIP frames when value is 1 or greater.  Value 0 is
116              default, and tells isdnlog to not ignore COLP/CLIP frames.  With
117              value 2 the ignored COLP/CLIP number is displayed.
118              The  first value applies to COLP the second to CLIP. If only one
119              value is given, it applies to COLP and CLIP.
120              Sometimes the COLP number is a number in a different areacode to
121              the number that was dialled, and then the cost calculation would
122              be wrong.
123
124       ignoreUPD={yes|no}
125              (There is no commandline option for this.)   A  PABX  may  cause
126              numerous   messages   like  "Unexpected  discriminator  0x47  --
127              ignored!" resulting from protocol discriminator values in  layer
128              3  not  known to isdnlog.  Set ignoreUPD to yes to suppress this
129              messages.
130
131       -2x  dual="value"
132              Enable dual mode. You need this if you have a second  isdn  card
133              attached  with crossed lines so it can listen to what other isdn
134              devices like telephones are doing. With x=2 you can increase the
135              debug output - every single digit will be displayed.
136
137              Some setups may require workarounds for reliable logging.  These
138              workarounds are enabled by addition of the following numbers  to
139              the dual value.  They are intended for the dualmode but may also
140              be useful without.  In this case, specify only the  sum  of  the
141              following numbers without 1 or 2 for the dual mode.
142
143              0x100  Enable  this  when  the destination number of an outgoing
144                     call contains the number of the previous call, e.g. call‐
145                     ing  222  after  calling 111 before results in 111222 for
146                     the second call.
147
148                     This may also help  in  situations  where  an  unanswered
149                     incoming  call  causes incorrect logging of the following
150                     outgoing call.
151
152              0x200  Enable this when outgoing  calls  are  logged  without  a
153                     source number (own MSN).
154
155              0x400  Enable  this  when  unanswered  incoming calls are logged
156                     multiple times (revealed by isdnrep -E).
157
158       -1     A HFC-based card is used for echo mode. Enable echo mode for the
159              HFC card with
160              hisaxctrl id 10 1
161              hisaxctrl id 12 1
162

DEBUG MODULE

164       -r     Replay  a  debug  file  (e.g. /tmp/isdnctrl0) to find bugs. With
165              this flag you should give a filename with the debug  information
166              instead  of  a device.  It will also work with files not created
167              by isdnlog (e.g.  "cat /dev/isdnctrl0").
168
169       -n   newline={yes|no}
170              Display throughput messages on the same line (only  useful  with
171              logging to stderr or a console device).
172
173       -WX  width="value"
174              Limit all messages to X characters per line.
175
176       -vX  log=X
177              Isdnlog  can copy all information to /tmp/DEVICE (e.g. /tmp/isd‐
178              nctrl0 if you started isdnlog with /dev/isdnctrl0). Choose  what
179              debugging  you want from the following list, add the correspond‐
180              ing numbers together and use that for X:
181
182              1      copy all "HEX:" lines from the hisax isdn device driver.
183              2      copy /dev/isdnctrl output (or whatever device you  speci‐
184                     fied).
185              4      copy /dev/isdninfo output
186              8      copy transfer values ("ibyte","obyte").
187
188              Isdnlog will close and reopen this file after a "kill -HUP".
189
190       -s   flush={yes|no}
191              Isdnlog  will flush the debug file /tmp/DEVICE (e.g. /tmp/isdnc‐
192              trl0) after each write access.
193
194       -P   pipe={yes|no}
195              Copy the debug information to  stdout.  This  way  you  can  run
196              isdnlog  as the source of a pipe like "isdnlog -P /dev/isdnctrl0
197              |prog ... ".
198
199       -D   daemon={yes|no}
200              Start isdnlog as daemon: it will fork into the  background,  and
201              use syslog as the default logging method (if you did not specify
202              -m).
203
204       -T     Trace mode: isdnlog will wait for a key after processing a  line
205              from /dev/isdnctrl0 (or whatever device you specified).
206
207       -K     Print  for  every pressed key the thruput. Can not used together
208              with option -d.
209
210       -b     If you are using a bilingual network terminator (NT),  you  must
211              give this flag, or isdnlog will show the own MSN's incorrectly.
212

NUMBER REWRITE MODULE

214       You  can define aliases for telephone numbers (see callerid.conf(5) and
215       isdn.conf(5) for more information). Isdnlog will compare all numbers to
216       the  list of aliases, and when a match is found, the alias is displayed
217       instead of the number.
218

LOG MODULE

220       Isdnlog can log information via syslog, to stdout, and send information
221       to x11 clients. Calculate a code from these numbers by adding them, and
222       activate logging with -s, -m or -x. You can use normal numbers  or  hex
223       numbers. Default is stderr mode -m, unless daemon mode is enabled; then
224       it's syslog mode -l.
225
226       0x1    Errors
227
228       0x2    Warnings
229
230       0x4    Notice
231
232       0x8    Log messages to /tmp/DEVICE (e.g. /tmp/isdnctrl0 if  isdnlog  is
233              started with /dev/isdnctrl0)
234
235       0x10   Show telephone numbers immediately.
236
237       0x20   Show charge int and telephone costs with every charge signal (in
238              Germany, and perhaps other countries, you have  to  pay  to  get
239              these signals).
240
241       0x40   Show connect messages.
242
243       0x80   Show hang up messages.
244
245       0x100  Show cause message on hang up.
246
247       0x200  Show time messages.
248
249       0x400  Show throughput in bytes (every -wX seconds).
250
251       0x800  Show state of B-channels (use with -M monitor).
252
253       0x1000 Show service indicator.
254              You should log at least 0x7 (errors, warnings, notice) messages.
255
256       0x2000 Log estimated time till next charge signal.
257
258       0x4000 Show chargemax.
259
260       0x8000 Enable core file on SIGSEGV.
261
262       0x10000 ... 0x800000, show more diagnostic and debug messages.
263
264       -mX  stdout="value"
265              Log to stderr.
266
267       -OX  outfile="path"
268              Log  to file X instead of stderr. Isdnlog will close this device
269              when it gets a signal -SIGHUP (-1). Only valid with -m option.
270              If the name starts with a "+", new data will be appended to  the
271              existing  file.   Default behaviour is to truncate the file when
272              isdnlog opens it.
273
274       -C X      console="path"
275              Log to console X instead of  stderr.  You  can  use  -O  and  -C
276              together,  so that isdnlog copies output to both. Specify a full
277              pathname.  Beware: you must put a space between -C and X !
278
279       -M   monitor={yes|no}
280              With this flag, isdnlog will generate output  for  monitor  pro‐
281              grams  like imon, imontty or isdnmon. You must also give -m with
282              0x800 enabled.
283
284       -lX  syslog="value"
285              Log to syslog. X is the log code. You can log to syslog  and  to
286              stdout at the same time.
287
288       -xX  xisdn="value"
289              Pass  information to x11 client. X is the log code. You can pass
290              information to x11 clients and log to syslog  and/or  stdout  at
291              the same time.
292
293       -pPORT port="value"
294              Pass information to x11 client on this PORT.
295
296       -cX  calls="value"
297              Only  with -xX : save the last X calls and pass this information
298              to an x11 client. Default value is 100.
299
300       -LX  xlog="value"
301              Only with -xX : save the last X messages and pass this  informa‐
302              tion to an x11 client. Default value is 500.
303
304       -wX  thruput="value"
305              If  you enabled throughput logging (0x400), isdnlog will log the
306              throughput every X seconds.
307
308       -Ix:y     ciinterval="value[:value]"
309              Interval for printing of charge messages (0x20).
310              The first value is the interval for the calculated CI, the  sec‐
311              ond  value  for  the  EH  (AOC-D) messages. If only one value is
312              given, both intervals are set to this value.
313

LCR

315       -dx  abclcr="value"
316              Value is a bitmap:
317              0 ... off
318              1 ... calls to different area / country
319              2 ... local calls too
320              4 ... special numbers e.g. ISP
321              This needs a kernel patch to work. If the kernel  patch  is  not
322              found a simulation is done.
323              Note:  depending on your telephone provider local area calls may
324              or may not be routed to alternate providers.  For  changing  the
325              ISP a script is called. s. next option 'providerchange'
326
327       providerchange="path_top_script"
328              (There  is  no  commandline  option  for  this.)  This script is
329              called with 3 parameters, the new provider  number  (from  rate-
330              CC.dat), the number, which would be dialed, and the servicename.
331              The script should adjust routing, name resolution and so  on  to
332              connect  to  the  ISP.  If the script returns non zero, LCR will
333              not be done.
334
335

TIME MODULE

337       -tX  time={0|1|2}
338              Isdnlog will set your local system time to the time  transmitted
339              by your isdn service provider: -t1 = once, -t2 = every time.
340

CHARGEHUP MODULE

342       -hX  hangup="value"
343              The  isdn  kernel system has a chargehup system, so it will hang
344              up a few seconds before the next charge signal. If you don't get
345              a charge signal from your phone company, isdnlog can emulate it.
346
347              On  every outgoing connection, isdnlog will calculate the charge
348              time from day of week, time of day and the distance zone of  the
349              connection.
350
351              The  kernel  needs  to know how long the charge time is, and how
352              many seconds before the next charge signal it  should  hang  up.
353              You  have  to  set  the second parameter with X in the form num‐
354              ber:number (hang up seconds before next charge signal for charge
355              times  greater than or equal to 20 seconds : for charge times of
356              less than 20 seconds).
357
358              With this information, isdnlog  will  call  "isdnctrl  chargeint
359              <device>  <charge time>" and "isdnctrl huptimeout <device> <sec‐
360              onds before charge signal>" (it actually  communicates  directly
361              with  isdn,  without  calling  isdnctrl, but this would have the
362              same effect).
363
364              You should run isdnlog with -t1 or better with -t2,  so  isdnlog
365              sets the local time in sync with telephone switching office.
366
367              If there is a third number in value, this is the minimum connec‐
368              tion time for providers charging a basic rate per connection.
369              e.g. hangup 3:5:60
370
371

START MODULE

373       isdnlog can react on any event and start programs. This feature is dis‐
374       abled unless you activate it with:
375
376       -S   start={yes|no}
377              active  "START"  feature.  Please read callerid.conf(5) for more
378              information.
379
380       closefds={yes|no}
381              (There is no commandline option  for  this.)   If  set  to  yes,
382              isdnlog  will  close  all  unnecessarily opened file descriptors
383              before a "START" program is executed.  This  closing  will  also
384              take place at isdnlog's restart after SIGHUP.  Default is no.
385

CONNECTION LOG MODULE

387       isdnlog  will  log  all  connections  in /var/log/isdn.log. isdnrep can
388       parse this file and calculate costs.
389

SEVERAL ISDN CARDS

391       If you have more than one isdn card, you need to run  one  isdnlog  for
392       each  card. And every process must have a different name, so you should
393       create a symbolic link isdnlog1 -> isdnlog, and start isdnlog1 for  the
394       second card.
395

UNLOADING KERNEL MODULES

397       You  cannot  unload isdn kernel modules while an isdn device is in use,
398       e.g. a PPP interface is defined or isdnlog is running. Look at /var/run
399       for  a file isdnlog.DEVICE.pid with the process id of isdnlog, and kill
400       that. After that you should be able to unload your isdn kernel modules.
401

FILES

403       /dev/DEVICE
404              isdnlog requires a device as a  parameter  to  read  from  (e.g.
405              /dev/isdnctrl0 for the 1st isdn card).
406
407       /tmp/DEVICE
408              isdnlog  can  copy  everything  it  reads  to this file as debug
409              information (e.g. /tmp/isdnctrl0 if  you  started  isdnlog  with
410              /dev/isdnctrl0).
411
412       /var/run/isdnlog.DEVICE.pid
413              isdnlog  creates this file with its process id. Useful to see if
414              isdnlog is running.
415
416       /var/lock/LCK..DEVICE
417              isdnlog creates a lock file for the device,  so  no  other  pro‐
418              cesses will access that device.
419
420       /etc/isdn/isdn.conf
421              isdnlog config file. Options to isdnlog can be given on the com‐
422              mand line, can be stored in this file in [options] (with command
423              line  option  -f/etc/isdn/isdn.conf),  or  in a different config
424              file, but isdnlog will look at this file for  sections  [global]
425              [variables] [isdnlog].
426

SIGNALS

428       SIGHUP (-1)
429              On  SIGHUP isdnlog restarts, and does therefore reread it's con‐
430              fig files.
431
432       SIGINT (-2), SIGTERM (-15), SIGQUIT (-3)
433              Isdnlog quits gracefully on receiving these termination signals.
434
435       SIGSEGV (-11)
436              If the log level contains 0x8000 (and your ulimits permit  this)
437              isdnlog will generate a core file before terminating.
438

EXAMPLE

440       I  start  isdnlog  with "isdnlog -f/etc/isdn/isdn.conf /dev/isdnctrl0".
441       This file contains a [options] section:
442
443       [options]
444       #newline=no     # show all throughput messages in one line.
445       #width=80       # limit log messages to 80 characters per line
446       #amt=0:80:81    # digits to get a line through your PABX
447       log=15          # maximum debug mode
448       flush=no        # flush logfile after every write
449       pipe=no         # pipe log messages to stderr
450       daemon=yes      # run isdnlog as daemon
451       stdout=0x1ff7   # stderr logging level
452       outfile=+/var/log/isdn.log               # log to file
453       #console=       # log to a console
454       monitor=yes     # emulate output for  imon/imontty/...
455       syslog=0x1ff7   # syslog logging level
456       #xisdn=0x07ff   # x11 output level
457       #calls=         # store call information for x11 client
458       #xlog=          # store messages for x11 client
459       thruput=60      # if throughput logging is enabled: log every X seconds
460       time=2          # set time: 0 = never; 1 = once; 2 = every time
461       #hangup=        # simulate charge signals
462       start=yes       # enable starting programs
463

SEE ALSO

465       isdnconf(1) isdn.conf(5) callerid.conf(5)
466       rate-files(5) rate.conf(5)
467       isdnlog(5) isdnrep(1) isdnrate(1)
468

AUTHOR

470       This  manual  page  was  written  by   Andreas   Jellinghaus   <aj@dun‐
471       geon.inka.de>,  for Debian GNU/Linux and isdn4linux, updated by Leopold
472       Toetsch <lt@toetsch.at>.
473
474
475
476ISDN 4 Linux 3.13                 2005/02/23                        isdnlog(8)
Impressum