Source code freely provided to you by Doubango Telecom ®.
This is part of sipML5 solution and don't hesitate to test our live demo.
webrtc2sip is a smart and powerful gateway using RTCWeb and SIP to turn your browser into a phone with audio, video and SMS capabilities. The gateway allows your web browser to make and receive calls from/to any SIP-legacy network or PSTN.
As an example, you will be able to make a call from your preferred web browser to a SIP-legacy softphone (e.g. xlite) or mobile/fixed phone.
The gateway contains four modules: SIP Proxy | RTCWeb Breaker | Media Coder | Click-to-Call service..
The role of the SIP Proxy module is to convert the SIP transport from WebSocket protocol to UDP, TCP or TLS which are supported by all legacy networks. If your provider or hosted server supports SIP over WebSocket (e.g. Asterisk or Kamailio) then, you can bypass the module and connect the client directly to the endpoint.
Bypassing the SIP Proxy is not recommended if you’re planning to use the RTCWeb Breaker or Media Coder modules as this will requires maintaining two different connections.
There are no special requirements for the end server to be able to talk to the Proxy module.
The RTCWeb specifications make support for ICE and DTLS/SRTP mandatory. The problem is that many SIP-legacy endpoints (e.g. PSTN network) do not support these features.
It’s up to the RTCWeb Breaker to negotiate and convert the media stream to allow these two worlds to interop.
We highly recommend checking the Technical Guide to understand how to avoid security issues when using this module.
For example, FreeSWITCH do not support ICE which means it requires the RTCWeb Breaker in order to be able to connect the browser to a SIP-legacy endpoint.
The RTCWeb standard defined two MTI (Mandatory To Implement) audio codecs: opus and g.711.
For now there are intense discussions about the MTI video codecs. The choice is between VP8 and H.264. VP8 is royalty-free but not widely deployed while H.264 AVC is not free but widely deployed.
Google has decided to use VP8 in Chrome while Ericsson uses H.264 AVC in Bowser. Mozilla and Opera Software will probably use VP8 and Microsoft H.264 AVC. As an example, the Media Coder will allow to make video calls between Chrome and Bowser.
Another example is calling a Telepresence system (e.g. Cisco) which most likely uses H.264 SVC from Chrome.
This is a complete SIP click-to-call solution based on the three other components. The goal is to allow any person receiving your mails, visiting your website, reading your twitts, watching your Facebook/Google+ profile to call you on your mobile phone with a single click. As an example, click here to call me on my mobile phone.
For more information: https://click2dial.org
Let's say the webrtc2sip gateway and SIP server are running on two different PCs with IP addresses equal to 192.168.0.1 and 192.168.0.2 respectively.
- Open https://sipml5.org/expert.htm in your browser
- Fill “WebSocket Server URL” field with the IP address and port where your webrtc2sip gateway is listening for incoming Websocket connections (e.g ws:https://192.168.0.1:10060 or wss:https://192.168.0.1:10062). IMPORTANT: Do not forget the url scheme (ws:https:// or wss:https://).
- The “SIP outbound Proxy URL” is used to set the destination IP address and Port to use for all outgoing requests regardless the domain name (a.k.a realm). This is a good option for developers using a SIP domain name without valid DNS A/NAPTR/SRV records. E.g. udp:https://192.168.0.2:5060.
- Check “Enable RTCWeb Breaker” if you want to call a SIP-legacy endpoint.
We highly recommend checking the Technical Guide to understand how to avoid security issues when using our gateway.
Please check our issue tracker, developer group and technical guide if you have any problem.
© 2012-2015 Doubango Telecom
Inspiring the future