new manual pages

This commit is contained in:
Paul Slootman 1998-06-18 14:30:28 +00:00
parent ee69d7c39a
commit e5caed61df
5 changed files with 1519 additions and 89 deletions

View File

@ -0,0 +1,248 @@
.\" $Id$
.\" CHECKIN $Date$
.TH callerid.conf 5 "@MANDATE@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
.PD 0
.SH NAME
/etc/isdn/callerid.conf \- config file for isdn tools
.SH FORMAT
This file has the format described in isdnformat(5). It must be owned by
root, and only root may have write access. Every user can create his
private telephone book as ~/.isdn with the same file format.
.SH VARIABLES SECTION
Like in isdn.conf, this file has an optional [VARIABLES] section. All
variable names must be uppercase. Warning: variables in callerid.conf
will override variables in isdn.conf, and variables in ~/.isdn will
override variables in both files. First all variables are read, then they
are substituted, so a variable defined in ~/.isdn can be used in isdn.conf.
This might be a security hole. However, if programs are to be run as root,
these files (and the program) cannot be writeable for non-root users.
Using variables: if a reference to a non existing variable is used,
isdnrep and isdnlog will give warning messages, and use the variable
name (e.g if $FRED isn't set, isdnlog will use "$FRED"). The dollar sign
can be backslashed if a real dollar sign is needed instead of variable
substitution (e.g. \\$PATH will be "$PATH").
.SH NUMBER and MSN
In [NUMBER] sections, you can supply information for the outer world,
in [MSN] sections; you can supply information about your msns. The
format is the same:
.TP 4
.B NUMBER=xxxx
Set the telephone number. This should be your msn or the telephone
number with area code (with or without areprefix, countrycode and
countryprefix)
.TP
.B SI=x
Service indicator. Isdnlog knows these service indicators:
.nf
1 speech (telephone, fax g3, modem etc.)
2 restricted digital information
3 unrestricted digital information with tones/announcements
4 video
7 unrestricted digital information (hdlc, x.75 etc.)
.fi
.TP
.B Alias=xxxx
Supply a name as alias (e.g. ALIAS=Fred's Number)
.TP
.B ZONE=xxx
Only useful with remote numbers: billing zone for connections to this
number:
.nf
0 internal connection in your s0 bus (no charge)
1 city area
2 region 50
3 region 200
4 far region
5 the same as 1
.fi
.TP
.B INTERFACE=xxx
Isdn network interface. This information is required with the
"-hx" / hangup="value" option.
.TP
.B START
You can define a subsection here. The whole section is ignored unless you
gave the "-S" / start=yes option. Each subsection should have the name
[FLAGS]. It may hold these values:
.RS
.TP 4
.B FLAGS=x|y|z
Combine these flags (with or without the pipe "|" char; with is preferred)
to get the combination you want:
.RS
Part 1: Incoming and Outgoing
.TP 4
I
Incoming call
.TP
O
Outgoing call
.RE
.RS
Part 2: Signals from isdn system
.TP 4
C
Connect (can be used with interval, see below)
.TP
B
Busy
.TP
E
Error
.TP
R
Ring (can be used with interval, see below)
.TP
A
AOCD (advice of charge signal)
.TP
H
Hangup
.RE
.RS
Part 3: Modifiers
.PD 0
.TP 4
L
Start the program again and again every time it terminates.
.TP
U
Start the program only once within a interval. Without this, several
instances of a program can run in parallel. (Interval required.)
.TP
K
Kill program at the end of the interval.
.RE
.TP
.B USER=xxx
Isdnlog will not run programs as root, and will switch to a different
user id for security. You must give the name or uid of the user isdnlog
has to use here.
.TP
.B GROUP=xxx
Isdnlog will not run programs as group root, and will switch to a
different group id for security. You must give the name or gid of the
groups isdnlog has to use here.
.TP
.B TIME=xx
Restrict this flag to a special time. Pleas read isdntime(5).
.TP
.B INTERVAL=xx
With connect (C) or ring (R) flag you can specify an interval, so
isdnlog will start the program after every interval. The interval is in
seconds and should be at least 2 seconds. If the flags do not include C
or R, this option is ignored.
.TP
.B PROGRAM=xxx
.RS
The program you want to start, with the required arguments. You may use the
following special tokens:
.PD 0
.TP
\\$1
flags that caused execution, e.g. "IR", "OC". There are always
.B exactly
two characters.
.TP
\\$2
Caller number (complete with area code).
.TP
\\$3
Called number (complete with area code).
.TP
\\$4
Time the connection started. Example:
.br
"Wed May 28 23:07:44 1997".
.br
Contains "?" if there is no connection yet (e.g. still at RING phase).
.TP
\\$5
Duration of connection up to now (in seconds).
.TP
\\$6
Time the connection ended. Same format as \\$4.
.TP
\\$7
Number of input bytes.
.TP
\\$8
Number of output bytes.
.TP
\\$9
Input bytes per second.
.TP
\\$10
Output bytes per second.
.TP
\\$11
Service indicator.
.TP
\\$12
Charges.
.TP
\\$13
Caller country code.
.TP
\\$14
Called country code.
.TP
\\$15
Caller area code.
.TP
\\$16
Called area code.
.TP
\\$17
Caller town (derived from area code).
.TP
\\$18
Called town
.TP
\\$19
Caller alias.
.TP
\\$20
Called alias.
.RE
.RS
Note: within a string you must use \\${1} \\${2} ...
.RE
.SH FILES
.TP
.B /etc/isdn/callerid.conf
This file.
.TP
.B ~/.isdn
Per user telephone book.
.SH SEE ALSO
.B isdnlog(1) isdnformat(5) callerid.conf(5) isdntime(5)
.SH AUTHOR
This manual page was written by Andreas Jellinghaus <aj@debian.org>,
for Debian GNU/Linux and isdn4linux.

74
isdnlog/isdnlog/isdnlog.5 Normal file
View File

@ -0,0 +1,74 @@
.TH isdnlog 5 "@MANDATE@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
.SH NAME
/var/lib/isdn/calls \- isdn log file
.SH DESCRIPTION
The main purpose of isdnlog is to create a log file with information
about all incoming and outgoing calls, namely: this file.
The file has 17 fields, separated by pipe characters "|" with fixed
length. The fields are:
.PD 0
.TP 4
1
Time of connect
.TP
2
Caller's number
.TP
3
Called number
.TP
4
Duration of connection in seconds
.TP
5
Duration of connection in 1/100 seconds
.TP
6
Time of connect (as usual in seconds since 1970)
.TP
7
Number of charge signals received (-1 if you don't get charge signals)
.TP
8
I = Incoming or O = Outgoing
.TP
9
Cause Code if connection was not established
.TP
10
Number of bytes transferred (incoming)
.TP
11
Number of bytes transferred (outgoing)
.TP
12
Version number of isdnlog
.TP
13
Isdn Service Code
.TP
14
1 = called by isdn user, 0 = called by analog user
.TP
15
Costs per charge unit (e.g. 0.12 in Germany)
.TP
16
Currency of charge unit (e.g. DM in Germany)
.TP
17
Total cost of connection
.SH FILES
.TP
.B /var/lib/isdn/calls
This file: isdnlog log file.
.SH SEE ALSO
.B isdnlog(8)
.SH AUTHOR
This manual page was written by Andreas Jellinghaus <aj@debian.org>,
for Debian GNU/Linux and isdn4linux.

View File

@ -1,75 +1,390 @@
.TH ISDNLOG 8 "ISDN Utilities" "AKsoftware" \" -*- nroff -*-
.\" $Id$
.\" CHECKIN $Date$
.TH isdnlog 8 "@MANDATE@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
.PD 0
.SH NAME
isdnlog \- Auswertung des ISDN D-Kanal Protokolls
.SH SYNOPSIS
.B isdnlog
[\-asrSVTDPMnNbF2] [\-v verbose-level] [\-p Port] [\-x X-Meldungen]
[\-m stderr-Meldungen] [\-l syslog-Meldungen] [\-t Clock stellen]
[\-c X-Buffer-Size] [\-C Device] [\-w Poll-Rate] [\-h Chargeint-Offset]
[\-W Columns] [\-H Einheiten] [\-f Conffile] [\-L X-Buffer-Size]
[\-A Amtsholung]
/dev/isdnctrlX | -
.SH DESCRIPTION
.BR isdnlog
ermoeglicht in Zusammenhang mit isdn4linux eine vollstaendige
Dekodierung des D-Kanal-Protokolls eines ISDN-Anschlusses.
isdnlog \- isdn log system (and more)
Neben einem Protokoll aller Verbindungen kann
.B isdnlog
bei beliebigen Events (Verbindung entstanden, Verbindung beendet usw.)
Aktionen starten.
.SH "RESTRICTION"
Isdnlog only works with the HiSax isdn driver. Other cards with their
own driver are not supported. Additionally you need to enable d-channel logging
(you can use "hisaxctrl <DriverId> 1 4" to do that, e.g. "hisaxctrl
line0 1 4"). Isdnlog can only log outgoing calls that
originate from
your isdn card, and incoming calls. To get information about outgoing
calls from other isdn devices (e.g. telephones), you need a second Teles
isdn card, with crossed lines. Such a card is not usable for communicating,
but can log
outgoing calls from any device (see dual option below).
.SH "DESCRIPTION"
Isdnlog gets information from your isdn card, decodes this
information, and can do anything with it, such as logging, starting
programs, and more. All options to isdnlog can be given as command line
flags, or you can specify a file with options (recommended).
.SH "GENERAL OPTIONS"
Fuer weitere Informationen siehe README
.SS OPTIONS
.TP
.I "\-V"
.B isdnlog
Print version information on standard output then exit successfully.
.SS MELDUNGEN
Bei den Optionen
.I "\-m",
.I "\-l"
oder
.I "\-x"
kann jeweils eine beliebige Kombination aus folgenden Meldungstypen
angegeben werden:
.B \-V
show version information and exit.
.TP
.B \-fFILE
read options from the config file FILE. The first line should be
"[options]". You may use blank lines and comments (starting with a #).
All config files for isdnlog have the format described in isdn.conf(5).
Debug options must be given on the command line, they cannot be stored in a
file.
.TP
.B /dev/DEVICE
isdnlog will read from this device and from /dev/isdninfo. You should
give /dev/isdnctrl0 for the first isdn card (or /dev/isdnctrl2 for the
second).
Isdnlog has a replay mode for debugging, where you can simulate previous
recorded events. In that case use "-" instead of a device.
.TP
.B \-r
Replay a debug file (e.g. /tmp/isdnctrl0) to find bugs. With this flag
you should give a filename with the debug information instead of a device.
It will also work with files not created by isdnlog (e.g.
"cat /dev/isdnctrl0").
.TP
.B \-n newline={yes|no}
Display throughput messages on the same line (only useful with logging to
stderr or a console device).
.TP
.B \-Wx width="value"
Limit all messages to X characters per line.
.TP
.B \-Ax amt="value"
Set digits necessary to get an outside line, when connected through a PABX.
You can
give several codes padded with a ":" (e.g. -A0:80:81:82).
.TP
.B \-2x dual="value"
Enable dual mode. You need this if you have a second isdn card attached with
crossed lines so it can listen to what other isdn devices like telephones
are doing. With x=2 you can increase the debug output - every single
digit will be displayed.
.SH "DEBUG MODULE"
.TP
.B \-vX log=X
Isdnlog can copy all information to /tmp/DEVICE (e.g. /tmp/isdnctrl0 if
you started isdnlog with /dev/isdnctrl0). Choose what debugging you want
from the following list, add the corresponding numbers together and use
that for X:
.RS
.TP
1
copy all "HEX:" lines from the hisax isdn device driver.
.TP
2
copy /dev/isdnctrl output (or whatever device you specified).
.TP
4
copy /dev/isdninfo output
.TP
8
copy transfer values ("ibyte","obyte").
.in -7
Isdnlog will close and reopen this file after a "kill -HUP".
.RE
.sp
.RS +.2i
.ta 1.0i
.TP
.B \-s flush={yes|no}
Isdnlog will flush the debug file /tmp/DEVICE (e.g. /tmp/isdnctrl0) after
each write access.
.TP
.B \-P pipe={yes|no}
Copy the debug information to stdout. This way you can run isdnlog as the
source of a pipe like "isdnlog -P /dev/isdnctrl0 |prog ... ".
.TP
.B \-D daemon={yes|no}
Start isdnlog as daemon: it will fork into the background, and use syslog
as the default logging method (if you did not specify -m).
.TP
.B \-T
Trace mode: isdnlog will wait for a key after processing a line from
/dev/isdnctrl0 (or whatever device you specified).
.TP
.B \-b
If you are using a bilingual network terminator (NT), you must give this
flag, or isdnlog will show the own MSN's incorrectly.
.SH "NUMBER REWRITE MODULE"
You can define aliases for telephone numbers (see callerid.conf(5) and
isdn.conf(5) for more information). Isdnlog will compare all numbers to
the list of aliases, and when a match is found, the alias is displayed
instead of the number.
.SH "LOG MODULE"
Isdnlog can log information via syslog, to stdout, and send information
to x11 clients. Calculate a code from these numbers by adding them, and
activate logging with -s, -m or -x. You can use normal numbers or hex
numbers. Default is stderr mode -m, unless daemon mode is enabled; then it's
syslog mode -l.
.TP
0x1
Errors
.TP
0x2
Warnings
.TP
0x4
Notice
.TP
0x8
Log messages to /tmp/DEVICE (e.g. /tmp/isdnctrl0 if isdnlog is started
with /dev/isdnctrl0)
.TP
0x10
Show telephone numbers immediately.
.TP
0x20
Show charge int and telephone costs with every charge signal
(in Germany, and perhaps other countries, you have to pay to get these signals).
.TP
0x40
Show connect messages.
.TP
0x80
Show hang up messages.
.TP
0x100
Show cause message on hang up.
.TP
0x200
Show time messages.
.TP
0x400
Show throughput in bytes (every -wX seconds).
.TP
0x800
Show state of B-channels.
.TP
0x1000
Show service indicator.
.br
You should log at least 0x7 (errors, warnings, notice) messages.
.TP
0x2000
Log estimated time till next charge signal.
.TP
.B \-mX stdout="value"
Log to stderr.
.TP
.B \-OX outfile="path"
Log to file X instead of stderr. Isdnlog will close this device when it
gets a signal -SIGHUP (-1). Only valid with -m option.
.br
If the name starts with a "+", new data will be appended to the existing file.
Default behaviour is to truncate the file when isdnlog opens it.
.TP
.B \-C X console="path"
Log to console X instead of stderr. You can use -O and -C together,
so that isdnlog copies output to both. Specify a full pathname.
Beware: you
.ul
must
put a space between -C and X !
.TP
.B \-M monitor={yes|no}
With this flag, isdnlog will generate output for monitor programs like
imon, imontty or isdnmon. You must also give -m with 0x800 enabled.
.TP
.B \-lX syslog="value"
Log to syslog. X is the log code. You can log to syslog and to stdout at
the same time.
.TP
.B \-xX xisdn="value"
Pass information to x11 client. X is the log code. You can pass
information to x11 clients and log to syslog and/or stdout at the same
time.
.TP
.B \-cX calls="value"
Only with -xX : save the last X calls and pass this information to an
x11 client. Default value is 100.
.TP
.B \-LX xlog="value"
Only with -xX : save the last X messages and pass this information to an
x11 client. Default value is 500.
.TP
.B \-wX thruput="value"
If you enabled throughput logging (0x400), isdnlog will log the throughput
every X seconds.
.SH "TIME MODULE"
.TP
.B \-tX time={0|1|2}
Isdnlog will set your local system time to the time transmitted by your
isdn service provider: -t1 = once, -t2 = every time.
.SH "CHARGEHUP MODULE"
.TP
.B \-hX hangup="value"
The isdn kernel system has a chargehup system, so it will hang up a few
seconds before the next charge signal. If you don't get a charge
signal from your phone company, isdnlog can emulate it.
On every outgoing connection, isdnlog will calculate the charge
time from day of week, time of day and the distance zone of the
connection. So you need to list the system in isdn.conf with a ZONE=
line.
The kernel needs to know how long the charge time is, and how many
seconds before the next charge signal it should hang up. You have to set
the second parameter with X in the form number:number (hang up seconds
before next charge signal for charge times greater than or equal to 20
seconds : for charge times of less than 20 seconds).
With this information, isdnlog will call "isdnctrl chargeint <device>
<charge time>" and "isdnctrl huptimeout <device> <seconds before charge
signal>" (it actually communicates directly with isdn, without calling
isdnctrl, but this would have the same effect).
You should run isdnlog with -t1 or better with -t2, so isdnlog sets the
local time in sync with telephone switching office.
.TP
.B \-F cityweekend=y
Deutsche Telekom offer an option where on weekends and national holidays,
you are charged one unit every four minutes, instead of the normal rate
of one unit every 2.5 minutes from 5:00 - 21:00. Isdnlog must be informed
of this option when the chargehup option is used, or it will hangup at
completely the wrong time. As the charge info delivered is
.B not
modified, only the final bill you get is lower, isdnlog also needs to
override the charge info if it is delivered.
.SH "START MODULE"
isdnlog can react on any event and start programs. This feature is
disabled unless you activate it with:
.TP
.B \-S start={yes|no}
active "START" feature. Please read isdnlog.options(5) for more
information.
.SH "CONNECTION LOG MODULE"
isdnlog will log all connections in /var/log/isdn.log. isdnrep can parse
this file and calculate costs.
.SH "SEVERAL ISDN CARDS"
If you have more than one isdn card, you need to run one isdnlog for
each card. And every process must have a different name, so you should
create a symbolic link isdnlog1 -> isdnlog, and start isdnlog1 for the
second card.
.SH "UNLOADING KERNEL MODULES"
You cannot unload isdn kernel modules while an isdn device is in use,
e.g. a PPP interface is defined or isdnlog is running. Look at
/var/run for a file isdnlog.DEVICE.pid with the process id of isdnlog,
and kill that. After that you should be able to unload your isdn kernel modules.
.SH "FILES"
.TP
.B /dev/DEVICE
isdnlog requires a device as a parameter to read from (e.g.
/dev/isdnctrl0 for the 1st isdn card).
.TP
.B /tmp/DEVICE
isdnlog can copy everything it reads to this file as debug information
(e.g. /tmp/isdnctrl0 if you started isdnlog with /dev/isdnctrl0).
.TP
.B /var/run/isdnlog.DEVICE.pid
isdnlog creates this file with its process id. Useful to see if
isdnlog is running.
.TP
.B /var/lock/LCK..DEVICE
isdnlog creates a lock file for the device, so no other processes will
access that device.
.TP
.B /etc/isdn/isdn.conf
isdnlog config file. Options to isdnlog can be given on the command line, can
be stored in this file in [options] (with command line option
-f/etc/isdn/isdn.conf), or in a different config file, but isdnlog will
look at this file for sections [global] [variables] [isdnlog].
.SH EXAMPLE
I start isdnlog with "isdnlog -f/etc/isdn/isdn.conf /dev/isdnctrl0".
This file contains a [options] section:
.nf
1 PRT_ERR
2 PRT_WARN
4 PRT_INFO
4 PRT_PROG_OUT
4 PRT_NORMAL
8 PRT_LOG
0x10 PRT_SHOWNUMBERS
0x20 PRT_SHOWAOCD
0x40 PRT_SHOWCONNECT
0x80 PRT_SHOWHANGUP
0x100 PRT_SHOWCAUSE
0x200 PRT_SHOWTIME
0x400 PRT_SHOWBYTE
0x800 PRT_SHOWIMON
0x1000 PRT_SHOWBEARER
0x2000 PRT_SHOWTICKS
0x4000 PRT_DEBUG_GENERAL
0x8000 PRT_DEBUG_DIAG
0x10000 PRT_DEBUG_INFO
0x20000 PRT_DEBUG_EXEC
0x40000 PRT_DEBUG_BUGS
0x80000 PRT_DEBUG_DECODE
0x100000 PRT_DEBUG_RING
0x200000 PRT_DEBUG_CS
0x400000 PRT_DEBUG_PROT
0x800000 PRT_NOTHING
.fi
.RE
.sp
.SH FILES
.BR isdnlog
benoetigt zwingend die Konfigurationsdatei
.BR /etc/isdnlog/isdn.conf
.SH BUGS
Z.Zt. keine bekannt ;-)
[options]
#newline=no # show all throughput messages in one line.
#width=80 # limit log messages to 80 characters per line
#amt=0:80:81 # digits to get a line through your PABX
log=15 # maximum debug mode
flush=no # flush logfile after every write
pipe=no # pipe log messages to stderr
daemon=yes # run isdnlog as daemon
stdout=0x1ff7 # stderr logging level
outfile=+/var/log/isdn/log # log to file
#console= # log to a console
monitor=yes # emulate output for imon/imontty/...
syslog=0x1ff7 # syslog logging level
#xisdn=0x07ff # x11 output level
#calls= # store call information for x11 client
#xlog= # store messages for x11 client
thruput=60 # if throughput logging is enabled: log every X seconds
time=2 # set time: 0 = never; 1 = once; 2 = every time
#hangup= # simulate charge signals
start=yes # enable starting programs
.SH SEE ALSO
.B isdnconf(5) isdnlog.options(5) isdn.conf(5) callerid.conf(5)
.B isdn.log(5) isdnrep(8)
.SH AUTHOR
This manual page was written by Andreas Jellinghaus <aj@debian.org>,
for Debian GNU/Linux and isdn4linux.

View File

@ -0,0 +1,131 @@
.\" $Id$
.\" CHECKIN $Date$
.TH isdnlog.users 5 "@MANDATE@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
.PD 0
.SH NAME
/etc/isdn/isdnlog.users \- user base isdnlog config file
.SH DESCRIPTION
This file is only needed if isdnlog is started with the "-xX" / "xisdn="
option. If this file does not exist, isdnlog will create a default file
and print a warning. This file contains information about which users
are permitted to use isdnlog clients, and what their privileges are.
This file is checked every time a connection to isdnlog is made; thus,
it is possible to edit this file and have the changes effective immediately
without having to stop and start isdnlog.
For now there are no real usable clients for isdnlog, so this file
isn't very useful at the moment.
.SH FORMAT
Warning: the format of this file may change in the future.
Blank lines are ignored. If a line has a "#", this char and the rest of
the line is ignored as comment. If the last char of a line is a "\" the
line and the next line are considered one line. These characters are
considered special:
"$@#,;\", to use one of these, you must prepend a "\" to escape it.
The file consists of lines; each line begins with the name of a user.
After the user's name the privileges given to this user are specified
(on the same line). The following privileges are possible, separated
by semicolons ";" :
.RS 0
.TP 4
.B ALL
All of the privileges below are given. Should only be given to root.
.TP
.B MSN=msn[,msn...]
Only information about events concerning the specified msns is given.
This includes incoming and outgoing calls, and protocol information.
Any number of msns may be given. Wildcards (such as used in isdn.conf)
are permitted. With "MSN=*" all msns are allowed.
.br
Unknown numbers (e.g. from outgoing calls from other isdn devices or
incoming calls from analog connections) cannot be specified with MSN=.
The only way to allow these calls to be seen is by giving "MSN=*".
.TP
.B PROTOCOL
The information specified to isdnlog by the -xX flag (see isdnlog(8))
is allowed.
.TP
\fBI4LCONF\fR (planned)
This gives permission to change isdn4linux properties. This should
only be allowed to root.
.TP
\fBADDRESSBOOK\fR (planned)
This makes it possible to retrieve / store information about a
caller or called number.
.RE
.B Users
.br
At the beginning of the file it is possible to specify users with hostnames:
.in +4
.nf
fred@vom.jupiter MSN=4711?
root@host1.at.home ALL
.fi
.in -4
Here the user "fred" can only connect to isdnlog from the host "vom.jupiter".
Similarly, the user "root" is only allowed when on host "host1.at.home".
.B Groups
.br
After the lines with hostnames, it is possible to define groups of
users and hostnames. A group looks like a section as described in
isdn.conf(5). It begins with a line such as:
.in +4
[My_Group]
.in -4
and ends with the beginning of the next group or the end of the file.
Group names are not case sensitive. In fact, group names are not
actually used (except for \fB[world]\fR, see below).
In a group, lines consist of a username \fIor\fR a hostname. Lines
with a username must also contain those privileges that the user has.
No privileges can be listed with a hostname.
.in +4
.nf
heinz MSN=*;PROTOCOL
@host1
@host2
otto MSN=47111,47112
@host3
.fi
.in -4
The above example allows the users heinz and otto to connect from any
of the hosts host1, host2 and host3. The user heinz can see information
about all msns, user otto can only see information about msns 47111 and
47112.
If anyone is allowed to do anything, then it is enough to put only
the following line into the file "isdnlog.users":
.in +4
[world]
.in -4
.SH FILES
.TP
.B /etc/isdn/isdnlog.users
This file.
.SH SEE ALSO
.B isdnlog(1)
.SH AUTHOR
This manual page was written by Andreas Jellinghaus <aj@debian.org>,
for Debian GNU/Linux and isdn4linux.

View File

@ -1,25 +1,687 @@
.TH ISDNREP 1 "ISDN Utilities" "AKsoftware" \" -*- nroff -*-
.\" $Id$
.\" CHECKIN $Date$
.TH isdnrep 8 "@MANDATE@" "ISDN 4 Linux @I4LVERSION@" "Linux System Administration"
.PD 0
.SH NAME
isdnrep \- Gebuehrenabrechnung
.SH SYNOPSIS
.B isdnrep
[\-anvioN] [\-c Zone] [\-t Zeitabschnitt] [\-f logfile] [\-d Zeit] [\-p MSN]
isdnrep \- report isdn activity
.SH DESCRIPTION
.BR isdnrep
wertet die von isdnlog(8) gesammelten Informationen aus, und erstellt
ueber einen frei waehlbaren Zeitraum eine Gebuehrenabrechnung.
Isdnrep reads the isdnlog log files, generates reports, does statistics,
and other things. It can also generate HTML output for use with a web
server.
Fuer weitere Informationen siehe README
.SS OPTIONS
.SH OPTIONS
.TP
.I "\-V"
.B isdnrep
Print version information on standard output then exit successfully.
.SH FILES
.BR isdnrep
wertet ohne die Option "-f" die Datei
.BR "/var/log/isdn.log"
aus.
.SH BUGS
Z.Zt. keine bekannt ;-)
.B \-V
show version information and exit.
.TP
.B \-a all
Show all connections registered. If this option is
not given, show only the connections made today.
.TP
.B \-h no header
There will be no header for each day, nor will the summary at the end
of each day and at the end of the report be generated. This is useful
if the output is to be processed by another program.
.br
This option doesn't work if the
.B \-wX
is also given.
.TP
.B \-n numbers
Display numbers instead of the aliases for those numbers.
.TP
.B -c zone compute="zone"
This option can be used to define which default zone unknown called
numbers ("calling ?") are in, if no AOC-E (advice of charge at end of call)
messages are received. This way isdnrep "guesses" what the cost of the
call was.
Values for "zone" may be:
.RS
.TP 4
0
don't calculate anything, assign zero cost to these unknown calls
.TP
1
assume "city zone"
.TP
2
assume "regio-50 zone"
.TP
3
assume "regio-200 zone"
.TP
4
assume long distance
.RE
.TP
.B \-fFILE
The file from which to generate the report. This is usually
/var/log/isdn.log, or whatever is configured in /etc/isdn/isdn.conf as
.B LOGFILE = .
The -f option will override the setting in /etc/isdn/isdn.conf.
.TP
.B \-t time span time="time span"
With this option a specific time span covered by the log file can be
displayed, e.g. all calls in November 1995, or on January 3rd 1996
between 03:00 and 09:45.
The format in which times are given is described below.
The time span has the following syntax:
.RS
.TP 10
time-time
display from begin time up to end time
.TP
time-
display from given time up to "now"
.TP
-time
display from beginning of log file up to given time
.TP
time
display the given month, day, hour, ...
.RE
.TP
.B \-d -time delete="time"
Delete entries from the log file up to (but not including) the specified
time. The format is the same as for the -t option.
The minus before the time
.B must
be given! It is not possible to define begin and end times; entries are
always deleted from the beginning up to the time given.
.B Warning!
Entries are
.B really
deleted from the file. Careless use can result in all entries being
deleted, e.g. with "isdnrep -d -".
.TP
.B \-v verbose
Display all connections and connection attempts. Without this option,
only successful connections are displayed.
.TP
.B \-p [n][m]'number'[,[m]'number'...] phonenumber
Display only selected phone numbers.
"number" is specified in the same format as in configuration files
(see isdn.conf(5)). E.g. wildcards can be used.
If the flag 'm' is given, the corresponding MSN is meant.
E.g.: "m2" means MSN#2. If "m0" is given, all numbers are to be displayed.
If the flag 'n' is given, the given number is
.B not
to be displayed.
.TP
.B \-i incoming
Only incoming connections are displayed.
.TP
.B \-o outgoing
Only outgoing connections are displayed.
.TP
.B \-u unknown caller
At the end of the report, all numbers not aliased in callerid.conf or
~/.isdn are displayed. This option is not available when HTML output
is requested.
.TP
.B \-wX WWW
isdnrep can give its output in HTML format; this is switched on with
this option. Two modes are possible:
.RS
.TP
0
The HTML header is suppressed. Useful if the output is to be included
into an existing page.
.TP
1
A complete HTML page is generated.
.RE
.TP
.B \-sX format string
The output generated by isdnrep can be modified by specifying the format
of the line generated for each connection. The syntax is similar to that
used by printf. The following parameters are possible (the \fBx\fR where
given means that a width for the field, also known as the precision, must
be given):
.RS
.TP 4
%X
time without date
.br
e.g. 23:54:06
.TP
%x
the date
.br
e.g. 25/07/97
.TP
%y
date without year
.br
e.g. Sun May 04
.TP
%Y
year, in four digits
.br
e.g. 1997
.TP
%D
duration of connection
.br
e.g. 00:03:34
.TP
%\fBx\fRH
the local MSN; if an alias can be found, that will be displayed instead
.TP
%\fBx\fRh
the local MSN, only as a number; no aliases will be substituted
.TP
%\fBx\fRF
the remote number; if an alias can be found, that will be displayed instead
.TP
%\fBx\fRf
the remote number, only as a number; no aliases will be substituted
.TP
%\fBx\fRL
the town corresponding to the local MSN if known; an empty string otherwise
.TP
%\fBx\fRl
the town corresponding to the remote number if known; an empty string otherwise
.TP
%T
an arrow indicating the direction of the connection
("->" outgoing or "<-" incoming);
the local MSN should be displayed on the left side of this.
.TP
%t
an arrow indicating the direction of the connection, reversed
("<-" outgoing or "->" incoming);
the local MSN should be displayed on the right side of this.
.TP
%\fBx\fRu
the charge units, if known
.br
e.g. 6 EH
.TP
%U
the cost, if known
.br
e.g. 2,28 DM
.TP
%I
amount of INPUT data
.TP
%O
amount of OUTPUT data
.TP
%P
INPUT throughput (bps)
.TP
%p
OUTPUT throughput (bps)
.TP
%S
Service Indicator
.TP
%G
displays a HTTP link to the corresponding fax, when a fax was received
by mgetty. This fax can be displayed by using the link in a HTTP browser.
.br
This option is only valid when used with -wx, see below for more information.
.TP
%C
displays a HTTP link to the corresponding voice file, when a call was
recorded by vbox.
This option is only valid when used with -wx, see below for more information.
.RE
.in +7
The default format string for (non-HTML output) is
.in +4
" %X %D %15.15H %T %-15.15F %7u %U %I %O"
.in -4
With the following string all the important data is displayed while
keeping the total length to 80:
.in +4
"%X%D %10.10H%T%-14.14F%U%I %O"
.in -4
The above string is put into /etc/isdn/isdn.conf at installation as
.B REPFMTSHORT
and can be used with
.B -Fshort.
.in -7
.TP
.B \-FX format
format strings can be specified in /etc/isdn/isdn.conf; this option
is used to select one of these. Entries can be defined in the
section [ISDNLOG] with names beginning with "REPFMT". The string after
the -F option is added to REPFMT to find the correct entry. Case is
not sensitive. E.g.:
.nf
REPFMT1 = ... # -> isdnrep -F1
REPFMTMYSTRING = ... # -> isdnrep -Fmystring or
isdnrep -F MYSTRING
.fi
.SH "HTML USE"
isdnrep can generate a HTML page containing links to files generated
by vbox and mgetty (faxes), so that the messages and faxes can be heard
or seen from within a browser. However, a couple of things need to be
configured first.
.cu
answering machine messages
The %C can be used in the isdnrep output format to make a link to a voice
recording file.
For this to work, the following entry is needed in the [ISDNLOG] section
in isdn.conf:
.nf
VBOXPATH= /var/spool/vbox/fred/incoming # incoming directory pathname
.fi
Now isdnrep can find the file correctly. Clicking on this link
will cause the file to be sent. These files are in ZyXEL format; the
browser cannot use these directly. The type is given by isdnrep as
follows:
.nf
Content-Type: application/x-zyxel4
.fi
The correct application (helper) for this has to be configured in the
browser. Alternatively, a conversion program can be specified to isdnrep
which will convert the ZyXEL format. The pathname of the file to convert
is given as a parameter to the program.
In the [ISDNLOG] section of isdn.conf an entry as follows specifies
which conversion program to use:
.nf
VBOXCMD1 = /usr/bin/program1
for versions 0.x and 1.x of vbox, and
VBOXCMD2 = /usr/bin/program2
.fi
for versions 2.x of vbox. Both entries can be given, isdnrep recognizes
which version created the recording.
The program must first output a line with the content-type, followed
by the data itself. To convert the ZyXEL format into a WAV file, the
following script may be used:
.in +4
.nf
#! /bin/sh
##
## script to play voice messages from vbox-2.0
##
## WARNING! If the paths are not set correctly,
## netscape may simply crash!
PATH=$PATH:"path to sox":"path to pvftools":"path to vbox"
FILENAME1=/tmp/voxplay.$$.voc
FILENAME2=/tmp/voxplay.$$.wav
VOLUME=8
vboxtoau <$1 | \\
autopvf | \\
pvfamp $VOLUME | \\
pvfcut 0.20 | \\
pvftovoc > $FILENAME1
sox $FILENAME1 $FILENAME2
echo Content-Type: audio/x-wav
echo
cat $FILENAME2
rm -f $FILENAME1 $FILENAME2
.fi
.in -4
The script above needs the packages sox and pvftools.
Additionally, the browser needs to be told how to handle "audio/x-wav".
This is done by adding the following lines to the files listed:
.nf
.RS 4
.TP 4
.B ~/.mime.types
type=audio/x-wav \\
desc="auWAV Audio" \\
exts="wav"
.TP
.B ~/.mailcap
audio/x-wav;/usr/bin/auplay %s
.RE
.fi
The package NAS (Network Audio System) may be needed.
Now, when the browser is started, it will recognize WAV files and start
the corresponding program to handle these. The WAV format has been chosen
as this can also be played from a Windows pc.
.cu
faxes received by mgetty
When %G is used in the isdnrep output format, any faxes received by mgetty
will be accessible via a HTML link, in the same manner as the ansering
machine messages.
For the faxes the following entry in the [ISDNLOG] section in isdn.conf
is needed:
.nf
MGETTYPATH = /var/spool/fax/incoming
.fi
WARNING: if isdnrep doesn't have permission to read the files, they
will not be displayed; there will be no error message.
When isdnrep passes these files back to the browser, they have the
G3 format. The following header is used to notify the browser of this:
.nf
Content-Type: application/x-faxg3
.fi
As the browser probably doesn't understand this format, the following
changes to the files listed are needed:
.nf
.RS 4
.TP 4
.B ~/.mime.types
type=application/x-faxg3 \\
desc="G3-Fax Format" \\
exts="fax,g3"
.TP
.B ~/.mailcap
pplication/x-faxg3;/usr/X11/bin/g3view %s
.RE
.fi
The program g3view has to be installed for this to work.
If now the link is clicked on, the browser will automatically start
the external g3view to handle this data.
If you prefer another format (instead of G3) such as JPEG, the format
has to be converted. The following entry in the [ISDNLOG] section of
isdn.conf takes care of this:
.nf
VBOXCMD = /usr/bin/g3tojpeg # example
.fi
The script g3tojpeg can be something like this:
.in +4
.nf
#! /bin/sh
##
## command to display faxes in a browser
##
## WARNING! If the paths are not set correctly,
## netscape may simply crash!
export PATH=$PATH:"path to g3topbm":"path to convert"
echo Content-Type: image/jpeg
echo
g3topbm < $1 | convert pbm:- jpeg:-
.fi
.in -4
The packages ImageMagick and mgetty are needed. Mgetty is probably
already installed if you want to use this feature :-)
The advantage of the JPEG format is that it can also be displayed by
a browser running on a Windows pc.
.cu
summary
A suitable value for REPFMTWWW is
.nf
REPFMTWWW = "%X %D %17.17H %T %-17.17F %-20.20l SI: %S %9u %U %I %O %G %C"
.fi
Netscape 3.0 Gold and Arena have been tested, and both work fine
with isdnrep's HTML output, although Arena's display is not as
colourful as Netscape's.
A known problem (which is impossible to solve completely) is determining
the relationship between an isdn connection and a fax or vbox recording.
Unfortunately the times for isdnrep, mgetty and vbox differ. Isdnrep tries
to make the best guess, but it's always possible that e.g. a fax is
connected to the wrong isdn connection.
.SH "EXAMPLE OUTPUT"
With the default configuration the following output can be generated
on stdout (whitespace slightly edited for clarity):
.nf
.in -4
$ isdnrep -v -t 6/1/96
I S D N Connection Report - Tue Aug 26 22:21:19 1997
Sat Jan 6 1996
00:54:19 UNKNOWN -> UNKNOWN No user responding \fB(4)\fR
[...]
16:33:24 0:03:23 UNKNOWN -> UNKNOWN 7 EH 0,84 DM
17:33:47 UNKNOWN -> UNKNOWN Unallocated (unassigned)\fB(5)\fR
number
20:02:28 0:02:37 Phone/HDLC <- UNKNOWN \fB(1)\fR
20:09:53 0:07:01 Modem/X.75 -> T-Online 3 EH 0,36 DM \fB(2)\fR
21:27:56 UNKNOWN -> UNKNOWN User busy \fB(3)\fR
22:09:41 0:29:36 UNKNOWN -> UNKNOWN 43 EH 9,89 DM*
======================================================================
1 IN= 0:02:37, 13 OUT= 3:40:14, 3 failed 210 EH 25,20 DM
\fB(6)\fR^^^^^^^^^^^^ \fB(7)\fR^^^^^^^^^^^^^ \fB(8)\fR^^^^^^^ \fB(9)\fR^^^^^^ \fB(10)\fR^^^^^^^^
DIALOUT Summary for Sat Jan 6 1996 \fB(11)\fR
-----------------------------------------------------------
T-Online 1 call(s) 0:07:01 3 EH 0,36 DM
UNKNOWN 11 call(s) 0:17:00 20 EH 2,40 DM
DIALIN Summary for Sat Jan 6 1996 \fB(12)\fR
-----------------------------------------------------------
UNKNOWN 1 call(s) 0:02:37
Zone 1 : City 2 call(s) 2:23:13 50 EH 6,00 DM \fB(13)\fR
Zone x : UNKNOWN 11 call(s) 0:17:00 20 EH 2,40 DM
.fi
.in +4
.B Notes
.RS 1
.TP 5
(1)
"xxx <- xxx" was an incoming call, so doesn't cost anything
.TP
(2)
"xxx -> xxx" was an outgoing call lasting 203 seconds, so for City zone,
off-peak time (Saturday), 3 charge units = DM 0,36
.TP
(3)
there was no connection, as the called party was busy
.TP
(4)
there was no connection, as the called party didn't pick up the phone
.TP
(5)
"the number you have dialled is not connected. Hang up and dial again. ..."
.TP
(6)
total time for incoming calls
.TP
(7)
total time for outgoing calls
.TP
(8)
3 calls failed; busy (3), no answer (4) and error in dialing (5)
.TP
(9)
total charge units incurred for one day
.TP
(10)
total costs incurred for one day
.TP
(11)
outgoing calls grouped per number
.TP
(12)
incoming calls grouped per number
.TP
(13)
outgoing and incoming calls grouped per tariff zone
.RE
If the charge units are marked with "*", the PTT switch did not give
charge info; these are the number of units guestimated by isdnrep.
.SH "TIME FORMAT"
For the -d and -t options, the time is specified in the following formats:
.TP
[DD/][M]M/[[YY]YY]
specifes the month or day.
Examples:
.RS
.TP 10
7/
July of the current year
.TP
8/1996
August 1996
.TP
29/6/95
June 29th 1995
.TP
6/6/
error, is not June 6th of the current year; it's June 1906
.RE
.TP
[D]D
day of current month
.TP
[MM]DD[hhmm[[CC]YY][.ss]]
specifies an exact time. Unspecified parts are defined as 0 when
interpreted as a begin time, and 23 or 59 when interpreted as an
end time.
.br
If a year is to be specified, the hours and minutes
.B must
also be specified.
.br
The format is copied from the date command.
Examples:
.RS
.TP
0107
January 1st in the current year
.TP
0107173196.25
January 7th 1996 17:31:25
.TP
010717311996
January 7th 1996 17:31:00 (or 17:31:59)
.TP
12141995
error: \fBnot\fR December 12th 1995, but December 12th of the current
year at 19:95, so it's garbage.
.RE
.in +7
Examples of time spans and their meaning:
.RS
.TP
6/95-081214381996.25
all entries between June 1st 1995 00:00:00 and August 12th 14:38:25
.TP
0912030495.20-12/95
all entries between September 12th 1995 03:04:20 and December 31st
1995 23:59:59
.TP
7/95
all entries between July 1st 1995 00:00:00 and July 31st 1995 23:59:59
.TP
0908
all entries between September 8th in the current year 00:00:00 and
September 8th in the current year 23:59:59
.TP
3
third day of the current month
.RE
.SH "FILES"
.TP
\fB/var/log/isdn.log\fR or \fB/var/lib/isdn/calls\fR
isdnlog log file with information about all calls.
.TP
\fB/etc/isdn/isdn.conf\fR
general configuration
.TP
\fB/etc/isdn/callerid.conf\fR
aliases for telephone numbers
.SH SEE ALSO
.B isdnlog(5) isdnlog(8)
.SH AUTHOR
This manual page was adapted from isdnlog/README by
Paul Slootman <paul@wurtel.demon.nl>, for Debian GNU/Linux and isdn4linux.