This is a small application that reads Caller ID information from a modem and stores it in an SHQL database. It consists of a small program to watch a modem and read CID information, a database template with examples for SHQL and a program that watches the database for new calls. The watching program can send notifications several different ways defaulting to printing the CID information. It can also ring the terminal bell, send an email and execute a program. The watching program also checks the table cid for a number matching the CID number. If a match is found looks up that person in the people table. If the person is found then information from the people table is printed along with the CID information.

This is a really simple program that is intended to be modified. It works perfectly for my purposes, other people might want it to do more. The database is quite simple and could be the basis for a complete address book. The watching script only prints out some of the information it finds in the database. This can be customized and must be updated if the database is altered.


  1. Unpack the tarball.
  2. Create an SHQL database and add the template to it.
    1. 'shql -c addr' will create the database is SHQL is installed and configured.
    2. 'shql addr < db.sql' will add the template to the database.
  3. (Optional) Add entries to the people and cid tables for call matching. The example entries in the cid, calls and people tables can also be deleted.
  4. Edit the variables at the top of to match your modem and the location of the database.
  5. Edit to match the location of your database.
  6. Run in the background.
  7. Run to monitor calls.

Sample Output:
This is an example of the output of the watching program. The information is taken from the examples in the template. The first is a call with matching entries in the cid and people table, the second has no match.

System Time: 2006-01-04 09:42:54
CID Number:  2222222222
CID Date:    01-04
CID Time:    09:42
DB Name:     Good Friend
DB Email:    friend@home.tld
DB AltEmail: friend@work.tld
DB Home:     (222) 222-2222
DB Cell:     (333) 333-3333
DB Work:     (888) 888-8888
DB Note:     Home

System Time: 2006-01-04 11:05:39
CID Number:  6666666666
CID Date:    01-04
CID Time:    11:05
No database entry found.

It is available as a Gziped tar file.

CAUTION: Do not modify the calls table while the and/or programs are running. Doing so will cause strange unexpected problems.


Created with VIM. Valid HTML 4.01 Transitional.