Troubleshooting Video Chat (WebRTC) Connectivity


SUMMARY

The video and audio chat available through the webmail client is based on a technology called WebRTC. WebRTC is a connection framework for peer-to-peer communication and has been implemented in most modern browsers. WebRTC will only work if you are accessing webmail over HTTPS. The negotiation between two users attempting a video chat is handled by XMPP, but the clients themselves communicate directly.

If you are unable to establish a connection between two clients, it is likely that your browser or environment is not configured to allow WebRTC connectivity.

DETAIL

WebRTC has varying support in different browsers (although most modern browsers have support). It is recommended that you either use Chrome, Firefox or Microsoft Edge if you initiate video calls with a peer. If your browser does not support WebRTC it may return an error dialog with the following message:

Media failure: An unknown error occured. (NotSupportedError).

The simplest way to verify WebRTC ability is through an online verification site. You can perform a test via the following online utility:

https://test.webrtc.org/

Complexity is introduced if a client is behind NAT. Because the client does not know its external IP address it cannot send the correct IP to the other client and a peer-to-peer connection will fail. To work around this a STUN server is used, which is a server which the client gets its external IP address from. It can then give this to the other client.

The test page above will show failure to connect to the STUN server. When you view the page results, click the Connectivity heading, then the Reflexive connectivity heading. If there is a timeout and the external IP address is not shown, then video will not work and the STUN server is likely not accessible. Make sure that 3478 for UDP and TCP, and 5349 for TLS is open on your firewall so it can connect to a STUN server. A default STUN server is used by the webmail client.

If your client is behind symmetric NAT, where the NAT alters both the IP address and assigns its own port number, then you will need to use a TURN server to relay the video between the two clients. There are companies will provide TURN servers and services for you, or you can configure your own, such as https://github.com/coturn/coturn.

WEBMAIL CHAT CONFIGURATION

The webmail client has a STUN server configured. If you wish to add your own you will need to edit the file:

Mail Enable\Bin\NETWebMail\Plugins\jsxc\jsxc.min.js

Search for:

iceServers:[{urls:"stun:stun.stunprotocol.org"}]

Edit this to either add extra STUN servers like:

iceServers:[{urls:"stun:stun.stunprotocol.org","stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302"}]

And you can also add your own TURN servers

iceServers:[{urls:"stun:stun.stunprotocol.org"},{urls:"turn:turn.example.com", username: "user", credential: "pass"}]

When you edit this file you will need to re-apply any changes after upgrading or re-installing MailEnable.

 

MORE INFORMATION

WebRTC web site: www.webrtc.org

JSXC web site: www.jsxc.org



Product:MailEnable
Article:ME020673
Module:General
Keywords:TroubleshootVideo,Chat,WebRTC
Class:INT: Product Integration
Revised:Wednesday, May 13, 2020
Author:
Publisher:MailEnable