question

Chady Boutros avatar image
Chady Boutros asked Phong Vu answered

Best to way to find out where a caller is on IVR via webhook?

Hi there,

I need to find a way to either know what prompt a user is listening to on the IVR or where he is in the IVR system. What is the best way to use webhooks to figure this out, so I always know where they are in real time?

Thank you in advance,

Chady

webhooksivr
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

IVR is an extension so it has the extension id. You can compare the extensionId in the parties object to identify if the call is being made to the IVR or not. You can also subscribe for only IVR extension using the extensionId in the event filter.

eventFilters: [
    '/restapi/v1.0/account/~/extension/6224242xxxx/telephony/sessions',
    '/restapi/v1.0/account/~/extension/6235322xxxx/telephony/sessions'
  ],
...
//
{
  "uuid": "4124906327025488283",
  "timestamp": "2023-02-03T18:36:14.556Z",
  "subscriptionId": "xxxxx",
  "ownerId": "6228832xxxx",
  "body": {
    "sequence": 3,
    "sessionId": "75883371xxxx",
    "telephonySessionId": "...",
    "serverId": "10.14.123.119.TAM",
    "eventTime": "2023-02-03T18:36:14.516Z",
    "parties": [
      {
        "accountId": "80964xxxx",
        "extensionId": "6224242xxxx",
        "id": "...",
        "direction": "Inbound",
        "to": {
          "phoneNumber": "+1720386xxxx",
          "name": "IVR Menu 1001",
          "extensionId": "6224242xxxx"
        },
        "from": {
          "phoneNumber": "+1650224xxxx",
          "name": "WIRELESS CALLER"
        },
        ...
      }
    ],
    "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.

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