7 comments on “Build your own phone company with WebRTC and a weekend

  1. Hello Chad – I am not even close to your expertize in coding. Forgot coding many years ago :) However read your block and understood you are using your own Web/Signalling Server using socket.io. What about NAT servers? Are you using public ones or have your own or that provided by others/EASYRTC?

    • EasyRTC uses socket.io, so that is where that reference is from. I also used easyRTC’s default STUN servers:
      option.appIceServers = [ // Array of STUN and TURN servers. By default there is only publicly available STUN servers.
      {url: "stun:stun.l.google.com:19302"},
      {url: "stun:stun.sipgate.net"},
      {url: "stun:217.10.68.152"},
      {url: "stun:stun.sipgate.net:10000"},
      {url: "stun:217.10.68.152:10000"}
      ];

      Adding a TURN server into the mix is something I would like to do in a future project.

  2. Nice post Chad. An easy way to provide some basic security is with iptables, Linux built in firewall. For now, you could just use a whitelist of good IP addresses.

    • Thanks Jim. I could definitely do that for the machines I know I will be using and my work domain. The challenge is almost device I use has a dynamic IP. I have been inviting others outside of my immediate family to the site so getting their IP addresses is difficult. If you have ideas on how to address that then please share!

  3. Nice, very nice indeed.
    I like the idea, especially in this time of NSA (et. al.) snooping on all our communications.
    How about some strong encryption?

    • The peer-to-peer media sessions are using WebRTC’s mandated DTLS encryption, but I agree I should absolutely encrypt the signaling communications. I need to look into how to force Secure Web Sockets on socket.io (used by EasyRTC) and I should use a secure mechanism to pass my login password to the server or use HTTPS.

      • I just implemented https with my EasyRTC server. It was very easy and straight forward. Dont forget about the SSL Certs….

        http://www.easyrtc.com/docs/guides/easyrtc_server_ssl.html

        // Load required modules
        var https = require(“https”); // https server core module
        var fs = require(“fs”); // file system core module
        var express = require(“express”); // web framework external module
        var io = require(“socket.io”); // web socket external module
        var easyrtc = require(“easyrtc”); // EasyRTC external module

        // Setup and configure Express http server. Expect a subfolder called “static” to be the web root.
        var httpApp = express();
        httpApp.configure(function() {
        httpApp.use(express.static(__dirname + “/static/”));
        });

        // Start Express https server on port 443
        var webServer = https.createServer(
        {
        key: fs.readFileSync(“/pathtokeys/domain.key”),
        cert: fs.readFileSync(“/pathtokeys/domain.crt”)
        },
        httpApp).listen(443);

        // Start Socket.io so it attaches itself to Express server
        var socketServer = io.listen(webServer, {“log level”:1});

        // Start EasyRTC server
        var rtc = easyrtc.listen(httpApp, socketServer);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">