Intercom ring detector
Most of the time ring signal on intercom seem to be between 20V and
  90V AC


A fairly standard ring detector circuit used as an addition to POT lines is this: -



Image from here.


  The aim of the circuit is to convert this signal to a 3.3V peak to be
  detected by the logical input.


The opto output can be used as a detect signal when the appropriate pull-up resistor is used - do you know how to use an opto-isolator?