This is an ESP8266 based device which interprets PSTN telephone caller ID information and displays it on a screen, supplemented with information drawn from a mySQL based directory. There is an optional feature to suppress the telephone ring for calls identified as spam. Full spam protection allows only callers who are specifically registered in the directory to cause the phone to ring. Spam calls land silently, after a preset period, onto the voice mail. You must (or should) have voice mail if you use anti-spam features on your telephone connection.
The situation here is that black lists are not now very useful because the worst telephone spammers are now spoofing numbers, including those of valid telephone subscribers in the same network. At home, I now implement a white list, the strongest level of spam protection.
The design uses a software demodulator based on the Arduino APRSlib (www.unsigned.io). For signal conditioning, it uses a separate ADC chip (the inbuilt one is not fast enough) and a rail to rail op amp which also handles ring detection. It does not rely on any telephone specific chips, which are now anyway obsolete and difficult to obtain.
Call (and telephone book) data is maintained on a MySQL database (LAMP server). This server can be local to your lan or an internet service. It would have been possible also to do all this in flash memory but number matching, joining tables, formatting output etc. is much easier in SQL and PHP, and mySQL anyway has basic admin tools for browsing and maintaining tables. The device works also in offline mode and then can display incoming calls, but then there is no call storage/retrieval or directory look up and the spam suppression in not available.
Ring suppression is implemented with a simple relay and activated only during ringing in a confirmed spam case. It is fail safe with normally closed contacts so that during power failures, crashes etc. the standard telephone functions are available.
The main user interface is a 240 x 320 tft touch screen (SPI). This is used for displaying and paging through call history and setting some configuration parameters. Other parameters relevant to the online mode of operation are set through a Web browser with the ESP8266 running its own access point.
Even if you are not interested the telephone application, the design contains some features which may be interesting for other purposes, for example the connection to a MySQL data base for storing and retrieving data, A light weight and easy to use navigation bar class for the touch screen and a simple 2 point calibration of the touch screen on set up to map it to the screen.
The main documentation (including a schematic) is a PDF file (which may, because of its size, is in the next post in this thread).
The zip file contains the ESP8266 software and the PHP scripts for accessing the database.
This is probably not a good project for an absolute beginner. Some knowledge of MySQL and PHP would also be useful as could be the availability of an oscilloscope.
This is a new development of something I published here on July last year.
Disclaimer: Before connecting any device (such as this) to your telephone system, ensure that doing so does not conflict with any rules of your local telephone operator. Understand that you use such a device at your own risk.
Edit 1.
I've captured an audio sample of the AFSK encoded telephone caller id. It is in the zip file Telephone_Caller_ID-AFSK_sample.zip below. You hear it as a 1 second burst between the low frequency ring tones. It is in MDMF format and contains the number 0800807111 date 2203 and time 0851. I have used such samples for testing the demodulator via a PC sound card.
ESP8266_CallerID_software_v1.00.zip (39.4 KB)
Telephone_Caller_ID-AFSK_sample.zip (211 KB)