Best way to retrieve active calls without making request each second?

  • 1
  • Question
  • Updated 10 months ago

We need to create a monitor that will show any income calls in our extranet in live time.

We were able to show active calls by using "/account/~/extension/~/active-calls", however, to achieve what we need we would need to make a request each second which I guess will be blocked by rate limits.

Is there a better solution for it?

Thanks
Photo of Jeff Secord

Jeff Secord

  • 214 Points 100 badge 2x thumb

Posted 10 months ago

  • 1
Photo of AK

AK, Official Rep

  • 4,382 Points 4k badge 2x thumb
Jeff,

You can setup Subscription using RingCentral API's and receive push notifications on inbound/outbound calling activity. 

Kindly take a look at our previously answered developer community article here for more information:
Using Push notifications on RingCentral

- AK
Photo of Jeff Secord

Jeff Secord

  • 214 Points 100 badge 2x thumb
I've tried to created a subscription, however, that's what I'm getting back: [ReadPresence] application permission is required for the following event filter: [/restapi/v1.0/account/~/extension/~/presence]
(Edited)
Photo of AK

AK, Official Rep

  • 4,382 Points 4k badge 2x thumb
You would need to add the permission [ReadPresence] on your application. To add the permission kindly login to https://developer.ringcentral.com using your Developer Account or Main Company number credentials and navigate to:

App-> Settings -> Under OAuth Settings -> Permissions Needed -> Add [ReadPresence] permission

Also, please note that the event filter you have provided above looks incorrect. You are supposed to pass in the extension number for the particular extension you wish to set up push notification for. 

You can look at Get Extension API endpoint for more information :
GET /restapi/v1.0/account/{accountId}/extension

https://developer.ringcentral.com/api-explorer/latest/index.html#/!/Company_Contacts/listExtensions

If you are unable to add the permission, kindly provide the app name and I can add the permission on your app. 
Photo of Jeff Secord

Jeff Secord

  • 214 Points 100 badge 2x thumb
Following the path you mentioned it shows: Information is not editable after you have applied for production. 

I guess its because my app is already in production.

No worries about the path, I'm using correctly, only for the post I replaced with "~".

Could you please add it for us? App name: "StripCurtains Extranet with message"
Photo of AK

AK, Official Rep

  • 4,382 Points 4k badge 2x thumb
Added the permission. Please make sure you test the permission in sandbox environment first. 
Photo of Jeff Secord

Jeff Secord

  • 214 Points 100 badge 2x thumb
Thanks, I can see the permission.

Now it shows: [SubscriptionWebhook] application permission is required for [WebHook]
Photo of AK

AK, Official Rep

  • 4,382 Points 4k badge 2x thumb
We have added the [SubscriptionWebhook]  permission as well. 
Photo of Jeff Secord

Jeff Secord

  • 214 Points 100 badge 2x thumb
All good. thanks a lot