Full disclosure: a lot of people have talked about this idea, this is just my implementation of it for our apartment.  You can check out Buzzeromatic.com if you want someone else to administer yours or post to Elance/oDesk/HackerNews/Twitter to get someone to build it for you.  Look for something cool from @gregkoberger with all those features I left out (user management, UI, adding new roomies, adding more numbers etc.)

Making a Present for My Roommates

About a month ago, I moved to a 3-story loft in SOMA with my husband Kevin and our good friends Park and Kat.  My sister also graduated college and joined a local startup, so she’ll be moving in with us next week.  With 5 people living here and only 2 master keys to the front door, we had a bit of an access problem right away.  My roommates, knowing I haven’t had a chance to code since the move started, were nice enough to suggest a build an app with my Twilio skills (full disclosure: I work there) and we tested it out last night – it works, so I’d love to share.

How A Call Box Works

If you’ve lived in an apartment with a call box for buzzing people into your apartment before, this will sound pretty familiar.  There is a list of names and corresponding codes listed on the callbox display, you dial the number and it rings the person who lives there, they press a key and the door is unlocked.

What happens inside the callbox is a little more interesting – because the sound the keypress makes, which is called a DTMF tone, is actually a pretty amazing little thing.  Tone dialing was arguably one of the earliest massive implementations of human-to-computer communication.

Phreaking Out the Phone with DTMF Tones

There is a long history of phreaking (the image to the right is of a bluebox built by Steve Jobs and Steve Wozniak, on display at the Computer History Museum) by playing DTMF tones and other tones (pulses, pins, etc), and the things telecommunications hackers achieved without any kind of API like Twilio is pretty amazing.  In my case, the call box just requires the person who receives the call to press 6 to open the door, and responds when the 6 DTMF tone is played.  This tone doesn’t have to come from pressing a key though,  I can just play the audio file into the phone to mimic the action of a keypress – and the doors opens!

The simplest implementation of this is just to have the door automatically open when anyone dials your extension.  I don’t recommend setting your callbox up this way, because you might accidentally let in people who are messing with the box looking for a way in so they can do bad things.  My street has a lot of bums and other riff-raff on it, so I wanted something with a couple different types of security.  So here’s what I did.

Setting Up My Call Box with Twilio

If you haven’t heard of my company, Twilio, before the really quick elevator pitch is that we are the AWS of telecommunications, making it easy to send/receive calls and text messages programmatically and only paying for what you use.  It’s pretty sweet, its a startup, and I’d love your feedback on it.  So here we go:

  • Get a local Twilio number (or you can use the sandbox number for free)
  • Tell your building administrator to add your name/number to the box
  • Build a simple app that forwards the call to your cell phone so you can make sure the box can recognize DTMF tones passed from a forwarded call

Doing this test before you build your full blown app is really important, it will save you from debugging an issue outside of your control.  You just need to create this little callbox.xml file, save it somewhere on the web (publicly accessible on Dropbox is a handy option, our try Twimlets)

callbox.xml (replace 415-555-1212 with an actual phone number)

  1. <Response>
  2. <Dial>415-555-1212</Dial>

  3. </Response>