Solved

How to subscribe to Message and VoiceMail events at account level?

  • 26 January 2023
  • 2 replies
  • 211 views

We have multiple extensions and numbers and we would like to subscribe to message and voicemail event for all extensions. Is there any way we can do this at account level?


Any help is highly appreciated.

icon

Best answer by Phong1426275020 26 January 2023, 16:44

View original

2 replies

Userlevel 1

There is no account level for SMS and Voicemail message notifications (even with reading). However, as a super admin role, you can subscribe for SMS and Voicemail event notification for other user extensions. You will need to read extensions to get the extension id of all or particular extensions you want to get notifications, then subscribe for the subscription with an array of event filters for the user extensions as shown in the example below.

var eventFilter = [
    /restapi/v1.0/account/~/extension/{extId-1}/voicemail,
    /restapi/v1.0/account/~/extension/{extId-2}/voicemail,
    /restapi/v1.0/account/~/extension/{extId-n}/voicemail,
    ...
    /restapi/v1.0/account/~/extension/{extId-1}/message-store/instant?type=SMS,
    /restapi/v1.0/account/~/extension/{extId-2}/message-store/instant?type=SMS,
    /restapi/v1.0/account/~/extension/{extId-n}/message-store/instant?type=SMS
]

Thanks for your help! I appreciate.

Reply