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 filter the callRecord using sessionId?
Tags: rest api, call logs
Sep 21, 2022 at 4:04am   •   1 replies  •  0 likes
Fazaldhar M

I use an embeddable method to integrate ring central to my web app.

In an "rc-call-end-notify" event, I get

call: {
 "partyData": {
    "partyId": "p-123",
    "sessionId": "s-123"
  },
}

I am trying to fetch the call log using the sessionId.

First, I tried to get the call logs using the API

https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log

I get the same sessionId "s-123' under "telephonySessionId" key in the response.

Then, i tried to filter out with the "s-123' using an API

https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?sessionId=s-123

Which says,

{
  "errorCode": "InvalidParameter",
  "message": "Parameter [s-123] value is invalid.",
  "errors": [
    {
      "errorCode": "CMN-101",
      "message": "Parameter [s-123] value is invalid.",
      "parameterName": "s-123"
    }
  ],
  "parameterName": "s-123"
}


What should be corrected here?

1 Answer
answered on Sep 21, 2022 at 9:46am  

The name 'sessionId' in the partyData object is misleading. It is in fact, the 'telephonySessionId' and it cannot be used to search for a call record from the call log.

You should catch the ''rc-telephony-session-notify' event, and parse the event payload to get the correct 'sessionId' and use it to search for the call record from the call log.

The correct sessionId is something like this

sessionId : "914670386016"

 0



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