13 February 2021
The New York Times recently produced an awesome article series called Primal Scream, where a published phone number allowed readers to call in and talk about their experience raising children during the pandemic.
Listening to your readers, however you can, is crucially important in evolving your delivery of digital journalism. Entire consultancies such as Hearken are built on involving communities in business, especially journalism. City Bureau in Chicago bring people together in workshops to discuss the problems they are facing, ultimately producing media that is more honest, more involving, and crucially more desired.
But how do you do that when you're a national newsroom at scale? Or even at the scale of a single city? How can we use technology to make it easier than ever for readers to get in touch with journalists and becoming involved in our storytelling.
Whilst years ago running a phone in line like this was something that only the largest newsrooms with the deepest pockets could accomplish, advances in digital technologies have made creating the Primal Scream phone line possible for even the smallest reporting outfits.
Recording hundreds of voicemails to a dedicated phone number could cost you as little as $20. It requires very little technical knowledge, and just a few short steps to get everything up and running.
We used the same technology when I worked for The Times for our NHS memories project. Hearing the voices of readers telling their own stories adds impact that a typical written interview wouldn't have. Primal Scream I think shows that impact in a whole new way.
Basically we have a company called Twilio to thank for this. Twilio bring all that complexity in call-centres and telecoms networks and make it accessible and programmable over simple control panels. Fortunately what we'll be asking it to do is very easy to follow, and you don't need to know any code to get started.
There are three main parts to this project. You're going to need to set up two things: a phone number, and a handler function for calls to that number. And you will need to record one piece of audio to upload that will act as your voicemail greeting.
Let's get going:
Functions Classic
. The new Services
feature doesn't support what we need to do yet. Click the red plus and give this any name you want voicemail-recorder
for example.Runtime->Assets
. Select Assets (Classic)
in the sidebar, and upload your file. Make sure it's public. Once it's uploaded select the URL in the PATH
field and save it somewhere, you'll need this in a moment.Functions Classic
menu, and open your function. Let's give it a PATH
like /voicemail
(this must start with a slash). Underneath in the configuration field make sure Access Control
is disabled, select the Event
to be Incoming Voice Calls
, and then in the Code
box enter the following. Make sure to put your saved asset URL in!exports.handler = function (context, event, callback) {
const twiml = new Twilio.twiml.VoiceResponse();
twiml.play("YOUR FILE"); // Put your asset URL in this between the quote marks
twiml.record({
timeout: 10, // The number of seconds of silence to wait before hanging up
transcribe: false, // Change this to true if you want Twilio to try to transcribe your recordings ($)
maxLength: 300, // This is the maximum length that the audio recording can be.
playBeep: true, // This tells the function to play a bleep after your message or not.
});
twiml.hangup();
callback(null, twiml);
};
Voice & Fax
options. Select Accept Incoming
and check it's set only to Voice Calls
. Then where it reads A call comes in
change the first option in the drop down menu to Function
, and now in the Service
menu that appears to the right, select default
, and from the Function path
menu, your path.Calls log->Incoming
menu of your phone number.If you have questions, or can't get it working, give me a tweet and I'll see if I can help you out.
It is possible for a hostile actor to attack you by repeatedly calling your number and leaving long messages. Though they will not be able to block legitimate contributors, they can cost you money, and they can cost you time in sifting through the results.
It is also possible for your fun experiment to turn into $1 a month forever unless you turn off your phone number at the end of the project. Make sure to remove any reference to the phone number from your reporting at this point, as otherwise it is possible for another actor to potentially take over the number.