An optocoupler will allow you to read any voltage from 12V to 100V with a digital output. The main issue is the ringer which would be AC, so this needs a protection diode on the optocoupler. This should work:

R1 limits the current through the optocoupler (other optocouplers may need a different value), D1 protects against reverse voltage (the ringer - which will produce a 20 Hz block wave output).
Optocoupler is chosen based on what I happen to have in my parts box - no particular reason to go with this one instead of one of the many others.