question

tommy-figgs6378 avatar image
tommy-figgs6378 asked garry-lowther14234 commented

call from javascript using chrome extension

The Chrome extension works great, but I need to run a function before dialing the number from my website. Like:


<button type='button' onclick=makecall('".$result->PHONE."')>".$result->PHONE."</button>


<script>

function makecall($number){


alert("tel:"+thenumber);

window.location.href("tel:"+$number);

}

</script>


Is there a function in the chrome extension I can call to send the number to the dialer?

sdk
1 |3000

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

1 Answer

Tyler Liu avatar image
Tyler Liu answered garry-lowther14234 commented
RingCentral Chrome Extension is not open source and we don't provide any public API for it. So I am afraid that it doesn't exist.
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.

garry-lowther14234 avatar image garry-lowther14234 commented ·
I traced the debug of RC's own Chrome extension and this code works:
window.top.postMessage({
          type: 'c2d',
          number: '012231234567890',
          isQuickAccess: true
        }, '*');
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