VoIP & SIP
WebRTCAlso known as Web Real-Time Communication
Definition
WebRTC (Web Real-Time Communication) is a set of W3C browser APIs and IETF protocols that let web pages and apps send real-time voice, video and data directly, without plugins. It includes built-in NAT traversal (ICE), mandatory encryption (DTLS-SRTP) and codecs such as Opus and G.711, and is supported by all major browsers.
How WebRTC works
A page asks for the microphone with getUserMedia and creates an RTCPeerConnection. The two sides exchange SDP offers and answers through a signalling channel that WebRTC deliberately leaves unspecified; many VoIP systems use SIP over WebSocket (RFC 7118) for this. Media paths are found with ICE, STUN and TURN (see NAT traversal).
WebRTC and traditional SIP
A WebRTC client cannot talk directly to a plain SIP phone because of the encryption and ICE requirements. A WebRTC gateway or SBC, or a PBX such as Asterisk with WebRTC support, terminates DTLS-SRTP and ICE on one side and plain SIP/RTP on the other, transcoding Opus to G.711 where needed.
Use cases
Because WebRTC runs inside the browser, users need nothing more than a link: no softphone installation, no SIP credentials stored on their device and no firewall changes beyond HTTPS and the media ports or a TURN relay. That makes it well suited to occasional callers, visitors and staff on locked-down machines.
Click-to-call buttons on websites, browser softphones for remote agents, and in-app calling are common. A browser call can be routed like any other extension, including out through a mobile GSM gateway. GSMCalls uses Opus on the device side where supported; see the platform.
Frequently asked questions
Is WebRTC the same as SIP?
No. WebRTC defines the media stack in the browser but not the signalling. SIP over WebSocket is one popular way to signal WebRTC calls.
Is WebRTC encrypted?
Yes. Media must be encrypted with DTLS-SRTP, and data channels use DTLS. There is no unencrypted mode.
Why does a WebRTC call fail behind some firewalls?
If direct UDP paths are blocked, ICE needs a TURN relay, ideally reachable over TCP or TLS on port 443.