question

scdealer avatar image
scdealer asked scdealer commented

call queue name is not being included in webhook events

Hi. I'm subscribed to the below event filter to get live call data

/restapi/v1.0/account/~/telephony/sessions

I remember a couple years back, the webhook that sent these events out included the name of the call queue chosen by the incoming caller. press1 for sales, 2 for payments, 3 for support, etc.

i'm trying to build a real time app that allows us to know what the caller has pressed before we answer the phone. This worked fine a couple years ago since the webhook events used to provide the call queue name.

Fast forward to today. None of the incoming call session events from the webhook provide the call queue that the caller has selected and is waiting in. Am I missing something?

Thanks

webhooks
1 |3000

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

Phong Vu avatar image
Phong Vu answered

What you explained in your question is not a call queue call. It sounds like an IVR option.

Here is an example of a telephony session event of an incoming call to a call queue and you should be able to see the call queue name.

{
  "uuid": "1828384886560605075",
  "event": "/restapi/v1.0/account/80964XXXX/extension/6249888XXXX/telephony/sessions",
  ...
  "body": {
    "sequence": 3,
    ...
    "parties": [
      {
        "accountId": "80964XXXX",
        "extensionId": "6249888XXXX", // Call queue extension id
        "id": "p-a0d7bf2071adez18e3304bdc3z2a513480000-2",
        "direction": "Inbound",
        "to": {
          "phoneNumber": "+1209248XXXX", // Call queue direct number
          "name": "My demo queue", // Call queue name
          "extensionId": "6249888XXXX" // Call queue extension id
        },
        "from": {
          "phoneNumber": "+1650224XXXX"
        },
        "status": {
          "code": "Setup",
          "rcc": false
        },
        ...
      }
    ],
    "origin": {
      "type": "Call"
    }
  }
}

But if you really meant a call to an IVR, then here is an example of a telephony session event of an incoming call to an IVR menu extension.

{
  "uuid": "572214196799892212",
  "event": "/restapi/v1.0/account/80964XXXX/extension/6235322XXXX/telephony/sessions",
  ...
  "body": {
    "sequence": 3,
    ...
    "parties": [
      {
        "accountId": "80964XXXX",
        "extensionId": "6235322XXXX", // IVR extension id
        "id": "p-a0d17b907ef0dz18e331190caz2a569090000-2",
        "direction": "Inbound",
        "to": {
          "phoneNumber": "+1209788XXXX", // IVR direct number
          "name": "Paco IVR", // IVR menu name
          "extensionId": "6235322XXXX" // IVR extension id
        },
        "from": {
          "phoneNumber": "+1650224XXXX",
          "name": "WIRELESS CALLER"
        },
        "status": {
          "code": "Setup",
          "rcc": false
        },
        ...
      }
    ],
    "origin": {
      "type": "Call"
    }
  }
}
1 |3000

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

scdealer avatar image
scdealer answered scdealer commented

Hi Phong. Thanks for your reply. Yes. You were right about the incoming caller dialing into the company main number IVR and then selecting an IVR option. Not calling directly to a call queue. From your example. It looks like the answer is the same either way. That an extensionId is provided that corresponds to an IVR extensionId or call queue extensionId. It seems that you did get me to something that I can make work. My webhook notifications are NOT sending over the IVR menu name or call queue name. After seeing what you posted. I realized that the parties[0].to.extensionId contains an id that corresponds to the call queue name or ivr option that the caller has pressed. I just have to know the name that corresponds to the extensionId that's being provided to solve for the answer. The name and phone never updates and just remains as "Main IVR Menu" throughout all of the event notifications.

Would this be something that is fixable? I did used to get the IVR/Queue name included in my notifications.

Picture below. The extensionId DOES update and correspond to a callQueue that the caller is sent to after they choose an option inside the IVR. The name field never updates and just remains "Main IVR Menu" That's why I didn't find it sooner. Thanks
screenshot-2024-03-12-232031.png

PS my call queues are named the same as my IVR options, that's why I refer to them interchangably.


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

Phong Vu avatar image Phong Vu ♦♦ commented ·

After a caller selects an IVR option (press 1 etc), if the call is routed to a call queue, you will get the telephony event on that call queue. Use the logic above to detect again the call queue name.

1 Like 1 ·
scdealer avatar image scdealer Phong Vu ♦♦ commented ·

Thank You

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