I was frustrated when trying to create a doorbell for my office to simulate the Toshiba Strata digital doorphone we had. I replaced the system with a custom Asterisk box with a TDM800 card (8 fxo). Since our office has 7 incoming lines, I had 1 extra FXO port to attach the doorphone to. Any FXO port should work fine though… I purchased a Viking W2000 off ebay for $171.92 after shipping.
Wiring was simple. I traced the old pair that was connected to the digital phone controller back to our punch block and patched it into channel 8. I ran power with about 40 extra feet of lampwire and the included AC adapter. The Viking has a black block of 4 screw terminals where the signal and power connect and it is very clearly labeled.
Once the box was mounted outside, I added the following to my zapata.conf to put channel 8 in its own group and context (using the same fxs_ks signalling that all my lines use):
context=doorbell
group=2
channel => 8
Then I added the doorbell context to extensions.conf and had it ring the unfortunate doorbell recipients:
[globals]
Door_bell=SIP/234&SIP/201&SIP/202&SIP/200&SIP/225
[doorbell]
exten => s,1,Answer()
exten => s,n,Set(CALLERID(name)=”Doorbell”)
exten => s,n,Set(CALLERID(num)=”Doorbell”)
exten => s,n,Dial(${Door_bell},5)
exten => s,n,Hangup()
Using the caller ID, I set up their Grandstream GXP2000’s with distinctive rings for the doorbell on the advanced page:

And that was that. The phones ring for 5 seconds and the caller ID clearly lets them know that there is someone at the shipping door, and if they pick up they can have a conversation with the delivery person. I hope this helps at least one person who’s looking for clarity.