question

John Gladson Moses avatar image
John Gladson Moses asked Phong Vu answered

I need the recent call data from call History after the call is ended

Hi,


We are facing an issue - missing call data like duration etc after the call is ended. We are suggested by RC to get the data from phone.callHistory.calls after the call is ended.


I like to know when will [event/component/function] the call data be updated to phone.callHistory.calls after the call is ended and in which component/event/function I need to fetch the detail.


note: As per my analysis, the data is updated after "webphone.onCallEnd" & near to the case statement "case 'rc-call-end-notify':" in event "_onMessage" in component "Adapter". However, in the "_onMessage" I could not able to access the "phone" [could not fetch the data].


Anyone/@Embbnux Ji Please advise.


Thanks

John Gladson Moses

phone
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered

I don't know where do you look at. In my test, I see all the inbound/outbound call in the history (almost instantly after a call is disconnected. If you want to receive telephonyStatus programmatically, add this JS code to your web page

window.addEventListener('message', (e) => {
  const data = e.data;
  if (data) {
    switch (data.type) {
      case 'rc-telephony-session-notify':
        console.log("SESSION")
        console.log(JSON.stringify(data.telephonySession))
        break
      default:
        console.log("OTHERS...")
        console.log(JSON.stringify(data))
        break;
    }
  }
});

screen-shot-2020-11-09-at-103705-am.png


1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys