Felix Sargent Headshot

Felix Sargent

Software Engineering Leadership | Social Choice Theory

My Voice is my Passport, Verify Me — Condo Access via Twilio+Voice

March 11, 2019

It’s been raining a lot in Oakland recently, and somehow the keypad on the condo security panel shorted out and no longer works. This means that my old method of using Twilio to dial a passcode to let me into the building no longer works.

I can open a call to the Twilio number, but I can’t use dial tones — but what about voice? Surely there’s a solution for speech to text and then it can be like Sneakers!

Enter Twilio Autopilot. The quickstart is a great way to get up to speed. This article will give you everything you need from there to make the system work by leveraging Twimlets.

The requirements are:

  1. Let in callers who know the password by replying with a DTMF #9 dial tone.
  2. If callers do not reply with the password, have them call my phone number (and I can validate them there).
  3. Callers should be able to mention my partner’s name and it’ll ring their number instead.

Once you have your Twilio account, navigate to h[ttps://www.twilio.com/console/autopilot](https://www.twilio.com/console/autopilot) and create an autopilot.

We’re going to build four tasks. Go to the Task Builder and create your first task “Answer”, “call-A”, “call-B”, and “open-door”

The secret sauce is in the Open Door script which plays a mp3 version of DTMF9.

Next, go to Defaults and ensure that assistant initiation is set to “answer” and the fallback will be to call you.

Next, go to the “Natural Language Router” and create four items, and link them to your tasks.

To finish everything up, build the voice model in the Natural Language Router panel.

Give your system a run on the Overview page.

To connect this to your phone number, go to Channels and select Programmable Voice.

Create a new TwiML app here: [https://www.twilio.com/console/phone-numbers/runtime/twiml-apps](https://www.twilio.com/console/phone-numbers/runtime/twiml-apps)

Go to your phone number, and set Configure with to TwiML App, and select ‘open-door’.

Hit save, and you’re all set. Handoff that phone number to your HOA, and you’re done.