1isdnrep(1)                   Linux System Commands                  isdnrep(1)
2
3
4

NAME

6       isdnrep - report ISDN activity
7

DESCRIPTION

9       Isdnrep  reads  the  isdnlog log files, generates reports, does statis‐
10       tics, and other things. It can also generate HTML output for use with a
11       web server.
12

OPTIONS

14       -V     show version information and exit.
15
16       -a   all
17              Show  all  connections  registered. If this option is not given,
18              show only the connections made today.
19
20       -S   Summary
21              Show a summary (no individual calls) for selected date range. If
22              this  option  is  given  twice, the summaries per day are hidden
23              too. Don't use with -h
24
25       -h   no header
26              There will be no header for each day, nor will  the  summary  at
27              the  end  of each day and at the end of the report be generated.
28              This is useful if the output is to be processed by another  pro‐
29              gram.
30
31              This option doesn't work if the -wX is also given.
32
33       -n   numbers
34              Display numbers instead of the aliases for those numbers.
35
36       -fFILE The  file  from  which  to  generate the report. This is usually
37              /var/log/isdn.log,    or    whatever    is     configured     in
38              /etc/isdn/isdn.conf  as LOGFILE = .  The -f option will override
39              the setting in /etc/isdn/isdn.conf.
40
41       -t time span   time="time span"
42              With this option a specific time span covered by  the  log  file
43              can be displayed, e.g. all calls in November 1995, or on January
44              3rd 1996 between 03:00 and 09:45.
45
46              The format in which times are given  is  described  below.   The
47              time span has the following syntax:
48
49              time-time display from begin time up to end time
50              time-     display from given time up to "now"
51              -time     display from beginning of log file up to given time
52              time      display the given month, day, hour, ...
53
54
55       -d -time  delete="time"
56              Delete  entries  from the log file up to (but not including) the
57              specified time. The format is the same as  for  the  -t  option.
58              The  minus  before the time must be given! It is not possible to
59              define begin and end times; entries are always deleted from  the
60              beginning up to the time given.
61
62              Warning!  Entries are really deleted from the file. Careless use
63              can result in all entries being deleted, e.g. with  "isdnrep  -d
64              -".
65
66       -E   print Errors
67              Display  all  connections  and connection attempts. Without this
68              option, only successful connections are displayed.
69
70       -v   verbose
71              Display warnings on start-up.
72
73       -c   ignore default options
74              Do not append the "REPOPTIONS" setting from  /etc/isdn/isdn.conf
75              to the command line.
76
77       -p [n][m]'number'[,[m]'number'...] phonenumber
78              Display only selected phone numbers.
79
80              "number"  is  specified  in  the same format as in configuration
81              files (see isdn.conf(5)). E.g. wildcards can be used.
82
83              If the flag 'm' is given, the corresponding MSN is meant.  E.g.:
84              "m2"  means  MSN#2. If "m0" is given, all numbers are to be dis‐
85              played.
86
87              If the flag 'n' is given, the given number is  not  to  be  dis‐
88              played.
89
90       -U [_][.]'number' default source number
91              Use 'number' as source number for outgoing calls with an unknown
92              source number ("?").  '.' is replaced by country and  area  code
93              from isdn.conf.
94
95              With  '_' the default source number is used internally (e.g. for
96              fetching the right zone names from the ratefile) but it  is  not
97              displayed.
98
99       -i   incoming
100              Only incoming connections are displayed.
101
102       -o   outgoing
103              Only outgoing connections are displayed.
104
105       -xX  include/exclude calls
106              Select  calls  by day and/or hour.  The following selections are
107              possible and can specified in any combination and quantity using
108              : as separator:
109              ddaylist
110                     only days matching daylist
111              Ddaylist
112                     all days not matching daylist
113              htimelist
114                     only hours matching timelist
115              Htimelist
116                     all hours not matching timelist
117
118       daylist  and  timelist  have  the  same  syntax  as  described in rate-
119       files(5).  If a day or an hour is included  and  excluded  it  will  be
120       excluded.
121
122       Example:
123
124              -xd2-4:DH:h9-17:H12-15
125
126       This  will display all calls on Tuesdays, Wednesdays, or Thursdays that
127       are not holidays with a start time between 09:00 and 12:00 or 15:00 and
128       17:00.
129
130       -u   unknown caller
131              At  the  end  of  the  report,  all  numbers not aliased in cal‐
132              lerid.conf or ~/.isdn are displayed. This option is  unavailable
133              when HTML output is requested.
134
135       -LX  summary lists
136              Select  the  summaries  in  the footer by any combination of the
137              following letters:
138              i,I    foreign numbers of incoming calls
139              o,O    foreign numbers of outgoing calls
140              c,C    foreign numbers of all calls
141              z,Z    zones of outgoing calls
142              p,P    providers of outgoing calls
143              m,M    MSNs (own subscriber numbers) of outgoing calls
144
145       Upper case letters deselect, lower case letters select a summary.  With
146       at  least one lower case letter, only the selected summaries are shown,
147       as long as they are not also deselected.  -LiI for example will show no
148       summary at all.  Per default all summaries are displayed.
149
150       -rPROV recompute
151              Recompute  the connection fees with the current ratefile instead
152              of showing the amounts stored in  the  logfile  as  usual.   The
153              provider  PROV  for recomputation is selected in one of the fol‐
154              lowing ways:
155
156              -         Use the logged provider.
157              pNUM      Use provider with Pnum NUM (according  to  P:  tag  in
158                        ratefile).    The   provider  variant  is  taken  from
159                        rate.conf where the provider must be enabled.
160              pNUM_VAR  Use provider with Pnum NUM and variant VAR  (according
161                        to   P:NUM,VAR  in  ratefile).   No  requirements  for
162                        rate.conf.
163              vVBN
164              vVBN_VAR  Similar to pNUM[_VAR] but the provider is selected via
165                        VBN (B: tag in ratefile) instead of Pnum.
166              b         Use   the  cheapest  of  all  booked  providers.   The
167                        provider selection is done per call.  Booked providers
168                        are those, which are enabled in rate.conf
169              B         Like b but allow all providers, not only the booked.
170
171       -m[*|/]number  modify call costs
172              Multiply (*) or divide (/) the stored or recalculated call costs
173              by number before displaying them.  If neither * nor / is  given,
174              multiply.
175
176       -wX  WWW
177              isdnrep  can give its output in HTML format; this is switched on
178              with this option. Two modes are possible:
179
180              0      The HTML header is suppressed. Useful if the output is to
181                     be included into an existing page.
182              1      A complete HTML page is generated.
183
184       -sX  format string
185              The  output  generated  by isdnrep can be modified by specifying
186              the format of the line generated for each connection. The syntax
187              is  similar to that used by printf. The following parameters are
188              possible (the x where given means that a width  for  the  field,
189              also known as the precision, must be given):
190
191              %X  time without date, e.g. 23:54:06
192              %x  the date, e.g. 25/07/97
193              %y  date without year, e.g. Sun May 04
194              %Y  year, in four digits, e.g. 1997
195              %D  duration of connection, e.g. 00:03:34
196              %xH the  local  MSN; if an alias can be found, that will be dis‐
197                  played instead
198              %xh the local MSN, only as a number; no aliases will be  substi‐
199                  tuted
200              %xF the  remote  number;  if an alias can be found, that will be
201                  displayed instead
202              %xf the remote number, only as a number; no aliases will be sub‐
203                  stituted
204              %xL the  town  corresponding to the local MSN if known; an empty
205                  string otherwise
206              %xl the town corresponding to the remote  number  if  known;  an
207                  empty string otherwise
208              %T  an  arrow  indicating  the direction of the connection ("->"
209                  outgoing or "<-" incoming); the local  MSN  should  be  dis‐
210                  played on the left side of this.
211              %t  an   arrow  indicating  the  direction  of  the  connection,
212                  reversed ("<-" outgoing or "->"  incoming);  the  local  MSN
213                  should be displayed on the right side of this.
214              %xu the charge units, if known, e.g. 6 EH
215              %U  the cost, if known, e.g. 2,28 DM
216              %xj the name of the used provider
217              %v  the  VBN  (carrier  selection  prefix) of the provider, e.g.
218                  01012
219              %V  the VBN and variant of the provider, e.g. 01012_3
220              %I  amount of INPUT data
221              %O  amount of OUTPUT data
222              %P  INPUT throughput (bps)
223              %p  OUTPUT throughput (bps)
224              %S  Service Indicator
225              %G  displays a HTTP link to the corresponding fax,  when  a  fax
226                  was  received  by mgetty. This fax can be displayed by using
227                  the link in a HTTP browser.
228
229                  This option is only valid when used with -wx, see below  for
230                  more information.
231              %C  displays a HTTP link to the corresponding voice file, when a
232                  call was recorded by vbox.  This option is only  valid  when
233                  used with -wx, see below for more information.
234
235       The default format string for (non-HTML output) is
236              "  %X %D %15.15H %T %-15.15F %7u %U %I %O"
237
238       With  the  following  string  all the important data is displayed while
239       keeping the total length to 80:
240
241              "%X%D %10.10H%T%-14.14F%U%I %O"
242
243       The above string is put into isdn.conf at installation  as  REPFMTSHORT
244       and can be used with -Fshort.
245
246       Without  showing  the  transferred bytes, this string also fits into 80
247       chars:
248
249              "  %X %D %16.16H %T %-25.25F %U"
250
251       It is included as REPFMTNIO.
252
253       -FX  format
254              format strings can be specified in  isdn.conf;  this  option  is
255              used  to select one of these. Entries can be defined in the sec‐
256              tion [ISDNLOG] with names beginning with  "REPFMT".  The  string
257              after  the  -F  option  is  added  to REPFMT to find the correct
258              entry. Case is not sensitive. E.g.:
259
260              REPFMT1        = ... # -> isdnrep -F1
261              REPFMTMYSTRING = ... # -> isdnrep -Fmystring or
262                                        isdnrep -F MYSTRING
263

