How to automatically buzz guests in your neighborhood or apartment

I live in a gated community and we share our home with lots of folks. We can only list one phone number in our callbox, which means I’m constantly buzzing people in. To make matters worse, when I’m working I sometimes forget to check my phone when I get calls, so I find out a friend has been outside our neighborhood trying to get in and I have 20 missed gate calls.

I mentioned this to my brother-in-law Jason and we tried to think of a way to use Google Voice to automatically buzz folks in. This approach didn’t really work out, but some time later he told me about a great service called Twilio that he used to solve this problem. Twilio is basically a series of pay-as-you-go VOIP API’s that allow you to build simple cloud communications apps using either voice or SMS.

I finally decided to give this a go. You can use the following approach to buzz folks into your apartment or neighborhood gate. I tested this implementation last weekend when we had about 20 people over, and it works flawlessly. Here’s the basic premise:

  1. Get a Twilio account and buy a local Twilio phone number.
  2. Call your community management and have them change your number in the callbox to your Twilio number.
  3. Point your Twilio phone number at a simple web-app which will control access to your community.

Point 3 can be as complicated as you like, ranging from either (i) automatically buzzing in anyone to (ii) a complete phone menu where someone at your gate can select which roommate they wish to visit, input secret codes to automatically gain entrance, etc. For an in-depth example of this, you can read a great tutorial by Danielle Morrill which provides all the code and explanation of how she set up a multi-user door buzzer for her apartment. In the end, I decided that Danielle’s implementation was way overkill for what I need. Here are the steps I wanted:

  1. Greet my guest.
  2. Play the #9 DTMF tone to buzz them in.
  3. Send me an SMS message saying “Intruder Alert!”

The Twilio API is incredibly well-documented so this is super simple to pull off. All you need to do is create a file called callbox.xml containing the following text, and put it in your public folder in Dropbox. Point your Twilio number at the public url of this file, and you are all set.

callbox.xml:

<Response>
    <Say>Greetings, I am an AI that Ben has employed to buzz friends into the neighborhood. Please wait for the gate to open.</Say>
    <Play>9.wav</Play>
    <Sms to="123-456-7890" from="098-765-4321" method="POST">Intruder alert!</Sms>
</Response>

All you have to do is replace 123-456-7890 with your cell phone number and 098-765-4321 with your Twilio number. The file 9.wav is a simple audio file containing the number 9 DTMF tone which should live in the same location in your public Dropbox folder. You can generate the DTMF tone this using this web utility.

I really like the simplicity of this solution for now. Since I receive a text message every time someone uses this, I can easily track if this is ever abused. If that starts happening, I will implement an algorithm like Danielle’s above which will require a secret passcode for entry. But for now, this is awesome. Thanks to Twilio for making this possible!

Thanks: Jason Ardell, Danielle Morrill, Sean McCann, Twilio

You can read more about me, follow me on Twitter, subscribe to this blog by RSS or email, and find many more posts in the archives.