VoIP calls from the browser using WebRTC and FreeSWITCH

There was a time when making phone calls from the browser would have meant installing a native extension. Thanks to WebRTC, we can now make phone calls from the browser. This post is my recent experiment with doing exactly that, using readily available open source components.

Let’s start by installing FreeSWITCH (FS). I am assuming a Windows based setup but Linux or Mac should also work. Once you have FS installed (I’m on 1.5.8b+git~20131213T181356Z~87751f9eaf~64bit) and sanity-tested, you’ll need to enable websocket support. This can be done by editing the configuration file <FS folder>\conf\sip_profiles\internal.xml so the the following line is uncommented

    <param name="ws-binding"  value=":5066"/>

You can also use secure websockets, I’ll leave that setup for a future exercise. At this point, restart the FreeSWITCH service.

The next step is to find a suitable browser-based SIP client. Luckily, there is exactly such a client provided by jsSIP, and you don’t even have to install it. Fire up your browser (I’m using the latest version of Chrome) and access that URL. Assuming that your IP address is, this is the information you can provide

Name: Your Name
SIP URI: sip:1000@
SIP Password: 1234
WS URI: ws://

Hit ENTER and you’ll be taken to the dialer. Dial 9195 to make a call, FS will relay your voice back to you, after a five second delay. You’ll need to allow the browser to use your microphone.

sipML5 is another nice alternative to jsSIP. You’ll need to edit the WebSocket Server URL in expert mode.

Happy RTCing!


8 thoughts on “VoIP calls from the browser using WebRTC and FreeSWITCH

  1. Voice calls to 9195 have been failing with jsSIP. sipML5 demo is working all right. FreeSWITCH console at loglevel debug shows

    2014-04-15 00:17:07.762893 [ERR] switch_rtp.c:2694 audio Handshake failure 1

    Wireshark (dtls filter) shows jsSIP side rejecting DTLS certificate with alert level 2 (Fatal) and description 42 (bad certificate).

    1. this is because you was using self signed certs, i used the letsencrypt service to get valid ones and i solved the issue, im trying to make a native environment for webrtc in asterisk and freeswitch and some billing systems.

    1. Great Article…i had a problem while trying so, will u please tell with sipml5 and freeswitch( 1.5.15b x64) do i need any webrtc2sip server as well ?

  2. Hi Devendra,
    I can use sipML5 to make a audio call to MicroSIP via freeswitch. But in video call, the sipML5 can not decode the video from MicroSIP. (MicroSIP can decode the video from sipML5 after disable H.263+ and VP8). Do you have any idea?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s