The Record verb is used to record a call. In the example below, the it records the call as soon as the call gets answered. The callback then gets prints in the terminal in which you can access the recording by going to the recording URI.

Use Cases

Use Case BXML Code
Call centers: A customer can call in and a recording will play. The call will then be transfered to the first available tenant. Add multiple phone numbers(<PhoneNumber>+15552221234</PhoneNumber>)
Appointment reminders: If a customer would like to reschedule, you can transfer their call to the scheduling office The code will be the same as the example
Operator: Often times customers can press 0 to be connected to an operator. The code would need to collect digits then transfer to an operator if 0 is pushed


Change the baseUrl parameter. The recording will be sent to the callback URL: baseUrl + /recordResponse.

const baseUrl = ``;
const CALL_EVENTS = '/call-events';

const handleAnswerEvent = (req, res) => {
    if (req.query.eventType !== 'answer') {
    const bxml = `<?xml version="1.0" encoding="UTF-8"?>


                  <Record requestUrl="${baseUrl + '/recordResponse'}"></Record>



app.get(CALL_EVENTS, handleAnswerEvent);

app.get("/recordResponse", (req, res) => {

results matching ""

    No results matching ""