Get WebRTC going faster
Is it really free and open?
The only way to prove this technology is free is to help people implement this for themself.
On Monday, I uploaded reSIProcate v1.9.0 beta7 packages to Debian. The reSIProcate SIP proxy, repro, is one of the core components of the solution behind the free Lumicall service.
Simply install the repro and resiprocate-turn-server packages using apt-get and make the following changes to the configuration (use your own IP addresses of course). I've taken this diff from my own runtime environment, only hiding my passwords, so that you can see exactly how I got it working:
--- repro.config.orig 2013-12-11 17:36:27.179228324 +0100 +++ repro-ws.sip5060.net.config 2013-12-11 17:48:24.159938649 +0100 @@ -143,6 +143,41 @@ # Transport6TlsClientVerification = None # Transport6RecordRouteUri = sip:h1.sipdomain.com;transport=WS +Transport1Interface = 188.8.131.52:80 +Transport1Type = WS +Transport1RecordRouteUri = auto + +Transport2Interface = 2001:67c:1388:1000::57:80 +Transport2Type = WS +Transport2RecordRouteUri = auto + +Transport3Interface = 184.108.40.206:5060 +Transport3Type = TCP +Transport3RecordRouteUri = auto + +Transport4Interface = 2001:67c:1388:1000::57:5060 +Transport4Type = TCP +Transport4RecordRouteUri = auto + +Transport5Interface = 220.127.116.11:443 +Transport5Type = WSS +#Transport5RecordRouteUri = auto +Transport5TlsDomain = ws.sip5060.net +Transport5TlsClientVerification = None +Transport5RecordRouteUri = sip:ws.sip5060.net;transport=WSS +Transport5TlsCertificate = /etc/ssl/ssl.crt/ws.sip5060.net-bundle.crt +Transport5TlsPrivateKey = /etc/ssl/private/ws.sip5060.net-key.pem + +Transport6Interface = 2001:67c:1388:1000::57:443 +Transport6Type = WSS +#Transport6RecordRouteUri = auto +Transport6TlsDomain = ws.sip5060.net +Transport6TlsClientVerification = None +Transport6RecordRouteUri = sip:ws.sip5060.net;transport=WSS +Transport6TlsCertificate = /etc/ssl/ssl.crt/ws.sip5060.net-bundle.crt +Transport6TlsPrivateKey = /etc/ssl/private/ws.sip5060.net-key.pem + + # Comma separated list of DNS servers, overrides default OS detected list (leave blank # for default) DNSServers = @@ -455,7 +490,7 @@ ForceRecordRouting = false # Assume path option -AssumePath = false +AssumePath = true # Disable registrar DisableRegistrar = false @@ -481,7 +516,7 @@ # WARNING: Before enabling this, ensure you have a RecordRouteUri setup, or are using # the alternate transport specification mechanism and defining a RecordRouteUri per # transport: TransportXRecordRouteUri -DisableOutbound = true +DisableOutbound = false # Set the draft version of outbound to support (default: RFC5626) # Other accepted values are the versions of the IETF drafts, before RFC5626 was issued @@ -505,7 +540,7 @@ # WARNING: Before enabling this, ensure you have a RecordRouteUri setup, or are using # the alternate transport specification mechanism and defining a RecordRouteUri per # transport: TransportXRecordRouteUri -EnableFlowTokens = false +EnableFlowTokens = true # Enable use of flow-tokens in non-outbound cases for clients detected to be behind a NAT. # This a more selective flow token hack mode for clients not supporting RFC5626. The
This is a diff against the /etc/repro/repro.config file distributed in the Debian package version 1.9.0~beta7-1.
In the example above, I've included WSS transport defintions for WebSockets over TLS. Use the standard procedure for creating webserver SSL certificates to create certificates for repro and make sure you insert the correct filenames in the TLS parameters above. I've also duplicated every transport for IPv6. If you don't want TLS/WSS or IPv6, just comment those entries out (and renumber the remaining transports).
Web-based SIP proxy setup
Once you have repro running, go to the web admin interface (port 5080, username: admin, password: admin) and finish the setup using the web UI. The following steps are essential:
- Add your domain (and restart the repro daemon after adding your domain)
- Add some users
- Add any routes to external services (optional - in my next blog I'll demonstrate how to route WebRTC calls to Asterisk using the Debian packages and less than 20 lines of configuration)
Set up reTurn, the TURN server
Just put your IP addresses in /etc/reTurnServer.config and add the following line to /etc/reTurnServer-users.txt:
IMPORTANT: the realm in the users file (reTurn in the example and default config) must be identical to the AuthenticationRealm in the /etc/reTurnServer.config file.
On your own web site
Simply install your own apache server and clone the webrtc.lumicall.org demo site. Modify the file js/custom.js and include the settings for your own server.
# cd /var/www # mkdir webcall # cd webcall # wget -r -nH http://webrtc.lumicall.org # vi js/custom.js
In the custom.js, make sure you use a ws:// URL if you didn't set up SSL certificates and use a wss:// URL if you did. The IP or domain of your repro server must be in the ws:// or wss:// URL.
Now navigate to the URL ending with /webcall on your server.
For RHEL, Fedora and other RPM users
Can somebody please assist with the review of the cajun-jsonapi dependency package so I can upload this new version of reSIProcate to Fedora? I'm also planning to make v1.9.0 available in EPEL6 when it is released in January.
Please come and ask questions or discuss your experiences on the Free RTC mailing list sponsored by FSF Europe.