question

GEQ API avatar image
GEQ API asked GEQ API commented

Detecting 'missed' calls for call queue members

Is there a way to detect if a call queue member did not answer a call when it rang their extension, even when another member answers the call?

The goal is to detect when a call comes inbound to one of our call queues, we would like to kick anyone out of the queue who has their phone ring from the queue, but does not answer the call. I've been trying to do this with event notification subscriptions, but with testing it doesn't seem to detect that the initial call queue member that received the call notification but did not answer. It simply proceeds to the next member and if they answer, the call status goes to an answered status for them.

call handlingcall queuescall monitoring
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered GEQ API commented

First of all, if a queue member does not pick up an incoming call, that call is not necessarily a missed call, because the call queue will ring the next members, and it can ring that member again if the queue is set "rotating".

You can detect if a member does not pick up a call by using the telephony session event notification, parse the event payload and check the the call status and reason. See the example events below:

// Member's phone ringing
{
    "uuid": "6532554610789882711",
    "event": "/restapi/v1.0/account/80964xxxx/extension/6229532xxxx/telephony/sessions",
    "timestamp": "2022-07-05T16:18:46.971Z",
    "subscriptionId": "54963e56-ff62-46b7-8953-18b9ee0e0b3f",
    "ownerId": "6228832xxxx",
    "body": {
      "sequence": 5,
      "sessionId": "860357227016",
      "telephonySessionId": "s-a0d7bd0254c3cz181cf282236z3cab8d40000",
      "serverId": "10.13.123.208.TAM",
      "eventTime": "2022-07-05T16:18:46.939Z",
      "parties": [
        {
          "accountId": "80964xxxx",
          "extensionId": "62295327016",
          "id": "p-a0d7bd0254c3cz181cf282236z3cab8d40000-3",
          "direction": "Inbound",
          "to": {
            "phoneNumber": "+1209248xxxx",
            "name": "demo queue",
            "extensionId": "6249888xxxx"
          },
          "from": {
            "phoneNumber": "+1650513xxxx",
            "name": "demo queue - SAN MATEO    CA"
          },
          "status": {
            "code": "Proceeding",
            "rcc": false
          },
          "queueCall": true,
          "park": {},
          "missedCall": false,
          "standAlone": false,
          "muted": false,
          "uiCallInfo": {
            "primary": {
              "type": "QueueName",
              "value": "demo queue"
            },
            "additional": {
              "type": "CallerIdName",
              "value": "SAN MATEO    CA"
            }
          }
        }
      ],
      "origin": {
        "type": "Call"
      }
    }
}

// Member did not answer the call
{
    "uuid": "6651780260135284845",
    "event": "/restapi/v1.0/account/80964xxxx/extension/6229532xxxx/telephony/sessions",
    "timestamp": "2022-07-05T16:19:02.018Z",
    "subscriptionId": "54963e56-ff62-46b7-8953-18b9ee0e0b3f",
    "ownerId": "6228832xxxx",
    "body": {
      "sequence": 6,
      "sessionId": "860357227016",
      "telephonySessionId": "s-a0d7bd0254c3cz181cf282236z3cab8d40000",
      "serverId": "10.13.123.208.TAM",
      "eventTime": "2022-07-05T16:19:01.942Z",
      "parties": [
        {
          "accountId": "80964xxxx",
          "extensionId": "6229532xxxx",
          "id": "p-a0d7bd0254c3cz181cf282236z3cab8d40000-3",
          "direction": "Inbound",
          "to": {
            "phoneNumber": "+1209248xxxx",
            "name": "demo queue",
            "extensionId": "6249888xxxx"
          },
          "from": {
            "phoneNumber": "+1650513xxxx",
            "name": "demo queue - SAN MATEO    CA"
          },
          "status": {
            "code": "Disconnected",
            "reason": "AgentDropped",
            "rcc": false
          },
          "queueCall": true,
          "park": {},
          "missedCall": false,
          "standAlone": false,
          "muted": false,
          "uiCallInfo": {
            "primary": {
              "type": "QueueName",
              "value": "demo queue"
            },
            "additional": {
              "type": "CallerIdName",
              "value": "SAN MATEO    CA"
            }
          }
        }
      ],
      "origin": {
        "type": "Call"
      }
    }
}

I don't understand your use case of "kicking out queue members if they don't answer the call" though.

3 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.

GEQ API avatar image GEQ API commented ·

Thank you, I was able to figure this out after enough testing. The use case is basically we don't want agents who are missing calls sitting in our queues since they rotationally ring. It makes the customer wait longer for an agent who actually answers. I've got it figured out now and your answer is what the app is doing now.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ GEQ API commented ·

That's great!

I still don't know what you are doing with those members who could not pick up a call. "Kicking them out" sounds like you want to remove them from the queue. You may want to consider to turn off/on their queue status instead (if that is not what you do now). Check out the call queue presence for more.

https://developers.ringcentral.com/guide/voice/call-routing/manual/call-queues-presence

1 Like 1 ·
GEQ API avatar image GEQ API Phong Vu ♦♦ commented ·

Yes, that is what we are actually doing. Kicking them out was a bit harsh, really we're just disabling their "Accept Queue Calls" flag and keeping them in the queue.

0 Likes 0 ·

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