ISDN - Who is calling?
List | Home
LinuxNetMag #1

Emulate with WINE
wwwoffle as Proxy
TeXteditor LYX
qps - QT Frontend for ps


suck news
ISDN - Who is calling?
recommended Links



Editorial Office

List of articles


  ISDN You have ISDN and an ISDN-card in your PC?
Every time when you get a call the caller's telephone number appears on the display of the telephone?
What about if Linux warns you who is calling?


What is the name to this number?
Installing an ISDN-card often produces a lot of trouble but with this problem we will be busy another time. If the card functions well you want to use all its abilities.
When somebody is calling the caller's telephone number is written in the file /var/log/messages if the opposite has ISDN, too.
Shouldn't it be possible to use this information and get a message to whom this number belongs? With a script it is possible to use the telephone number to analyze a databank and find out the caller's name.

Believe me it is much easier. The isdn4linux's programmers have already thought at this possibility and you do not need much program knowledge to get something like that.

The following solution is not very witty but will be completed fast and you do not need script knowledge. It should be very useful for beginners.

My PC shows me the message with a JPEG-picture, which should not be very big to be loaded very fast later. (about 512x246,  6 KB)

incoming call ...
(more witty outlines are welcome)

You produce a picture like the one above for every caller you want. It is also possible to scan a photo and use this one instead.
Save the pictures in the directory /etc/isdn/jpeg. If you have to create this directory type

>> mkdir /etc/isdn/jpeg

Next isdn4linux has to learn which picture belongs to which telephone number. This happens in the file /etc/isdn/callerid.conf  .

There should be an entry like 

NUMBER = 5551234 
ALIAS  = me 
ZONE   = 1 

Every telephone number gets an alias.  ZONE describes to which fare zone the caller belongs to. (You have to enter the telephone number without the area code.)

E.g. you have a friend called Thorsten S. who calls you very often. First you create a JPEG-picture for this caller (see above) and save this in /etc/isdn/jpeg/ with the filename callThorstenS.jpg .

Next enter his data in the file /etc/isdn/callerid.conf . This should look like:

NUMBER = 555333 
ALIAS  = ThorstenS 
ZONE   = 1 
START  = { 
           FLAGS = I|R 
           PROGRAM=/usr/X11R6/bin/xli -fit \ 
- geometry 512x256-350+250 -display :0 & 

The new and important thing stands right behind the variable START. There you write what should happen if this numbers calls.
FLAG should not be very interesting for you right now. Instead we concentrate on PROGRAM

We use the program xli to show the picture (should come with every linux distribution). Also you could use xv or other programs. I prefer xli because it is small and loads the pictures quite fast.
The option -fit makes it possible that the picture will be presented correctly even on an 8 bit X-server. The second path includes the picture file which will be loaded.
-geometry 512x256-350+250 fixes the size and the position on the windowmanager (you should fit these parameters to your resolution).
-display :0 tells xli on which display the picture should be shown.
You have to enter these lines for every opinion in the file. With copy an paste this should not take a long time.
Now everything should function perfectly. You only have to restart the ISDN driver so it rereads the new callerid.conf.


It gets on my nerves that the picture is loaded with a window frame always. It does not look like a message it looks more like a picture - may be because it is one ;-) .
To change this you have to announce the properties of the windows in a different way.

The following configuration belongs to fvwm2:

Add an entry into the file ~/.fvwm2rc  like:

Style "/etc/isdn/jpeg/*" NoTitle, Sticky, StaysOnTop   (all in one line!) 

This entry can be placed everywhere but to keep a better overview put it to the other style entries. This line makes it possible that the loaded pictures do not have a window frame any longer and it is "sticky" that means it appears on every virtual desktop you are moving to and it will be placed over all opened windows (StaysOnTop).

Now you have your own telephone pre-warning device.

Other issues of Linux NetMag
[ #1 | #2 | #3 | Main ]