How to have a micro-controller detect doorbell?
From what you've said, you'd want the detection circuit to reject false triggers. Let's consider those to be voltages below around 15 Vac, to allow for voltage drops in the line.

The circuit below should do that. It should result in pulses around 1 ms for every AC cycle that the switch is pressed. Your MCU can do more false trigger rejection by only acting on (say) 4 trigger pulses within (say) 25 ms of each other.

Your final circuit values may vary a little but the principle should be sound. R1 reduces the strain on D1 when the door switch is pressed in mid-cycle and it has an uncharged C1 loading it.  

EDIT: Added R4 to discharge C1 down below the D1/D2 cut-off of 21-odd volts promptly when a Vac pulse is removed. Discharges C1 from 21 V to flat in something like 30 ms. Made zener voltage visible.







simulate this circuit &ndash; Schematic created using CircuitLab