question

sneha-rao8582 avatar image
sneha-rao8582 asked Phong Vu 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 Deactivated answered Yatin Gera Deactivated 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.

sneha-rao8582 avatar image sneha-rao8582 commented ·

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 ·
Yatin Gera avatar image Yatin Gera ♦♦ sneha-rao8582 commented ·

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 Phong Vu 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.

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

sneha-rao8582 avatar image sneha-rao8582 commented ·

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 ·
Phong Vu avatar image Phong Vu ♦♦ sneha-rao8582 commented ·

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 ·
sneha-rao8582 avatar image sneha-rao8582 Phong Vu ♦♦ commented ·

Its still same..it does not work sometime.

0 Likes 0 ·
Show more comments
Zahir Olmez avatar image Zahir Olmez sneha-rao8582 commented ·

Hi @sneha-rao I'm trying to subsicribe voicemail event in RC .

I'm getting this error. How did you overcome this error?

"Not allowed subscribe for messages to other extensions%"

array:3 [

"eventFilters" => array:2 [

0 => "/restapi/v1.0/account/~/presence"

1 => "/restapi/v1.0/account/~/extension/62445431008/voicemail"

]

"deliveryMode" => array:2 [

"transportType" => "WebHook"

"address" => "...."

]

"expiresIn" => 31556926

]

Thank you

0 Likes 0 ·
Rpbhoir30 avatar image Rpbhoir30 Zahir Olmez commented ·

Hi @Zahir Olmez ,

Have you logged in with Admin?

I was using password based authentication. But then used JWT authentication and its working perfectly.

0 Likes 0 ·
Show more comments
Show more comments
Zahir Olmez avatar image
Zahir Olmez answered Rpbhoir30 commented

Hi @Rpbhoir30 yes I'm super admin. I'm trying to as a super admin. Which language were you using ?

1 comment
1 |3000

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

Rpbhoir30 avatar image Rpbhoir30 commented ·

I was using PHP langugae.

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