Visual voicemail with automatic transcription and tap to listen

Aeneas Wiener
Aeneas Wiener
Published in
5 min readAug 29, 2020

--

If you have repeatedly found yourself wasting time dialling into your network provider’s archaic interactive voicemail system, you will be familiar with excruciating sounds like

You have 30 new voicemail messages. Message from […] received on the 13th of September, 2020, at 13 hours, 12 minutes, and 13 seconds. To listen to your message again please press 1, to call the sender press 2, to never hear it again, press 3…

After spending minutes painfully going through messages you don’t care about, you know that technology owes you something better in 2020 and beyond.

The original iPhone promised us visual voicemail in 2007. I was blown away by it. Finally, here was a way to see all voicemail messages in a list (like incoming emails) and be able to tap on them to hear them. Unfortunately, even 10 years after the launch of the iPhone, this feature is still not available on all networks, including Three in the UK. And in any case, would it not be great if messages were not just there to listen to, but also transcribed into text? Because reading a keyword that screams unsolicited phone call takes 20 milliseconds, whilst listening to the full message around it takes 20 seconds.

All incoming voicemail messages will be transcribed and the text will be sent to you as a text message, alongside the number of the caller you can tap to dial back, and a link to the audio file you can tap to play

Below I will show you how you can set this up thanks to the power of powerful modern API platforms, no-code programming technology, and a 90s style dial-this-special-number-to-set-up-call-forwarding feature offered by your network provider.

By the end of it you will have a setup where any call that doesn’t reach you (either because your phone was off, or because you sent it to voicemail) will receive a custom greeting of your choice, and anything the callers say after the beep will be recorded. A transcript of this recording will be sent to you via text message, alongside their phone number which you can tap to call back, and a link to an audio file so you can hear what they said.

Doesn’t that feel more like 2020? And of course you will be able to configure the voicemail greeting to your liking. Because just as Larry Page told the original Google Maps entrepreneurs “we like the web” when they presented him with a clunky desktop app, now your voicemail greeting will be able to proudly proclaim: “ I like email”:

Hello! Welcome to my voicemail service. I like email. If we have spoken before and you are able to contact me by email please do so. Otherwise please leave your message after the tone and (if required) I will get back to you as soon as possible. Thank you.

The steps are outlined below in broad strokes. I haven’t shown all the configuration details. I suggest that as you go through it you have a look at the documentation to know what all the various parameters mean so that you can customise them to your liking. I am only showing very high level what the steps are to get this set up.

Step 1: Sign up for a Twilio account at https://www.twilio.com

We will use Twilio to create a new (virtual) phone number to receive all voicemail calls we forward to it. We will then use Twilio’s no-code builder to create an application that reads out a custom greeting any time this virtual Twilio number receives a call, and then after the beep records what they say.

The recorded messages will be transcribed to text by Twilio and forwarded to a JavaScript function (we create in their function as a service environment.) This JavaScript function (written in NodeJS,) will send a text message to your own phone number containing three things (shown in the image above): the transcript of the recorded voicemail message left by the person who called, the caller’s number, and a link to the audio recording so we can tap to listen in case the transcription wasn’t clear enough.

Step 2: Buy a virtual phone number

We will need this number so we can forward all calls you send to voicemail to this number. We can buy this virtual phone number by logging into the twilio dashboard, and then click on SUPER NETWORK > Phone Numbers.

Step 3: Use Twilio Studio to create the phone answering flow

This step is the most complicated. We will need to click around in the documentation a bit to get familiar with things. In broad strokes, we use Twilio Studio to set up your voicemail greeting using their “Say/Play” action, and then link it to a call recording action using their “Record Voicemail” step. After we are done, our canvas should look a bit like the below.

The the phone answering flow

Step 4: Link your Twilio phone number to your Twilio Studio flow

Link our Twilio phone number (purchased in Step 2) to the flow we created in Step 3. This works by selecting from the relevant drop-down menu of the configuration of the phone number as shown below.

Link your virtual Twilio phone number to your Twilio Studio flow

Step 5: Create a function to text the voicemail transcription to your mobile

We navigate to the Twilio Functions service by clicking on RUNTIME > Functions in the sidebar. There, we create the a function used to text the result of the voicemail transcription callback from Step 4 to our own mobile number.

Create a function to text the voicemail to your mobile

The NodeJS code for this function for copy paste is below (we must remember to replace the phone number place holders with our own numbers.)

exports.handler = function(context, event, callback) {
context.getTwilioClient().messages.create({
to: '+YOUR_MOBILE_NUMBER',
from: '+YOUR_TWILLIO_NUMBER',
body: event.TranscriptionText + "\n " + event.From + "\n " + event.RecordingUrl
}).then(msg => {
callback(null, msg.sid);
}).catch(err => {
console.log(err)
callback(err)
});
};

Once we have created this function, we copy the path of the function (highlighted in red in the image above) into the Record Voicemail action in Twilio Studio (created in Step 3.) We click on that action and enter the function path into the field called Transcription Callback URL (highlighted in red in the image below.) This links our Twilio Studio flow to our function.

Step 7: Configure mobile phone network to forward voicemail to your virtual Twilio number

Finally we need to configure our mobile phone network to forward voicemail to our virtual Twilio number instead of our provider’s own voicemail service.

For Three UK (see link), the way this can be done is by dialling the following three numbers on our handset (we must remember to replace the placeholder with our virtual Twilio phone number):

**61*YOUR_TWILIO_NUMBER#
**62*YOUR_TWILIO_NUMBER#
**67*YOUR_TWILIO_NUMBER#

Step 8: That’s it. Time to enjoy our new voicemail superpowers!

--

--