How to download the call recordings for the given conversation ID

I am able to run the API Call /api/v2/conversations/{conversationId}/recordings?maxWaitMs=20000&formatId=WAV HTTP/1.1
Host: api.mypurecloud.com
Authorization: Bearer *******************
Content-Type: application/json

I need to know how to interpret the data and download it as a wav file.

The response for GET /api/v2/conversations/{conversationId}/recordings documents that each recording will have a mediaUris property. Use whatever code is appropriate for your programming language for downloading files from those URIs.

Thank you, Tim. I am able to get the recordings, but I am getting either the agent side recording or the customer side recording. Is there an API which gives me the complete conversation recording of both agent and customer combined?

Hello Somagk,

The reason you get two files is because your Sip trunks are set to Dual Channel. Try :

  • Use the batch api instead /api/v2/recording/batchrequests. (This is significant slower designed for big export)

or

  • Set trunks to single channel

or

  • You can use a python 3rd party library to merge the files after download and create one audio file.

Best Regards
OT

Hi @somagk ,
Our setup is also dual channel set to OPUS, and I am able to download a single file using the API. I am using the job API’s to download as OPUS and then I use tools like ffmpeg to convert to wav.

Hope this helps, unless you have found a way already to get what you want.
Regards

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.