my favourite option would be with potential free realys (see topic here)
But in case is not possible to be potential free integration:
A) would the ring detection detect a positive 5V dc signal on yellow line?
B) what is the signal of the open line? does it output a dc Voltage that I can detect, and in this case, what is the voltage output, and maximum current output?
A = yes,
B = the open line signal depends on the used intercom, - if it’s analogue, the opener just shorts the blue opening wire to the purple gnd wire (what is when rightly connected, the same as pushing the opening button on a analogue intercom), - if it’s digital, the opener records the patterns for opening and bell recognition in the setup process, and replaying them into the system for controlling opening, and recognise bell when needed!
The wiring scheme on your picture, is for a analogue intercom system, WITHOUT ring recognition, - if you want ring recognition, you need also the yellow and green wires!
If your intercom is digital, you need a hole other wiring scheme!