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


There are two popular JavaScript libraries that enable full telephone functionality like call set-up, dtmf, call answer etc.

Option 1) SIPjs:  https://sipjs.com

SIPjs is an easy to use fast to get going script library, it can handle most calling features. It is recommended to use SIPjs JavaScript library to build a browser based phone, for simple use case scenarios. (At the time of writing, hold and un-hold was not possible).


Option 2) JsSIP:  http://jssip.net/

JsSIP is a more powerful script library but can be more complicated to setup. It is recommended to use JsSIP JavaScript library to build a more feature rich scenarios.



This is a draft document and subject to change