Here's a full schematic for a telephone interface complete with example code.
http://www.microengineeringlabs.com/doclist.htm#XT