These circuits abound in most electronic project books.  If you're more
inclined to buy something, try Radio Shack.  I think they still have a
device that is designed to disconnect an answering machine when an
extension line is lifted.  It has LED indicators also. 