question

Heng Ong avatar image
Heng Ong asked ·

Issue with Voicemail webhooks not arriving

Hi there,

We are encountering an issue with a mutual customer where the voicemail webhook is only being sent when the voicemail is read by the user, but not when the voicemail was received.

Any ideas?


We've also reached out to devsupport@ but the turnaround time is extremely slow. We have mutual customers that are unhappy.



voicemailwebhooks
1 |1500 characters needed characters left characters exceeded

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

Heng Ong avatar image
Heng Ong answered ·

We are still seeing some issues with voicemails noted in the call logs that are 404s

For example, take a look at this call log entry - https://platform.ringcentral.com/restapi/v1.0/account/59721889/call-log/O5AL2qaQTawozUA?view=Detailed

This is the voicemail URL in one of the legs, and it does not exist - https://platform.ringcentral.com/restapi/v1.0/account/59721889/extension/59855527/message-store/1550344499004 . We get a " HTTP 404: CMN-102 - Resource for parameter [messageId] is not found" error.

The voicemail is in fact in a different extension - https://api.ringcentral.com/restapi/v1.0/account/59721889/extension/59721889/message-store/1550344499004

Can we get this escalated please so we can find a resolution?

1 |1500 characters needed characters left characters exceeded

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 ·

Show me some code how you subscribe for voicemail notification.

BTW, you should read voicemail from the message-store, not from the call log.

var endpoint = '/restapi/v1.0/account/~/extension/~/message-store'
var params = {
      messageType: 'VoiceMail'
}

If you want to read voicemail using the call-log endpoint, you have to make a GET call to the message.uri to get the message metadata then parse the response to get the uri of the binary attachment.

https://platform.ringcentral.com/restapi/v1.0/account/xxxxxx/extension/yyyyyy/message-store/9152177004
{
  uri: 'https://platform.ringcentral.com/restapi/v1.0/account/xxxxxx/extension/yyyyyy/message-store/9152177004',
  id: 9152177004,
  to: [
    {
      phoneNumber: '+1312982xxxx',
      extensionNumber: '101',
      name: 'Gerard'
    }
  ],
  from: {
    phoneNumber: '+1650513xxxx',
    name: 'Francisco',
    location: 'San Mateo, CA'
  },
  type: 'VoiceMail',
  creationTime: '2021-03-05T20:10:35.000Z',
  readStatus: 'Unread',
  priority: 'Normal',
  attachments: [
    {
      id: 9152177004,
      uri: 'https://media.devtest.ringcentral.com/restapi/v1.0/account/xxxxxx/extension/yyyyyy/message-store/9152177004/content/9152177004',
      type: 'AudioRecording',
      contentType: 'audio/mpeg',
      vmDuration: 1
    }
  ],
  direction: 'Inbound',
  availability: 'Alive',
  messageStatus: 'Received',
  lastModifiedTime: '2021-03-05T20:10:35.594Z',
  vmTranscriptionStatus: 'NotAvailable'
}


1 |1500 characters needed characters left characters exceeded

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

Heng Ong avatar image
Heng Ong answered ·

Here is the event we are subscribing to:

/restapi/v1.0/account/59721889/extension/59721889/voicemail


We notice that the voicemails webhook only get sent out to us after the user reads the voicemail (which is a few hours after the voicemail was recorded)


We have a backfill script that polls the call logs for missed calls, and in addition to that if there are calls that results in voicemails, we want to pull them into our system to log them.


Here is a sample call log:

{
  "uri": "https://platform.ringcentral.com/restapi/v1.0/account/377098040/call-log/B5TOIqqWARrHzUA?view=Detailed",
  "id": "B5TOIqqWARrHzUA",
  "sessionId": "91651935040",
  "startTime": "2021-04-02T16:22:36.750Z",
  "duration": 88,
  "type": "Voice",
  "direction": "Inbound",
  "action": "Phone Call",
  "result": "Voicemail",
  "to": {
    "phoneNumber": "+1888..."
  },
  "from": {
    "name": "L...",
    "phoneNumber": "+1618...",
  },
  "telephonySessionId": "s-ec6115b764294caf80078e7ecf4c1934",
  "transport": "PSTN",
  "lastModifiedTime": "2021-04-02T16:24:14.111Z",
  "billing": {
    "costIncluded": 0.059,
    "costPurchased": 0
  },
  "legs": [
    {
      "startTime": "2021-04-02T16:22:36.750Z",
      "duration": 88,
      "type": "Voice",
      "direction": "Inbound",
      "action": "Phone Call",
      "result": "Voicemail",
      "to": {
        "phoneNumber": "+1888..."
      },
      "from": {
        "name": "L...",
        "phoneNumber": "+1618..."
      },
      "telephonySessionId": "s-ec6115b764294caf80078e7ecf4c1934",
      "transport": "PSTN",
      "billing": {
        "costIncluded": 0.059,
        "costPurchased": 0
      },
      "legType": "Accept",
      "master": true
    },
    {
      "startTime": "2021-04-02T16:22:36.766Z",
      "duration": 27,
      "type": "Voice",
      "direction": "Inbound",
      "action": "Phone Call",
      "result": "Accepted",
      "to": {
        "name": "IVR Menu 1001",
        "phoneNumber": "+1888",
        "extensionId": "386022040"
      },
      "from": {
        "name": "L...",
        "phoneNumber": "+1618...",
      },
      "extension": {
        "uri": "https://platform.ringcentral.com/restapi/v1.0/account/377098040/extension/386022040",
        "id": 386022040
      },
      "reason": "Accepted",
      "reasonDescription": "The call connected to and was accepted by this number.",
      "telephonySessionId": "s-ec6115b764294caf80078e7ecf4c1934",
      "transport": "PSTN",
      "legType": "Accept"
    },
    {
      "startTime": "2021-04-02T16:23:04.119Z",
      "duration": 61,
      "type": "Voice",
      "direction": "Inbound",
      "action": "Phone Call",
      "result": "Voicemail",
      "to": {
        "name": "Returns",
        "phoneNumber": "+1888...",
        "extensionId": "386009040"
      },
      "from": {
        "name": "L...",
        "phoneNumber": "+1618...",
      },
      "message": {
        "uri": "https://platform.ringcentral.com/restapi/v1.0/account/377098040/extension/386009040/message-store/1401140377040",
        "id": "1401140377040",
        "type": "VoiceMail"
      },
      "extension": {
        "uri": "https://platform.ringcentral.com/restapi/v1.0/account/377098040/extension/386009040",
        "id": 386009040
      },
      "telephonySessionId": "s-ec6115b764294caf80078e7ecf4c1934",
      "transport": "PSTN",
      "legType": "Accept"
    }
  ]
}



When I fetch the voicemail message, which is

https://platform.ringcentral.com/restapi/v1.0/account/377098040/extension/386009040/message-store/1401140377040

it gives me a 404

This is because for some reason, the voicemail is actually in a different extension:

https://platform.ringcentral.com/restapi/v1.0/account/377098040/extension/377100040/message-store/1401140377040



So couple issues:

1. Why does the call log say the voicemail message is in one extension, but is actually in another?

2. Why does the voicemail webhook only get sent out after it was read even though it was received a few hours prior?

1 |1500 characters needed characters left characters exceeded

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 ·

Hang on there. I just test /voicemail notification on Webhooks and observe the same issue as you reported. I will let the engineering team know to fix this asap.

1 |1500 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 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