question

Development Admin avatar image
Development Admin asked Phong Vu edited

Is it possible to identify if a call went to voicemail with ringcentral-web-phone?

I was wondering if is it possible to identify if a call went to voicemail with ringcentral-web-phone? If there is a response code that could differentiate from both or another event listener?

rest api
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.

mary-community-moderator avatar image mary-community-moderator ♦♦ commented ·

Hi , may I know what you mean by RingCentral-web-phone?

0 Likes 0 ·
Development Admin avatar image Development Admin mary-community-moderator ♦♦ commented ·

This is the git repo https://github.com/ringcentral/ringcentral-web-phone. Basically is a developer tool that allow me to make calls. WebRTC.

0 Likes 0 ·

1 Answer

Phong Vu avatar image
Phong Vu answered Phong Vu edited

If you meant for an outbound call, the answer is NO, not with the embeddable nor with any API.

If you meant for in inbound call, the answer is YES. You can get a message event for a new voicemail when a new voicemail message is available. I am not sure why you need it because the embeddable has the message page and it shows all different types of messages including voicemails.

If you want to receive the email event programmatically, you can add this code to your web page:

window.addEventListener('message', (e) => {
  const data = e.data;
  if (data) {
    switch (data.type) {
      case 'rc-call-ring-notify':
        // get call when user gets a ringing call
        break;
      case 'rc-call-init-notify':
        // get call when user creates a call from dial
        break;
      case 'rc-call-start-notify':
        // get call when an incoming call is accepted or an outbound call is connected
        break;
      case 'rc-call-hold-notify':
        // get call when user holds a call
        break;
      case 'rc-call-resume-notify':
        // get call when user unholds a call
        break;
      case 'rc-call-end-notify':
        // get call on call end event
        break;
      case 'rc-call-mute-notify':
        // get call on call muted or unmuted event
        break;
      case 'rc-message-updated-notify':
        // get when a new message is available
        console.log(data.message.type)
        console.log(data.message.uri)
        break
/* full message event payload
message:
type: "rc-message-updated-notify"
attachments: [{…}]
availability: "Alive"
creationTime: "2020-08-26T14:25:49.000Z"
direction: "Inbound"
from: {phoneNumber: "+1650xxxxxxx", name: "WIRELESS CALLER", location: "Mountain View, CA"}
id: 1166467800016
lastModifiedTime: "2020-08-26T14:25:53.238Z"
messageStatus: "Received"
priority: "Normal"
readStatus: "Unread"
to: [{…}]
type: "VoiceMail"
uri: "https://platform.ringcentral.com/restapi/v1.0/account/80964xxxx/extension/6228832xxxx/message-store/1166467800016"
vmTranscriptionStatus: "Failed"
*/
      default:
        break;
    }
  }
});

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