I need to know how can I make a call in desktop from browser based application using the WebPhone WebRTC.

  • 1
  • Question
  • Updated 2 months ago
I have integrated RingCentral API for making Authentication,Inbound and Outbound SMS,SMS Store.But for making Voice call I have integrated the WebPhone from https://github.com/ringcentral/ringcentral-web-phone .WebPhone is a browser based application and I want to integrate it in my Desktop application.How to retrieve the Address book and make a call from the list of contacts from Address book and make Voice call from WebPhone.
I can share more details if required.

Regards,
Photo of Amit Ohal

Amit Ohal

  • 100 Points 100 badge 2x thumb

Posted 3 months ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 7,602 Points 5k badge 2x thumb
If you want to use WebRTC in your desktop app, your desktop app must have a web browser embedded.

For example, electron has Chrome browser embedded so it is able to take advantages of WebRTC. Other languages also have solutions to embed a browser. This is a Java Desktop demo: https://github.com/tylerlong/jxbrowser-webrtc
Photo of Amit Ohal

Amit Ohal

  • 100 Points 100 badge 2x thumb
Hi Tyler,

I am able to make WebPhone application execute in my desktop application with a browser control in Windows but every time when I invoke the browser control it ask authentication.
I want to make the login procedure only once at the start.
Also please let me know what is the API for making logout in C# and JavaScript.

Regards,

Amit Ohal
Photo of Tyler Long

Tyler Long, Official Rep

  • 7,602 Points 5k badge 2x thumb
https://github.com/ringcentral/ringcentral-js#retrieving-and-setting-auth-information

After authorization, you retrieve the auth data and persist it somewhere.  Next time you invoke the browser control, set the auth data back.  Then there is no need to do authorization every time. 
Photo of Tyler Long

Tyler Long, Official Rep

  • 7,602 Points 5k badge 2x thumb
Here is the JS code to do logout: https://github.com/ringcentral/ringcentral-js#logout