When off-hook, telephone set draws current from line. Line has a non-zero empedance. So to detect off-hook monitor the current at exchange side, monitor the line voltage at subscriber side. Easiest way to sense off-hook position put coil of a relay or optoisolator's input diode serial to line. When current passes through the coil/diode, relay/optoisolator out will short.
I would suggest reading the book "understanding telephone electronics" uploaded to forum numerous times.