How do I record an outbound call?

There are two ways to record an outbound call. 

Using record API

The Record API can record live calls at any time during the call. The API returns a URL of a file containing the audio recording. This API also lets you stop the recording at any point. The ability to initiate and stop recordings can be useful for support and sales calls where reviews can help improve business processes. For more details, please see this guide: https://www.plivo.com/docs/api/call/record/#record-a-call 

To get the call_UUID of a live call needed to record the outbound call, please use any of these APIs. 

https://www.plivo.com/docs/api/call/#get-all-live-calls

https://www.plivo.com/docs/api/call/#get-details-of-a-live-call

Using Record XML

The Record XML can be used to record the outbound call by having the XML appended in the answer_URL of the API call. For example, if your call flow is to bridge two numbers or endpoints and then record the call when the second party answers, follow these steps:

  • API call: ‘to’ attribute will contain number 1 
{

“from”: ”15551234535”,

“to”:”15551234556”,

“answer_url”:”http://foo.com/answer/

}
  • When this party answers the call, the answer_URL will be executed. The answer_URL should contain the following XML.
<Response>    

<Record action="http://foo.com/get_recording/" startOnDialAnswer="true" redirect="false" />    

<Dial>        

<Number>15551234567</Number>    

</Dial>

</Response> 
  • The call can be recorded once number 2 answers the call.
Was this article helpful?
0 out of 0 found this helpful
Didn’t find what you are looking for? Create new ticket