Version 3 (modified by Jamie McClelland, 6 years ago) (diff)



UPDATE: As of May 30, 2014 (with the 1.4.4 version of Freeswitch) we are no longer using webrtc2sip because freeswitch now offers native webrtc support.


The webrtc2sip project provides server components necessary to work with sipml5 (the html5 sip library). sipml5 allows us to have a fully functional SIP client built in a web page using html5. We use that library to provide our mexcla interpretation conference call system.

In particular, we depend on it to provide:

  • sip proxy which converts communication from Websocket (which is how all html5 audio/video apps communicate) into SIP (which is the protocol used by our freeswitch server, that handles the conference call).
  • RTC Web breaker which provides server side support for ICE (the way clients get around NAT) and DTLS/SRTP (secure real time protocol and secure UDP). These protocols are mandatory in html5 applications, but are not supported natively by freeswitch, so webrtc2sip handles that part of the communication.
  • Media coder which provides codec support and conversion for opus and g.711 (freeswitch actually supports both codecs so we don't really need this one).


webrtc2sip is not yet in Debian.

The following packages are not required for building webrtc2sip, but is required to properly run a client:

apt-get install  resiprocate-turn-server

To install the components:

  • Ensure you are running wheezy (squeeze would probably work but I didn't try)
  • Install debian dependencies. As root:
    apt-get install make libtool autoconf subversion git wget libogg-dev gcc gobjc++  libsrtp0-dev libsrtp0 srtp-utils openssl libspeex-dev libspeexdsp-dev libspeex1 libspeexdsp1 yasm libvpx-dev libvpx1 libopus-dev libopus0 libopencore-amrnb-dev libopencore-amrwb-dev libopencore-amrwb0 libopencore-amrnb0 libgsmme-dev libgsmme1c2a libgsm1-dev libgsm1 libgsm0710-dev libgsm0710-0 libgsm0710mux-dev libxml2-dev libxml2 libopal3.10.4 libavcodec-dev

Note: we are not supporting codecs/libraries not shipped with debian (libyuv, g.729, ilbc, h264, h263, MP4V-ES)

  • As root, create the target directory and chown to your non-priv user:
    mkdir /usr/local/src/doubango
    chown <user>:<user> /usr/local/src/doubango
  • As non-priv user, Checkout the framework source code:
    cd /usr/local/src/
    svn checkout doubango
  • As non-priv user, build the framework source code:
    cd doubango
    ./ && ./configure --with-ssl --with-srtp
  • As root, install (will install in /usr/local)
    make install
  • As root user, create the target directories:
    mkdir /usr/local/src/webrtc2sip
    chown <user>:<user> /usr/local/src/webrtc2sip
  • As non-priv user, checkout the webrtc2sip code:
    cd /usr/local/src/
    svn checkout webrtc2sip
  • As non-priv user, build:
    cd webrtc2sip
    ./ && ./configure --with-doubango=/usr/local --prefix=/usr/local
    make clean && make
  • As root, install:
    make install
  • As root, copy config file to /etc/ and create symlink:
    mkdir /etc/webrtc2sip
    cp -f ./config.xml /etc/webrtc2sip
  • To run:
    export LD_LIBRARY_PATH=/usr/local/lib
    /usr/local/sbin/webrtc2sip --config=/etc/webrtc2sip/config.xml
  • To run in a more permanent way... I've setup it up to be managed by runit via /etc/sv/webrtc2sip.