question

Donald King avatar image
Donald King asked ·

How can I make a call from my c# website to a phone?

We have a c# application built in .Net 4.5.2. We want to add a feature that lets the user click a phone number and be connected to that number through the browser. I have looked at both the WebRTC and the RingOut options and still have a few questions. Does RingOut need to work through the softphone? Can I log calls (start time, end time, comments, etc.) with both the RingOut and the WebRTC APIs? If I'm just calling out from the application will RingOut suffice?

call logringoutwebrtc
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.

1 Answer

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

If you choose to implement your own web phone from scratch using the WebRTC, you need to implement a lot.

Here is an alternative with the RingCentral Embeddable. Simply add the code below to your page (e.g. the Default.aspx)

<span><a href="#" onclick="makeCall('13129822345')">+13129822345</a></span>
<iframe width="300" height="500" id="rc-widget" allow="microphone" src="https://ringcentral.github.io/ringcentral-embeddable/app.html">
</iframe>
<script>
    function makeCall(number) {
        document.querySelector("#rc-widget").contentWindow.postMessage({
                type: 'rc-adapter-new-call',
                phoneNumber: number,
                toCall: true,
                }, '*');
    }
</script>


5 comments 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.

Thank you so much this works perfectly. I can still log calls done this way correct?

0 Likes 0 · ·

All calls are logged automatically by the system. All you need is to login your account and read the call-log

The RingCentral embeddable allows you do do much more than just making a call. E.g. you can implement event handlers to catch incoming call event and do inbound popup etc. Read the instructions from Github for details.

0 Likes 0 · ·

Hi I've been playing around with the demo you gave me and was wondering if there was a way to open the call in its own window. Ive tried using _blank and window.open but though they open the phone I'm having trouble getting the number to the phone and making the call. Is this something that is possible?

0 Likes 0 · ·
Show more comments

with the i-frame method when i put in my appkey it completely breaks.


                   

When I use the script method I get a notification on sign-in: You cannot use this device to make PSTN calls including Emergency Calls since no Digital Line is associated.

Then an Access Denied message

How do I connect a digital line to my app and also once that is done will multiple people be able to use this code to call at the same time?

0 Likes 0 · ·

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.