Palm findnumber

This findnumber is a small Perl script I wrote to look up phonenumbers as logged by isdnlog in the Palm address book AddressDB.pdb. Using the available modules Palm::PDB and Palm::Address it was simple to check all numbers for the given number, and display the associated name.

The idea is to install it somewhere were a script called by isdnlog can find it and use the resulting name. Relevant part of my /etc/isdn/callerid.conf:

[MSN]
NUMBER = 030xxxxxxx
ALIAS = Voice xxxxxxx
SI = 1
START = {
        [FLAG]
        FLAGS = I|R
        PROGRAM = /usr/lib/isdn/call-alert \$2 \$3 \$17
}
The script /usr/lib/isdn/call-alert has:
#!/bin/sh

banner $1 > /dev/tty12

NAME="`/usr/lib/isdn/findnumber "$1"`"

echo "$1 $NAME(in $3) calling $2" > /dev/tty12

mail -s "ISDN $1 $NAME(in $3) calling $2" phone <

So I get alerted to who is calling.

Download

findnumber.pl

Don't forget to change the location of the database file and the country code.


Koos van den Hout (koos@kzdoos.xs4all.nl)