Hi,
if this can help you: in the past week i built a SIP-doorbel, using an old handsfree analog pots telephone, connected to a grandstream ATA HT508 (or GXW400x).
The essential concepts are: the hookswitch of the telephone becomes the doorbell; in the ATA-box the field "offhook auto dial" should be configured.
My setup works fine; i can even transfer the doorbell to an IVR or a voice-mail recorder.
For your system, you could do exactly the same: the hookswitch of the telephone becomes the door sensor. when the door opens, automatically a specific tel. number is dialed.
If you want to know more, contact me and I'll send you the detailed recipe of my contraption.
I'm even thinking of building a SIP dooropener. In this case the telephone bell will trigger an optocoupler, which in turn will trigger an electromagnet, which controls the door.
Greets,
Flurk,
Brussel