question

sneha-rao8582 avatar image
sneha-rao8582 asked sneha-rao8582 commented

Webhook only works for missed calls not for Voicemails

We have created Webhook Subscription for getting missed calls.

We are using "/restapi/v1.0/account/~/telephony/sessions?direction=Inbound&missedCall=true" to get all missed calls/Voicemails.

However, I am not able to find "Voicemail" logs in the results. I see them in the "Call Log" page of RingCentral, but not the API call-log results.

Webhooks are working only for missed calls not for voice calls. Do i have to add another eventfileter for Voicemails?

webhooksvoicemails
1 |3000

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

Yatin Gera avatar image
Yatin Gera answered Yatin Gera commented

Hi @sneha-rao
From what I remember, voicemail data is not sent over the telephony session event filter
There is a separate event filter for voicemails
https://developers.ringcentral.com/api-reference/Voicemail-Message-Event
This will give you notifications related to new new voice mail, voicemails read, voicemail deleted
So you will have to create a subscription with 2 event filters and add your logic to handle events accordingly

Hope this is helpful

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.

Hi, Thanks for the answer. I have used /restapi/v1.0/account/~/extension/~/voicemail

filter for voicemails but it seems webhook doesn't call for all the voicemails. My company uses total 10 numbers. It only works for 2 numbers.

0 Likes 0 ·

Hi @sneha-rao
I read the other post regarding the same issue
When you subscribe to restapi/v1.0/account/~/extension/~/voicemail, the ~ after the /extension means the extensions assigned to the user whose credentials are used to generate the auth token.
As mentioned in the other post, one option is to try the message store event
Another option is to get a list of all the extensions and create event filters for all extensions by looping over them and then creating one subscription with all extensions under your account
Reference to get extension list - https://developers.ringcentral.com/api-reference/Extensions/listExtensions

0 Likes 0 ·
Phong Vu avatar image
Phong Vu answered

Confirm that this is an issue (it happened before and was fixed and now it happens again). I will report the issue to the dev team. Meanwhile, you can workaround this by subscribe for the telephony/sessions event and detect voicemail via the event payload

...parties[{...status: { code:"Voicemail" ...}}]

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 sneha-rao8582 commented

I ran my test today and the voicemail event notification is working again as normal. Not sure how and when it was fixed. Can you run your app again and let me know if it still does not work for you.

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.

Thank you @Phong Vu for replaying.

I am using

$r = $platform->post('/subscription', array(
"eventFilters" => array(
"/restapi/v1.0/account/~/telephony/sessions?direction=Inbound&missedCall=true",
"/restapi/v1.0/account/~/extension/~/voicemail",
"/restapi/v1.0/account/~/extension/1209292019/voicemail",
"/restapi/v1.0/account/~/extension/1209293019/voicemail",
"/restapi/v1.0/account/~/extension/1209302019/voicemail",
"/restapi/v1.0/account/~/extension/1209304019/voicemail",
"/restapi/v1.0/account/~/extension/1310230019/voicemail",
"/restapi/v1.0/account/~/extension/1310250019/voicemail",
"/restapi/v1.0/account/~/extension/1717554019/voicemail",
"/restapi/v1.0/account/~/extension/989910019/voicemail"
),

It works great for missed calls. but it doesn't work for voicemail sometimes. Not sure why voicemails is not sent sometimes.

0 Likes 0 ·

I also observed that sometimes it does not work. But can you confirm if it works now? I need to collect inputs for the team to investigate the problem.

0 Likes 0 ·

Its still same..it does not work sometime.

0 Likes 0 ·
Show more comments

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