question

Development Admin avatar image
Development Admin asked ·

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?

callvoicemailwebrtcvoice
2 comments
1 |1000 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.

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

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

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

· Write an Answer
Phong Vu avatar image
Phong Vu answered ·

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;
    }
  }
});

Share
1 |1000 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.