HTML USE

265       isdnrep can generate a HTML page containing links to files generated by
266       vbox and mgetty (faxes), so that the messages and faxes can be heard or
267       seen from within a browser. However, a couple of things need to be con‐
268       figured first.
269

answering machine messages

271
272       The  %C  can  be  used in the isdnrep output format to make a link to a
273       voice recording file.  For this to work, the following entry is  needed
274       in the [ISDNLOG] section in isdn.conf:
275
276           VBOXPATH= /var/spool/vbox/fred/incoming # incoming directory pathname
277
278       Now  isdnrep  can  find  the file correctly. Clicking on this link will
279       cause the file to be sent. These files are in ZyXEL format; the browser
280       cannot use these directly. The type is given by isdnrep as follows:
281
282           Content-Type: application/x-zyxel4
283
284       The  correct  application (helper) for this has to be configured in the
285       browser. Alternatively, a conversion program can be specified  to  isd‐
286       nrep  which  will convert the ZyXEL format. The pathname of the file to
287       convert is given as a parameter to the program.
288
289       In the [ISDNLOG] section of isdn.conf an  entry  as  follows  specifies
290       which conversion program to use:
291
292           VBOXCMD1 = /usr/bin/program1
293
294       for versions 0.x and 1.x of vbox, and
295
296           VBOXCMD2 = /usr/bin/program2
297
298       for versions 2.x of vbox. Both entries can be given, isdnrep recognizes
299       which version created the recording.
300
301       The program must first output a line with the content-type, followed by
302       the  data itself. To convert the ZyXEL format into a WAV file, the fol‐
303       lowing script may be used:
304              #! /bin/sh
305              ##
306              ## script to play voice messages from vbox-2.0
307              ##
308              ## WARNING! If the paths are not set correctly,
309              ## netscape may simply crash!
310
311              PATH=$PATH:"path to sox":"path to pvftools":"path to vbox"
312              FILENAME1=/tmp/voxplay.$$.voc
313              FILENAME2=/tmp/voxplay.$$.wav
314              VOLUME=8
315
316              vboxtoau <$1             | \
317                        autopvf        | \
318                        pvfamp $VOLUME | \
319                        pvfcut 0.20    | \
320                              pvftovoc > $FILENAME1
321
322              sox $FILENAME1 $FILENAME2
323
324              echo Content-Type: audio/x-wav
325              echo
326              cat $FILENAME2
327
328              rm -f $FILENAME1 $FILENAME2
329
330       The script above needs the packages sox  and  pvftools.   Additionally,
331       the browser needs to be told how to handle "audio/x-wav".  This is done
332       by adding the following lines to the files listed:
333
334           ~/.mime.types
335               type=audio/x-wav    \
336               desc="auWAV Audio"  \
337               exts="wav"
338
339           ~/.mailcap
340               audio/x-wav;/usr/bin/auplay %s
341
342       The NAS (Network Audio System) package may be needed.
343
344       Now, when the browser is started, it will recognize WAV files and start
345       the  corresponding program to handle them. The WAV format has been cho‐
346       sen as it can also be played from a Windows PC.
347
348

faxes received by mgetty

350
351       When %G is used in the isdnrep output format,  any  faxes  received  by
352       mgetty  will  be  accessible via a HTML link, in the same manner as the
353       answering machine messages.
354
355       For the faxes the following entry in the [ISDNLOG] section in isdn.conf
356       is needed:
357
358           MGETTYPATH = /var/spool/fax/incoming
359
360       WARNING:  if  isdnrep  doesn't  have permission to read the files, they
361       will not be displayed; there will be no error message.
362
363       When isdnrep passes these files back to the browser, they have  the  G3
364       format. The following header is used to notify the browser of this:
365
366           Content-Type: application/x-faxg3
367
368       As  the  browser probably doesn't understand this format, the following
369       changes to the files listed are needed:
370
371           ~/.mime.types
372               type=application/x-faxg3  \
373               desc="G3-Fax Format"      \
374               exts="fax,g3"
375
376           ~/.mailcap
377               pplication/x-faxg3;/usr/X11/bin/g3view %s
378
379       The program g3view has to be installed for this to work.
380
381       If now the link is clicked on, the browser will automatically start the
382       external g3view to handle this data.
383
384       If  you  prefer another format (instead of G3) such as JPEG, the format
385       has to be converted. The following entry in the  [ISDNLOG]  section  of
386       isdn.conf takes care of this:
387
388       VBOXCMD = /usr/bin/g3tojpeg # example
389
390       The script g3tojpeg can be something like this:
391
392              #! /bin/sh
393              ##
394              ## command to display faxes in a browser
395              ##
396              ## WARNING! If the paths are not set correctly,
397              ## netscape may simply crash!
398
399              export PATH=$PATH:"path to g3topbm":"path to convert"
400
401              echo Content-Type: image/jpeg
402              echo
403
404              g3topbm < $1 | convert pbm:- jpeg:-
405
406       The  packages  ImageMagick  and  mgetty  are needed. Mgetty is probably
407       already installed if you want to use this feature :-)
408
409       The advantage of the JPEG format is that it can also be displayed by  a
410       browser running on a Windows PC.
411

