last update: 2004-12-30 11:32
The clipd is a simple linux daemon for displaying CLIP data (also known as CallerID) from analog telephone
line on LCD display and/or web page. Callers data is stored in MySQL database. The program support
lcdproc with 20x4 size display, but with a small modifications you can customize it to your own size.
In package is also a php scripts needed to manage/show the callers database.
Showing database, connection history, dialing, modifying and adding new callers are available via these scripts.
When adding a new caller to db it has icon set to -1 by default - setting it to 0 will cause
treating the number as cell and will display it with green color on page.
is a screenshot of a php script output.
In short, the programs work as follows:
When a first short RING is detected it add a new screen on LCD, then, when modem reads the CID data
it is parsed and searched a number. Parsed number is searched in MySQL db - when found the caller data
appears on LCD screen, else - only the number. The daemon also write to the connection history in MySQL
database the number, date and time of a connection.
If another call comes without clearing LCD, than the old caller is replaced with new caller data, making
the last caller shown on LCD until clear.
In MySQL exist new_callers table for holding number of callers, which was not shown on LCD when clearing display.
It can be used to show only new connections in php scripts instead of all with small modification of php script.
To clear LCD display you just need to send a SIGUSR1 signal to clipd, on debian box you can do it like this:
killall -USR1 clipd
There are also actions for SIGABRT and SIGHUP signals. ABRT deinitializes and closes modem
(use it for example before connecting with pppd) and on HUP signal modem is opened and initialized.
There is also availability to send a defined in source code callers to a windows box via UDP.
Just customize on which caller names it has to send a information to selected host IP with
Windows and CallerID.exe process running on it. The metod is called NotifyOlo(), because of my brother's nick ;)
When a info is received by CallerID.exe it raises a MessageBox with caller name and time.
You can dial any number - just use clipcmd:
clipcmd dial 0888123456
and the modem will dial it and disconnect just after it. This way of dialing is used in php scripts. To dial
from web you just need to click a dialername or a phone logo right after a number. After dialing from scripts
the times_dialed value for a selected caller is automatically increased.
There is also possibility to call a user typed number - to do it just click anyone like you call to him
and then type a number in edit box and press 'dial' button.
Unfortunately I have not enough time to make the compilation totally user friendly :((
Before compilation you need to customize some things - such as MySQL username and password,
paths (if you need), lcdproc servername, port, and so on...
- modem with CallerID support - tested on my Zoltrix FMVSP56i2 - it's based on Rockwell chip and answering on AT#CID command - it
support formatted and unformatted presentations of CallerID data (#CID=1 and #CID=2 accordingly) - both are supported in clipd
(if you have modem, but with other presentation form - it shouldn't be hard to implement it - write to me if you can't ;)
- telephone line with CLIP in FSK standard (if you are interested in CLIP, but in DTMF standard please mail
me - maybe i'll release a version with DTMF support too - i used Zarlink MT8870 chip and simple adapter
connected to parallel port when i had DTMF standard set on my line before),
- LCD display (optional)
is a pic of my LCD showing clipd data (under the heartbeat is a caller counter since LCD clear).
- Besides standard linux packages to compile you need a MySQL with mysql_config
I've compiled it successfully with g++-2.95.3
- lcdproc (optional)
- apache web server with php and MySQL support (optional if you want only LCD support, but then you need to manage the db, ie. add new callers, by yourself)
- First of all look in all header .h files and check everything, customize it to your preferences.
- copy a php scripts to your apache web server directory
- make a new database and tables in MySQL:
mysql -u root -h hostname --passw=passwd < scripts/init_db.sql
- if you want support for dialing from php scripts you also need to set the the APACHE_USER in Makefile (it's set to 'www-data' by default)
- compile typing
in clipd source directory
- after successfully compilation you can install typing
(it will be installed into /usr/local/bin)
- and add it to a startup script if you like to be launched every time linux starts
Much info is available in log file which is in /var/log/clipd by default.
Feel free to contact me with your opinions and requests via my e-mail:
manio .at. _same_domain_you're_watching_
- Caller ID FAQ
© 2007 by Manio