I've just completed an Arduino Nano based telephone caller line identification system so that I can display details of incoming calls to the fixed network telephone at home on a custom display. The final version I intend will have a display large enough so my wife can read it with out hunting around for her spectacles before hand. This initial development is a proof of concept and usable prototype, although it has already quite a number of features including an IR remote control to page through a telephone call history etc. Of course, it may not stop there. Apart from the larger display, I've been thinking about adding a white list based spam filter, so unknown callers drop silently after a period onto an voice mail box. But that is a bit in the future.
The main core of this development is a software modem based on the work of markqvist who maintains an Arduino modem library for APRS (Amateur Packet Radio System) enthusiasts on his site unsigned.io. The telephone caller line identification information (CLID) is transmitted in a similar format to APRS data, but with a single byte serial structure instead of a block packet framing, but it was relatively simple to take this solution and adapt it. For those interested in the details, the CLID is encoded using frequency shift keying [ref] using a Bell 202 / V23 format. If you've ever misdialed and ended up listening to a fax machine, you'll already have heard some samples of this.
There are other solutions to this problem of interpreting the CLID, but most are based on obsolete, and difficult to obtain, chips. I wanted to build a solution without these dependencies, and have some fun/ learning experience at the same time. There is also at least one ATMEL assembler based example around but the one described here is entirely C/C++.
Here in Switzerland, as in quite a number of other countries (but apparently not the UK), the CLID is transmitted between the first and second ring bursts. In this solution, the demodulator part, however, simply waits until it finds the defined training sequences in the data stream, calibrates itself, then captures and parses the information and sends it for display and then storage in eeprom. It does not explicitly depend on the timing of the ring pulses. The data comes across in MDMF format which includes a telephone number, a timestamp (without year) and, if available, a subscriber name.
Of course, all this telephone technology is not state of the art. In fact it is refered to as POTS (plain old telephony system) which ISDN (integrated services digital network, but with also some less charitable expansions of this acronym) was intended to replace, which has itself been superceeded by VOIP (Voice over IP) technology. But yet it is still around. The glass fiber connected router I have now has an RJ11 socket for older style phones, although the network provider would also be happy to sell SIP/VOIP (Session Initiation Protocol) phones connected by ethernet or WLAN (Wireless LAN).
I've managed to create a PDF of the project description which has a small enough file size to fit here. This replaces the previous Word document. The pictures have suffered a slight quality loss during compression.
There is now an updated version here (http://forum.arduino.cc/index.php?topic=528459.0) . It is an ESP8266 based PSTN caller ID system which has also an anti-spam feature.