How to Fetch/Download Call Recording ?

  • 1
  • Idea
  • Updated 3 years ago
  • (Edited)
In the Call-log record with the call recordings, you will receive a JSON object (eg. shown below)  as a response. 

 {
    "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131192004/extension/131192004/call-log/AQzAuLAK8iIyJqo?view=Simple",
    "id" : "XXXXXXXXXXXX",
    "sessionId" : “XXXXXXXXXXXX",
    "startTime" : "2015-11-03T07:19:14.000Z",
    "duration" : 45,
    "type" : "Voice",
    "direction" : "Outbound",
    "action" : "RingOut Web",
    "result" : "Call connected",
    "to" : {
      "phoneNumber" : "XXXXXXXXXXXX",
      "name" : "Sample Announcement",
      "location" : "San Mateo, CA"
    },
    "from" : {
      "phoneNumber" : "XXXXXXXXXXXX",
      "name" : "XXXXXXXXXXXX"
    },
    "recording" : {
      "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131192004/recording/1254026004",
      "id" : "1254026004",
      "type" : "Automatic",
      "contentUri" : "https://media.devtest.ringcentral.com:443/restapi/v1.0/account/131192004/recording/1254026004/content"
    }
  }



Use the Content URI  to make a get request  to fetch/download  call recording. 

"contentUri" : "
https://media.devtest.ringcentral.com:443/restapi/v1.0/account/131192004/recording/1254026004/content"   

As we are rapidly changing and constantly improving  and enhancing the performance of APIs responses, we use  Streaming Media Server to allow you to download call recordings 24 * 7 , we allow you to do this via the above URI.

The /account/recording API will be deprecated in the future releases and thus making it inaccessible.  
Photo of VB

VB, Official Rep

  • 1,410 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Riley Clegg

Riley Clegg

  • 200 Points 100 badge 2x thumb
I am attempting to obtain the call recording content for a call that occurred on 11/12/15 but this uri returns a blank wav file. Is this only for new recordings / recordings post a certain datetime?

-Dan
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,622 Points 5k badge 2x thumb
Is the call duration longer than 45 seconds? (I believe that is the threshold for call recordings to be kept/available...it is either 30 or 45 seconds)
Photo of John Wang

John Wang, Official Rep

  • 5,278 Points 5k badge 2x thumb
To download the recording via the URI specified in the contentUri property, you will need to send a valid OAuth access token in the HTTP request. The access token needs to be sent either (a) in the "Authorization" header or (b) as part of the query string using the "access_token" parameter. Our SDKs will automatically add the access token for you and can also generate a URL with the access token appended as a query string parameter for you to use elsewhere. More is discussed in the documentation here:

https://developer.ringcentral.com/api-docs/latest/index.html#!#Authentication.html

Additionally, call recordings for calls under 500 ms are not stored. If the call is longer than 500 ms you should be able to retrieve the call via the contentUri with the a valid access token. If you are still unsuccessful, please open a support case.

The recording API itself will not be deprecated, but the "platform" content URI hostname is deprecated and will be replaced by "media" for all customers in the future. If you are using the URI as is, you will have no issues, however, if you are truncating and rebuilding the URI, you should be aware of this.
(Edited)