One of my favorite things from IT Crowd is their “Hello IT” machine. It’s the perfect solution for lazy people who are tired of answering the same IT support questions again and again. With Twilio Functions and the new Speech Recognition we can build our own version of this machine with just a few lines of code.

If you are not familiar with the answering machine from IT Crowd make sure to check out this video of it in action.

You can also check out the final result by calling one of these numbers:

🇬🇧 +44 20 3389 5853

🇺🇸 (415) 702-4376

Before we get going make sure you have a Twilio account. Sign up for free.

Now let’s get coding!

“Hello IT”

The first thing we need to do is create a new Twilio Function that will handle all of our requests. Twilio Functions allows you to host Node.js code directly within your Twilio Console. No need for you to spin up your own server.

To get started:

Go into the Runtime section of your Twilio Console

click on Functions

click on the red “+” and choose the blank template

Your screen should look like this:

The code that you see is currently generating and returning an empty TwiML response. Additionally we have the option to name our Function and give it a path. Each account is given a unique base URL that looks like fancy-badger.twil.io , the path is used to differentiate between the Functions you create for your account. I’ll name mine “IT Support Hotline” and give it the path “/it-support”. You can give yours other values but make sure to replace it accordingly throughout the post.

Choose for Event in the Configuration section “Incoming Voice Calls” as this is the event we will use this Function for. Let’s start by greeting the caller with “Hello IT”. We’ll choose a British accent since we don’t have an Irish one. So your hotline will sound a bit more like Moss answering than Roy. Change the commented line to the following code: