Skip to content

Working with RingCentral's click-to-dial library

This is document that show how to implement Click To Dial feature with RingCentral C2D library. RingCentral C2D is a library that help developers to implement Click To Dial and Click To SMS feature, it will scan phone numbers in web page. When users hover on phone number, it will show C2D widget for Click to Call.

C2D Screenshot

To implement with RingCentral Embeddable:

<script src="https://unpkg.com/ringcentral-c2d@1.0.0/build/index.js"></script>
<script>
// Inject Embeddable
(function() {
  var rcs = document.createElement("script");
  rcs.src = "https://apps.ringcentral.com/integration/ringcentral-embeddable/latest/adapter.js";
  var rcs0 = document.getElementsByTagName("script")[0];
  rcs0.parentNode.insertBefore(rcs, rcs0);
})();
// Interact with RingCentral C2D
var clickToDial = new RingCentralC2D();
clickToDial.on(RingCentralC2D.events.call, (phoneNumber) => {
  RCAdapter.clickToCall(phoneNumber, true);
});
clickToDial.on(RingCentralC2D.events.text, (phoneNumber) => {
  RCAdapter.clickToSMS(phoneNumber);
});
</script>