question

Nikita Stoliarov avatar image
Nikita Stoliarov asked Phong Vu answered

How to get Detailed Call data right after call (Webhook)?

Hello!

I have a question related to the Webhook payload which I get each time when the call is finished.

I have prepared a Webhook to receive payloads about recent calls just after they have finished. I have two different realizations:

  1. RingCentral built-in Webhook;
  2. Make.com built-in Webhook;

The payload that I receive is not enough, so I want to get more data about time-frames and recording links. Unfortunately, both Webhooks do not give me data callRecordId to get detailed information.

Are there any ways that can help me get full info about calls in real-time?

Thank you in advance!

p.s. There is an example of a Make.com Webhook response provided below:

[
    {
        "extensionId": 42142141,
        "telephonyStatus": "CallConnected",
        "activeCalls": [
            {
                "id": "hffsaf4216sfsaaskap",
                "direction": "Outbound",
                "from": "+11111111111",
                "to": "+22222222222",
                "telephonyStatus": "CallConnected",
                "sessionId": "9142413112",
                "startTime": "2023-09-01T21:30:32.858Z",
                "partyId": "p-a0306c90eeca6z14214122a67e550000-1",
                "telephonySessionId": "s-a0306c423131ad8a52a7a400z1a67e550000"
            }
        ],
        "sequence": 100,
        "presenceStatus": "Busy",
        "userStatus": "Available",
        "dndStatus": "TakeAllCalls",
        "meetingStatus": "Disconnected",
        "allowSeeMyPresence": true,
        "ringOnMonitoredCall": false,
        "pickUpCallsOnHold": false,
        "totalActiveCalls": 1
    }
]


webhookscall logscall recording
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

After getting the event when a call is disconnected, cause a delay for about 10 secs and call the call-log API as follows:

Use the List user call records:

GET /restapi/v1.0/account/~/extension/[extensionId]/call-log?view=Detailed&telephonySessionId=[telephoneySessionId]

Where the extensionId and the telephonySessionId are taken from the event payload.

Or use the List company call records:

GET /restapi/v1.0/account/~/call-log?view=Detailed&telephonySessionId=[telephoneySessionId]


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