summary

413
414       A suitable value for REPFMTWWW is
415
416           REPFMTWWW = "%X %D %17.17H %T %-17.17F %-20.20l SI: %S %9u %U %I %O %G %C"
417
418       Netscape  3.0  Gold and Arena have been tested, and both work fine with
419       isdnrep's HTML output, although Arena's display is not as colourful  as
420       Netscape's.
421
422       A  known problem (which is impossible to solve completely) is determin‐
423       ing the relationship between an isdn  connection  and  a  fax  or  vbox
424       recording.   Unfortunately  the times for isdnrep, mgetty and vbox dif‐
425       fer. Isdnrep tries to make the best guess,  but  it's  always  possible
426       that e.g. a fax is connected to the wrong isdn connection.
427

EXAMPLE OUTPUT

429       With the default configuration the following output can be generated on
430       stdout (whitespace slightly edited for clarity):
431
432              $ isdnrep -v -t 6/1/96
433              I S D N  Connection Report  -  Tue Aug 26 22:21:19 1997
434
435
436              Sat Jan  6 1996
437                00:54:19                 UNKNOWN -> UNKNOWN     No user responding      (4)
438              [...]
439                16:33:24  0:03:23        UNKNOWN -> UNKNOWN        7 EH      0,84 DM
440                17:33:47                 UNKNOWN -> UNKNOWN     Unallocated (unassigned)(5)
441                                                                number
442                20:02:28  0:02:37     Phone/HDLC <- UNKNOWN                             (1)
443                20:09:53  0:07:01     Modem/X.75 -> T-Online       3 EH      0,36 DM    (2)
444                21:27:56                 UNKNOWN -> UNKNOWN     User busy               (3)
445                22:09:41  0:29:36        UNKNOWN -> UNKNOWN       43 EH      9,89 DM*
446              ======================================================================
447                1 IN= 0:02:37,  13 OUT= 3:40:14,   3 failed      210 EH     25,20 DM
448              (6)^^^^^^^^^^^^  (7)^^^^^^^^^^^^^  (8)^^^^^^^   (9)^^^^^^ (10)^^^^^^^^
449
450
451              DIALOUT Summary for Sat Jan  6 1996                                      (11)
452              -----------------------------------------------------------
453              T-Online         1 call(s)  0:07:01     3 EH    0,36 DM
454              UNKNOWN         11 call(s)  0:17:00    20 EH    2,40 DM
455
456
457              DIALIN Summary for Sat Jan  6 1996                                       (12)
458              -----------------------------------------------------------
459              UNKNOWN          1 call(s)  0:02:37
460
461
462              Zone 1 : City              2 call(s)  2:23:13     50 EH    6,00 DM       (13)
463              Zone x : UNKNOWN          11 call(s)  0:17:00     20 EH    2,40 DM
464
465
466       Notes
467         (1) "xxx <- xxx" was an incoming call, so doesn't cost anything
468         (2) "xxx -> xxx" was an outgoing call lasting  203  seconds,  so  for
469             City zone, off-peak time (Saturday), 3 charge units = DM 0,36
470         (3) there was no connection, as the called party was busy
471         (4) there  was  no connection, as the called party didn't pick up the
472             phone
473         (5) "the number you have dialed is not connected. Hang  up  and  dial
474             again. ..."
475         (6) total time for incoming calls
476         (7) total time for outgoing calls
477         (8) 3 calls failed; busy (3), no answer (4) and error in dialing (5)
478         (9) total charge units incurred for one day
479        (10) total costs incurred for one day
480        (11) outgoing calls grouped per number
481        (12) incoming calls grouped per number
482        (13) outgoing and incoming calls grouped per tariff zone
483
484       If  the  charge  units are marked with "*", the PTT switch did not give
485       charge info; these are the number of units guestimated by isdnrep.
486
487

