question

jeff-secord3581 avatar image
jeff-secord3581 asked jeff-secord3581 commented

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

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

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.

ak avatar image
ak answered
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
1 |3000

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

jeff-secord3581 avatar image
jeff-secord3581 answered
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]
1 |3000

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

ak avatar image
ak answered
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. 
1 |3000

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

jeff-secord3581 avatar image
jeff-secord3581 answered
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"
1 |3000

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

ak avatar image
ak answered
Added the permission. Please make sure you test the permission in sandbox environment first. 
1 |3000

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

jeff-secord3581 avatar image
jeff-secord3581 answered jeff-secord3581 commented
Thanks, I can see the permission.

Now it shows: [SubscriptionWebhook] application permission is required for [WebHook]
2 comments
1 |3000

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

ak avatar image ak commented ·
We have added the [SubscriptionWebhook]  permission as well. 
1 Like 1 ·
jeff-secord3581 avatar image jeff-secord3581 commented ·
All good. thanks a lot
0 Likes 0 ·

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