Skip to main content

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!

You can use this ones

Extension level:

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

Account level:

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

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



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'

Reply