TIME FORMAT

489       For the -d and -t options, the time is specified in the following  for‐
490       mats:
491
492       [DD/][M]M/[[YY]YY]
493              specifies the month or day.
494
495              Examples:
496
497              7/        July of the current year
498              8/1996    August 1996
499              29/6/05   June 29th 2005
500              6/6/      error,  is not June 6th of the current year; it's June
501                        1906
502
503       [D]D   day of current month
504
505       [D]D.[M]M.[[[CC]Y]Y]
506              specifies a day.  If century or year and  century  are  missing,
507              they will be taken from the current date.
508
509              Examples:
510
511              23.5.     May 23rd in the current year
512              19.01.38  January 19th 2038
513              16.10.1998
514                        October 16th 1998
515
516       [MM]DD[hhmm[[CC]YY][.ss]]
517              specifies an exact time. Unspecified parts are defined as 0 when
518              interpreted as a begin time, and 23 or 59 when interpreted as an
519              end time.
520
521              If a year is to be specified, the hours and minutes must also be
522              specified.
523
524              The format is copied from the date command.
525
526              Examples:
527
528              0107   January 1st in the current year
529              0107173196.25
530                     January 7th 1996 17:31:25
531              010717311996
532                     January 7th 1996 17:31:00 (or 17:31:59)
533              12141995
534                     error: not December 12th 1995, but December 12th  of  the
535                     current year at 19:95, so it's garbage.
536
537              Examples of time spans and their meaning:
538                     6/95-081214381996.25
539                            all  entries  between  June  1st 1995 00:00:00 and
540                            August 12th 14:38:25
541                     0912030495.20-12/95
542                            all entries between September 12th  1995  03:04:20
543                            and December 31st 1995 23:59:59
544                     09.06.2006-9/7/6
545                            all  entries  between  June  6th 2006 00:00:00 and
546                            July 7th 2006 00:00:00
547                     7/95   all entries between July  1st  1995  00:00:00  and
548                            July 31st 1995 23:59:59
549                     0908   all  entries  between September 8th in the current
550                            year 00:00:00 and September  8th  in  the  current
551                            year 23:59:59
552                     3      third day of the current month
553
554       [CC]YY-MM-DDThh:mm:ss
555              specifies  a year, a moment, or something between.  Each separa‐
556              tor ´-', 'T', and ':' can be omitted or not.  If the  first  '-'
557              is missing, the century must be given.
558
559              This notation cannot be combined with the above notations.  Time
560              spans are noted with '--' instead of '-'.  If no '--' is  given,
561              ´i' must be noted after the -t option.
562
563              Examples:
564
565              i2002  the  entire year 2002 from January 1st 00:00:00 to Decem‐
566                     ber 31st 23:59:59
567              i200306
568                     the entire month June 2003
569              200308--200309
570                     August and September 2003
571              2003-10-03T17--
572                     all entries after October 3rd 2003 16:59:59
573              2003-08-27T11:51:25--20030827115128
574                     4 seconds at August 27th 2003
575              200306 error: neither 'i' nor '--' given
576              2003-1-4
577                     error: leading zeros (at month and day) must not omitted
578
579       "y"    yesterday,
580       "yy"   the day before yesterday,
581       "yyy"  three days ago and so on.  For time spans these can also be used
582              in conjunction with the notations explained above.
583

FILES

585       /var/log/isdn.log or /var/lib/isdn/calls
586              isdnlog log file with information about all calls.
587
588       /etc/isdn/isdn.conf
589              general configuration
590
591       /etc/isdn/callerid.conf
592              aliases for telephone numbers
593

SEE ALSO

595       isdnlog(5) isdnlog(8) isdn.conf(5)
596

AUTHOR

598       This  manual  page  was  adapted  from  isdnlog/README by Paul Slootman
599       <paul@isdn4linux.de>, for Debian GNU/Linux and isdn4linux.
600
601
602
603ISDN 4 Linux 3.27                 2007/01/05                        isdnrep(1)
Impressum