Readme file for isdnwatch
-------------------------

LICENSE
=======

This package is licensed - as you may have expected - under the GPL (GNU
Public License). A copy of this license is included here.

You may modify this script to (hopefully) fit your needs, and I would be
glad if you drop me a line (see bottom of this README file) what you have
improved and how you did the trick.


WHAT IS isdnwatch?
==================

isdnwatch.pl runs as daemon. The syslog is checked for new calls on the ISDN
(Integrated Services Digital Network). If a new call is noticed, the callers
number and the called MSN (Multiple Subscriber Number) are checked.
If they are mentioned in the configuration script (isdnwatch.conf), the
action requested there is taken (e. g., a shell command is invoked).
So you can automate the dial-up of your router if you call it from your
mobile phone, for example. You have a very wide field of possibilities with
isdnwatch.

You do not need to pay for calling your machine from external locations,
because it's sufficient to dial the MSN which was set up in the config file.
No connection is needed to get isdnwatch doing its job for you.

I wrote this because I didn't want to run isdnlog from the isdn4linux
package because it does not agree with my new 2.4.x kernel on Debian 2.2r2
"Potato".
If you only need to start programs after calling your machine via ISDN, this
solution should be better because it is very compact and easy-to-use.


WHO SHOULD USE IT?
==================

Anybody who has an expensive dial-up ISDN line (for example, if you live in
Germany) and wants to easily run some commands on his machine from all over the
world for free.


PREREQUISITES
=============

- an ISDN card
- ISDN4Linux

NOTE: This was only tested with the german DSS1 protocol and a Teles 16.3c
PnP card.


HOW IT WORKS
============

Once the script is invoked, it falls into background and checks the logfile
(you may specify this file on top of the script: "config vars") in
intervals. You are able to specify the interval, it is preset to 60 seconds.

There is a status file written (if you didn't change it, it is posed in
/tmp) which indicates whether new calls have arrived since the last
activation of the script.

If so, the calling number and the called MSN are checked whether they have
an entry [ACTION] in the config file. You may specify the config file name
and location on the top of isdnwatch.pl.

If an entry was found, the command specified in the config file will be run.
This program runs with the same rights as the isdnwatch.pl script (usually
root).

The script must be run with rights that permit reading the system logfile
with all messages from isdn4linux.


INSTALLATION
============

Simply put this script somewhere on your machine (e.g., /usr/bin). So do
with the configuration file included in this package.
You probably have to customize some paths and settings on top of the script
isdnwatch.pl.


PROGRESS
========

What you see, is what you get ;-) ... and this is the initial version of my
script. There will be some additional features added in the future, e. g.
multiple MSN/number matching, and so on. Until then, you can reach the same
by specifying multiple [ACTION] blocks.


THE AUTHOR
==========

If you have ideas, questions, problems or suggestions, you can reach me via
e-mail at lf-router@web.de. Alternatively, I would be glad if you visited my
website at http://prinzess.dyndns.org.
