Before Ingate unit can be used as webRTC companion server it has to be configured as below:
After each change make sure to click on ”Apply & Save” at bottom right on page!
Now WebRTC should work. There are however some additional settings you might want to do to improve:
Enable DoS attack protection and Connections limiting for the COWS and websocket server:
If you have an domain name you use to access your unit from the Internet you might want to configure the IXNX unit as SIP server for that domain, so that you can register SIP users locally using that domain name.
If you are using WebRTC clients that are not based on our WRTC_kit toolkit but still want to use the unit's TURN server you need to enter the passwords used on More Services > Q-TURN > User-Database
You might also want to adjust settings of the SIP > WebRTC > Client templates.
Using REST authentication the web server providing the wrtc client webpage can force users to authenticate themselves (using eg password login) and provide a REST token proving user has been accepted. The web client can then pass the provided token to the IXNX unit proving it has already been accepted by the web server – no further authentication is necessary. The IXNX unit's COWS webserver is capable of generating such tokens if you configure it the following way:
Now you can test REST authentication by opening webpage http://192.168.1.2/login.html – when it asks for login and password enter the ones you specified above.
After successful login you access the same client as usual in this demo – in a real world application you would of course be granted access to a different web client, or have no access to the webclient at all unless you have logged in correctly.
The WebRTC gateway can communicate using two different protocols: RTCgate and RFC 7118.
RTCgate is a propriatery protocol used by the WRTC_kit toolkit that is used by the applications in the COWS web server described below. Document WRTC_kit describes the RTCgate protocol, the WRTC_kit toolkit, and how to create WebRTC clients with it.
The websocket server of IXNX does however also support RFC 7118, SIP over websockets. In addition to otherwise existing UDP, TCP and TLS protocols, the WebSocket Protocol can also be a transport for the Session Initiation Protocol (SIP), and interface to the SIP proxy and all SIP functionality of the E-SBC unit. The RFC 7118 interface has (sparsely) been tested with sipml5’s JavaScript SIP client from Doubango Telecom: http://sipml5.org.
Both protocols are available at the WS and WSS ports set up at the >SIP>SIP Proxy>Settings> configuration page and both also use the media proxy between WebRTC and SIP.
COWS is a second web server inside the unit, used solely to provide webpages for ordinary users. The cows web server is fully separated from the unit's configuration web server to ensure integrity and security - it runs as a separate process on the unit's CPU.
The demo application at http://webrtc.ingate.com is running on the IXNX second web server (COWS) and uses the RTCgate protocol, that provides a quick way to integrate and use WebRTC features and functions (including a multiparty videoconferencing client) with a SIP service. The JavaScript examples and libraries are fully accessible.
When creating your own WebRTC client you can use the COWS server during development – and even for small scale deployment, too. Below is a brief description of how to configure and use the COWS:
At the global IP address of the unit you reach the cows web server.
There is no default way of reaching the configuration web server of the unit from WAN, unless you enable it using the Network > Firewall > Remote Access page.
If you access cows without any page specified in the URL it will open the demo webRTC client page.
Example: http://192.168.1.2
If you specify webpage wrtc.html on cows it will open the minimalistic ”call support” popup page.
Example: http://192.168.1.2/wrtc.html
The web pages that cows can show are located at /usr/lib/lua/luci/view/wwwu in the unit's file system.
The pages are mapped to /cgi-bin/luci URL prefix by cows.
The URL mapping is done in the /usr/lib/lua/luci/controller_u/index.lua control file.
For easier access to the pages shortcut files /www/wwwu/index.html and /www/wwwu/wrtc.html have been added that open the appropriate page.
Resources that cows can use are located at /www/wwwu in the unit's file system.
You can access the above described files either by using SSH or the unit's built-in editor.
SSH access is by default disabled. You need to enable it before attempting access. To enable:
Now you can access the unit using SSH. Using file transfer programs such as WinSCP you can fetch, edit, and upload files. Remember that you must log in as root to be able to edit all files.
Make sure the files use LF as row delimiters, not CRLF! Webpages fail to load if CRLF is used!
The web config GUI has its own built-in file editor. To use it:
Now you can browse the unit's file system. When clicking on a file the Edit page will open with that file's contents. You can now edit the file and save it using the ”Save” button at the bottom of the page.
Instead of browsing the file tree you can select System > Develop > Edit, enter the full file path directly, and click ”Load”.
You can use Ctrl+F to search on the Edit page.
To copy a file: open it on the Edit page, change its filepath above the ”Load” button, and click ”Save”.
To delete a file open System > Develop > CLI and enter ”rm /full/path/to/file”
To be able to access the web configuration GUI from WAN open page Network > Firewall > Remote Access, check ”Enable remote web access by http” and click ”Apply & Save”. Now you can access the web configuration GUI at the unit's global IP address, port 66 (http://50.11.69.17:66) or more securely, open https access on port 78.