WebRTC (Web Real-Time Communication) is an API definition drafted by the World Wide Web Consortium (W3C) that supports browser-to-browser applications for voice calling, video chat, and P2P file sharing without the need of either internal or external plugins.
Your Euphoria PBX that you currently using to make and receive calls is capable of making and receiving calls via Secure WebSockets, a module of WebRTC. You will need to familiarize your self with WebRTC and Secure WebSockets to continue.
Technical Specs and Requirements
Euphoria Allows for Secure WebSocket connections on port 443. If you normally communicate with your pbx at pbx4.euphoria.co.za on the regular SIP port of 5060, you can also establish a Secure WebSocket connection on port 443. e.g. wss://pbx4.euphoria.co.za:443. Connections using Secure WebSockets are protected via TLS.
Euphoria does not support non-secure WebSocket connections.
RTP media is transmitted over UDP ports 30000-40000. (With a non WebSocket connections, like 5060, RTP would normally use port 10000-20000). Additionally, RTP media offered by your Web Browser is normally secured with SAVPF/TLS.
The Audio codec used by most modern browsers will be OPUS. Euphoria supports opus audio codec, however you will need to contact your support or sales consultant to have this option enabled. (Browsers will also offer ulaw and alaw - these two codecs are not recommended, and also have to be enabled by contacting Euphoria.)
The Video codec used by Chrome will be VP8/9 and Mozilla will be H264. Trans-coding video is not possible and as a result, video will not be possible via this method. An alternate video conferencing solution is available if required.
A STUN server is also available at the same pbx url. e.g., if you register with pbx3.euphoria.co.za, then the stun server will be stun:pbx3.euphoria.co.za
Building a browser based phone
Option 1) SIPjs: https://sipjs.com
Option 2) JsSIP: http://jssip.net/
This is a draft document and subject to change