How to detect when intercom is ringing?
As it sounds like you do not own the buzzer (it is part of the appartment), someone may not like you directly connecting to it.

If this is a classic buzzer with an electromagnet, consider using a Hall Effect Sensor.  The magnetic field generated by the buzzer may be able to activate the Hall Effect Sensor and inform the Arduino the buzzer has been activated.  This article talks about Hall Effect sensors and an Arduino.

Image of Arduino and Hall Effect Sensor from linked to article:


Further, this is a much safer way connect to a buzzer.  As a classic buzzer can generate very high voltages that can damage processors and other sensitive electronic devices when directly connected.