This is a project I did a couple of years back for a business friend of mine to automatically log all his phone calls into his computer. The hardware (pictured above) uses an microprocessor to monitor the phone calls (incoming and outgoing) and send the data out the serial port to be read by the computer.
The hardware is controlled by an Atmel AVR ATmega32 microprocessor. The processor uses optoisolators to see if the phone is off-hook and to check if the incoming line is ringing. If the phone is off-hook a DTMF decoding chip CM8870CP is used to decode the number that is dialed. If it is an incoming call an FSK decoding chip XR2211 is used to decode the Caller ID data.
Phone Call Logging Project – [Link]