question

WB - Jennifer Martinson avatar image
WB - Jennifer Martinson asked Phong Vu commented

Subscribing to presence changes but only for users of certain Call Queues

We are currently subscribed to receive presence change notifications. We are doing this because we want to make sure people are staying within those queues when they are available. Ideally though, we are only monitoring this for a handful of call queues, so I would prefer to only subscribe for that subset of users. As it is, I get everybody's updates and then just have to check and see if they are part of my "monitored queues". Is there a way to limit the subscription and provide additional filters for presence change notifications?

presence
4 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.

WB - Jennifer Martinson avatar image WB - Jennifer Martinson commented ·

The answer below is super helpful, but I wonder if we could take it a step further? I am interested in monitoring users who are part of specific Call Queues. Since a Call Queue also has an extension, is it possible to get notifications based upon the Call Queue Extension so that anybody who is currently within that Call queue would have their presence notifications sent to us?

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ WB - Jennifer Martinson commented ·

Unfortunately, there is no such event notification. But there will be coming a new event notification for call queue presence which apps can get notified when a member turns on/off accept calls via a current call queue or not. It will give something like this

"body":{
        "records": [
            {
                "member": {
                    "id": "411753183004"
                },
                "acceptCurrentQueueCalls": true
            },
            {
                "member": {
                    "id": "411753646416541"
                },
                "acceptCurrentQueueCalls": false
            }
        ]
}
0 Likes 0 ·
WB - Jennifer Martinson avatar image WB - Jennifer Martinson Phong Vu ♦♦ commented ·

That's fantastic news! Any ideas when that will be coming out?

0 Likes 0 ·
Show more comments

1 Answer

Phong Vu avatar image
Phong Vu answered

You can first read a call queue members, and use the id of each member (which is the user extension id) to create a list of presence notification filters so you will only receive the presence notification of those members. E.g.

// Response from reading a call queue members
{
  ...,
  "records" : [
    {
      "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/11112222",
      "id" : 11112222,
      "extensionNumber" : "101"
    },
    {
      "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/11113333",
      "id" : 11113333,
      "extensionNumber" : "102"
    }
  ],
  ...
}
// Create a list of user presence notification filter
var evenfilters = 
[
 '/restapi/v1.0/account/~/extension/11112222/presence',
 '/restapi/v1.0/account/~/extension/11113333/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.

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