Question

How to filter the callRecord using sessionId?

  • 21 September 2022
  • 1 reply
  • 285 views

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 reply

Userlevel 1

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"

Reply