Getting Started with Recording

Plivo provides you the ability to record both outgoing calls from and incoming calls to Plivo. You can choose to record the entire call or record only specific portions of the call. The recording can be initiated by using either an API or using Plivo XML.

We already know how to make calls and how to handle incoming calls, we will now look at recording an entire call using Plivo XML and using the API.

Recording a call using the API

You can record an ongoing call using the Record API of calls. If you need to record the call from start, call the Record API immediately after the conference is created. It is recommended to use a Record XML element if you are creating your conference using an XML.

Recording a conference using the API

You can record an ongoing call using the Record API of conferences. If you need to record the call from start, call the Record API before rendering the XML on your answer_url.

Recording a call using Plivo XML

To record a call, we just need to add an record element to the XML which is used to control the call flow. This will ensure that the call will be recorded.

For example, consider the following XML.

1
2
3
4
5
6
<Response>
    <Record action ="http://c3bb61b6.ngrok.io/record_action/" redirect="false" startOnDialAnswer="true" maxLength="14400" />
    <Dial callerId="1415xxxxxxxx">
        <Number>number_to_be_called</Number>
    </Dial>
</Response>

Once this XML is successfully fetched from the answer_url it will be executed. The Record element records the call that is being dialled by the Dial tag.

Accessing created recordings

The recording URL will be POSTed to the URL specified in the action attribute of Record XML or the API request as soon as the recording is completed. You can use this URL to access the recording.

You can also retrieve the created recordings at a later point of time in two ways.

  • From Recordings section in the Plivo Dashboard
  • Using our Recordings API Endpoint. This allows you to list and manage all the recordings in your account.