News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
How to detect and remove duplicate recordings within the same call record
Tags: phone
Apr 29, 2019 at 1:08pm   •   0 replies  •  0 likes
matt-spinks

When inspecting some call records, I've noticed that there are sometimes duplicate recordings. Here is an example (I've removed some extra data to make is easier to read):


{   "id": "DkFXDQocJi8hjUA",   "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/call-log/DkFXDQocJi8hjUA?view=Detailed",   "sessionId": "172335211023",   "type": "Voice",   "direction": "Inbound",   "action": "Phone Call",   "result": "Accepted",   "startTime": "2019-04-27T13:18:10.463Z",   "duration": 28,   "lastModifiedTime": "2019-04-27T13:18:46.132Z",   "transport": "PSTN",   "from": {    "phoneNumber": null,    "extensionNumber": "143",    "location": null,    "name": "Ana Jorge",    "device": null   },   "to": {    "phoneNumber": null,    "extensionNumber": "104",    "location": null,    "name": null,    "device": null   },   "recording": {    "id": "985541334023",    "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/recording/985541334023",    "type": "Automatic",    "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/314176022/recording/985541334023/content"   },   "message": null,   "billing": {    "costIncluded": "0.000",    "costPurchased": "0.000"   },   "legs": [{    "id": null,    "uri": null,    "sessionId": null,    "type": "Voice",    "direction": "Outbound",    "action": "VoIP Call",    "result": "Call connected",    "startTime": "2019-04-27T13:18:10.462Z",    "duration": 28,    "lastModifiedTime": null,    "transport": "VoIP",    "legType": "SipToPstnMetered",    "extension": {     "id": "62481118023",     "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/extension/62481118023"    },    "from": {     "phoneNumber": null,     "extensionNumber": "143",     "location": null,     "name": "Ana Jorge",     "device": {      "id": "800571597022",      "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/device/800571597022"     }    },    "to": {     "phoneNumber": null,     "extensionNumber": "104",     "location": null,     "name": "Jason Miller",     "device": null    },    "recording": {     "id": "985541333023",     "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/recording/985541333023",     "type": "Automatic",     "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/314176022/recording/985541333023/content"    },    "message": null,    "billing": null   }, {    "id": null,    "uri": null,    "sessionId": null,    "type": "Voice",    "direction": "Outbound",    "action": "VoIP Call",    "result": "Call connected",    "startTime": "2019-04-27T13:18:18.204Z",    "duration": 19,    "lastModifiedTime": null,    "transport": "VoIP",    "legType": "PstnToSip",    "extension": {     "id": "314180022",     "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/extension/314180022"    },    "from": {     "phoneNumber": null,     "extensionNumber": "143",     "location": null,     "name": "Jason Miller",     "device": {      "id": "800865565023",      "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/device/800865565023"     }    },    "to": {     "phoneNumber": "+15619827939",     "extensionNumber": "104",     "location": "Boca Raton, FL",     "name": null,     "device": null    },    "recording": {     "id": "985541334023",     "uri": "https://platform.ringcentral.com/restapi/v1.0/account/314176022/recording/985541334023",     "type": "Automatic",     "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/314176022/recording/985541334023/content"    },    "message": null,    "billing": null   }]  }


As you can see, there are 3 recordings listed:


985541334023 (from the main call record)

985541333023 (from the first leg)

985541334023 (from the last leg)


Two of those ids are identical (the main call record and the last leg), so I know that those two are duplicates automatically. However, the recording from the first leg has a different recording id. And upon checking, these two recordings are the same (at least from listening to them). Why does this happen? And, more importantly, is there a way to detect these duplicates from the api? Or am I going to have to do a byte comparison on my end to determine if they are duplicates or not?





A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us