You need a handset adaptor one of which can be seen here......
Digital Handset Adaptor Telephone Recording Interface There are lots of them about and a good one can also be used as a headset/handset switch. Shop around as some also come with switches that adapt to different wiring formats.