A bridge rectifier as mentioned above followed by an optoisolator would provide what you need.
The good 'ole POTS (plain old telephone system) used a 25Hz ac ringtone, and had a capacitor in series with the bell so that the circuit took no current with a steady +/-48vdc applied . You could try that too.
Allan