News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Is it possible to identify if a call went to voicemail with ringcentral-web-phone?
Tags: rest api
Aug 24, 2020 at 3:48pm   •   2 replies  •  0 likes
Development Admin

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?

1 Answer
answered on Aug 26, 2020 at 7:54am  

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

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us