Company
Date Published
Author
Nahuel Sznajderhaus
Word count
1562
Language
English
Hacker News points
None

Summary

Twilio Studio and Functions are serverless products that can be used to build Interactive Voice Response systems (IVRs) and record incoming voice calls. To implement call recording as custom functionality, a Flow is created in Studio, which triggers an outbound flow via a REST API request or an incoming call, and then a Twilio Function is written in JavaScript to make a POST request to the recording resource for a given call, starting the recording process. The Flow includes a Say/Play widget that reads an introductory message to the customer, activating the call and ensuring media flows, before calling the Run Function widget to run the recording function, which uses the got library to make the HTTP request to Twilio's API. With this setup, incoming phone calls can be recorded for learning purposes or for legal reasons, complying with laws and regulations regarding consent to record.