question

Andrew Prokop avatar image
Andrew Prokop asked ·

Obtaining real-time presence updates

I am struggling to find the subscription filter to receive presence information. What I want is when user changes state (e.g. Available to Busy) and telephony information (incoming call, call answered, etc.). I have an engine working for SMS and Fax, but presence baffling me. This is what I have for my filter:


eventFilters: ['/restapi/v1.0/account/~/extension/~/message-store/instant?type=SMS', '/restapi/v1.0/account/~/extension/~/fax?direction=Inbound', '/restapi/v1.0/account/~/presence', '/restapi/v1.0/account/~/telephony/sessions', '/restapi/v1.0/account/~/extension/~/telephony/sessions', '/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true', '/restapi/v1.0/account/~/extension/~/presence'],

What should I be using? Thanks!

presence issue
1 |1500 characters needed characters left characters exceeded

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

Phong Vu avatar image
Phong Vu answered ·

You can use this ones

Extension level:

'/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true'

Account level:

'/restapi/v1.0/account/~/presence?detailedTelephonyState=true'
1 |1500 characters needed characters left characters exceeded

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

Andrew Prokop avatar image
Andrew Prokop answered ·

My webhook is still not invoked when I call the extension or main number associated with my account. The phone rings, I can answer the call, but my code is not invoked. Here is my current list of filters. As before, my webhook is invoked when I text to my number.


eventFilters: ['/restapi/v1.0/account/~/extension/~/message-store/instant?type=SMS', '/restapi/v1.0/account/~/extension/~/fax?direction=Inbound', '/restapi/v1.0/account/~/presence', '/restapi/v1.0/account/~/telephony/sessions', '/restapi/v1.0/account/~/extension/~/telephony/sessions', '/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true', '/restapi/v1.0/account/~/extension/~/presence', '/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true', '/restapi/v1.0/account/~/presence?detailedTelephonyState=true']


3 comments
1 |1500 characters needed characters left characters exceeded

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

It's redundant to subscribe for both user and account levels for the same type of event. Also, the presence event notification with the detailedTelephonyState=true' will give you basic presence status info and telephony status info. I believe that during testing, you might create and subscribe for notification several times (every time you run your code), you might end up in running out of subscription limit (20 max). So do read existing subscription and delete them before you create a new one.

eventFilters: [
'/restapi/v1.0/account/~/extension/~/message-store/instant?type=SMS',
'/restapi/v1.0/account/~/extension/~/fax?direction=Inbound',
'/restapi/v1.0/account/~/presence',
'/restapi/v1.0/account/~/telephony/sessions',
'/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true'
] 
0 Likes 0 ·

I got it! I needed to go back into the application and change the scope! Lesson learned. Thanks for your assistance.

0 Likes 0 ·

Not sure what is going on with your code or your settings. I just test to make sure webhook notification works on presence and it works well for me. If you want to jump on a call, email me.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 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