Skip to main content

Hi,


I am trying to access call logs as per the blog post (the end purpose being to identify call waiting times)


RingCentral
Telephony Session Events Notifications | by Phong Vu | RingCentral Developers |
Medium


However when I use the api I get no records.


I just wanted to
check if there was any different settings I should be using.


Below are the inputs
I have presented


Get : https://platform.ringcentral.com/restapi/v1.0/subscription?/restapi/v1.0/account/{accountId}/telephony/sessions


Authorization: bearer plus access token



Accept: application/json

I don't know where and how you learn about that "Get" endpoint, but that is completely a wrong endpoint.

To subscribe for event notifications, you need to make a POST request to this endpoint with specified event filters. That was what I mentioned in the article.

Telephony session event notifications

RingCentral platform supports PubNub notification and Webhook notification frameworks. You can register for receiving notifications of many types of events, and for the telephony session event type, use can choose one of the following event filters:

  • Account level: “/restapi/v1.0/account/{accountId}/telephony/sessions”
  • Extension level: “/restapi/v1.0/account/{accountId}/extension/{extensionId}/telephony/sessions”

Using the account level filter, you will be able to receive telephony session events of all the extensions under that account. And using the extension level, you will be able to receive telephony session events of a particular extension specified by the extension id. If you want to receive telephony session events of more than one extension, but not all the extensions under the account, you can specify an event filter array as show below:

var eventFilters = [
"/restapi/v1.0/account/~/extension/11111111/telephony/sessions",
"/restapi/v1.0/account/~/extension/22222222/telephony/sessions",
"/restapi/v1.0/account/~/extension/33333333/telephony/sessions"
]

Reply