News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Obtaining real-time presence updates
Tags: presence
Jun 17, 2021 at 11:02am   •   2 replies  •  0 likes
Andrew Prokop

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!

2 Answers
answered on Jun 18, 2021 at 6:19am  

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']



 0
on Jun 18, 2021 at 8:37am   •  0 likes

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'
] 
on Jun 18, 2021 at 12:16pm   •  0 likes

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

on Jun 18, 2021 at 12:30pm   •  0 likes

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.

answered on Jun 17, 2021 at 3:06pm  

You can use this ones

Extension level:

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

Account level:

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

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us