With old fashioned ringer type telephones it was practical to record with a pickup coil under the phone. The ringer coil acted as the primary of a transformer to couple the signal to the pickup coil.
New electronic telephones don't have ringer coils, so inductive pickups no longer work. You would need to insert a recording device in the line or in the headset cord for a wired phone. A cordless phone would require a pickup microphone located on the handset.
Radio Shack used to sell a telephone recorder pickup that attached to the back of the handset with a small suction cup. You attached it up by the ear piece.
They also sold a little back box that attached to the phone line and had an audio jack output. I do not know if the still sell it.
Please be aware that there are legal restrictions to recordings in some countries. In the US, you must inform the person on the other end of the phone that you are recording them. Unless, you are the government itself, and then you can do anything you want.