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

HTML USE

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

answering machine messages

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

faxes received by mgetty

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

summary

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

EXAMPLE OUTPUT

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

TIME FORMAT

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

FILES

590       /var/log/isdn.log or /var/lib/isdn/calls
591              isdnlog log file with information about all calls.
592
593       /etc/isdn/isdn.conf
594              general configuration
595
596       /etc/isdn/callerid.conf
597              aliases for telephone numbers
598

SEE ALSO

600       isdnlog(5) isdnlog(8) isdn.conf(5)
601

AUTHOR

603       This manual page was  adapted  from  isdnlog/README  by  Paul  Slootman
604       <paul@isdn4linux.de>, for Debian GNU/Linux and isdn4linux.
605
606
607
608ISDN 4 Linux 3.9                  2005/01/22                        isdnrep(1)
Impressum