Skip to main content
June 18, 2026 · By Piyush Sahoo · Updated November 3, 2026 WebRTC (Web Real-Time Communication) is a set of open standards that lets browsers and apps send live audio, video, and data to each other without a plugin. Your server introduces the two sides. WebRTC then finds a network path, encrypts it, and streams the media, directly where it can and through a relay where it can’t. This guide follows one call from microphone permission to encrypted audio. It then shows what the relay costs, where WebRTC stops and the phone network starts, and how Indian networks change your test plan.
Key takeaways
  • WebRTC has three layers: a W3C browser API, a family of IETF protocols, and an open-source engine. People use the word for all three.
  • Signalling is your job. WebRTC creates the offer and answer, but your own server has to carry them between the peers.
  • Plan for a relay. Published estimates of relayed sessions run from about 8% to 25%, and each relayed call adds bandwidth you pay for.
  • WebRTC stops at IP. Reaching a phone number takes a gateway and a carrier, and phone-call rules apply from that point.
  • India is a wireless, mixed-IPv6 market. About 96% of Internet subscribers are wireless, and IPv6 capability runs from about 96% on Jio to under 2% on Hathway.

What does WebRTC mean?

The name breaks into Web, meaning it runs in the browser, and RTC, or real-time communication. That second part is the point: WebRTC favours getting audio to you now over getting every packet to you eventually. In a design discussion, “WebRTC” can mean any of three different things: The distinction matters when you compare vendors. A provider can speak the protocols without giving you the browser API, and a mobile app can embed the engine with no browser in sight. The browser side is small. getUserMedia captures the microphone or camera, RTCPeerConnection runs the session, and RTCDataChannel carries anything that isn’t audio or video.

What happens when a WebRTC call connects?

Setup and media take different routes. Your server handles the introductions, and then the peers talk to each other. Sequence diagram of a WebRTC call. The caller and callee exchange an SDP offer, an SDP answer, and ICE candidates through your signalling server. They then run ICE checks, a DTLS handshake, and SRTP audio and video directly with each other, with data channels running over SCTP and DTLS. Sequence diagram of a WebRTC call. The caller and callee exchange an SDP offer, an SDP answer, and ICE candidates through your signalling server. They then run ICE checks, a DTLS handshake, and SRTP audio and video directly with each other, with data channels running over SCTP and DTLS.
  1. The browser asks for the microphone. getUserMedia prompts the user and is limited to secure contexts, so plan on HTTPS from day one.
  2. The caller creates an offer. This SDP text lists codecs, encryption fingerprints, and ICE credentials. JSEP (RFC 9429) sets the rules for creating and applying it.
  3. Your server carries the offer and returns an answer. The callee’s browser picks what both sides support.
  4. Both sides share network addresses as they find them. These are ICE candidates, and Trickle ICE (RFC 8838) lets checks begin before the list is complete.
  5. The peers test the paths. ICE (RFC 8445) sends connectivity checks across candidate pairs and selects a working one.
  6. The peers set up encryption. They run a DTLS handshake on the chosen path and compare certificates with the fingerprints from step 2.
  7. Media flows. Audio and video travel as SRTP. Data channels use SCTP over DTLS (RFC 8831), and all of it can share one port pair.
Each failure points at one of these stages, which makes the sequence useful for debugging:

Why does WebRTC leave signalling to you?

The standard specifies how offers and answers are built, and deliberately not how they travel. That keeps WebRTC out of your login, presence, and routing decisions. It also means no two WebRTC apps interoperate unless someone builds a bridge. You have four realistic options:

How does WebRTC get through NATs and firewalls?

Most devices don’t hold a public address, so a peer can’t simply be dialled. ICE collects every address that might work, tests them in pairs, and uses the best pair that passes. Three candidate paths in ICE preference order. Host candidates connect peers directly, with a recommended type preference of 126. Server-reflexive candidates pass through each peer's NAT using an address learned from STUN, with a preference of 100. Relayed candidates send all media through a TURN relay, with a preference of 0. Three candidate paths in ICE preference order. Host candidates connect peers directly, with a recommended type preference of 126. Server-reflexive candidates pass through each peer's NAT using an address learned from STUN, with a preference of 100. Relayed candidates send all media through a TURN relay, with a preference of 0. The preferences shown are the values RFC 8445 recommends. Two helpers supply the addresses:
  • STUN (RFC 8489) tells a peer what address it appears to have from outside its NAT. It’s only involved in setup, so it carries no media.
  • TURN (RFC 8656) forwards the media when no direct path passes. It’s your safety net, and often a large variable cost.
WebRTC endpoints must support TURN over TCP and over TLS, because some firewalls block all UDP. Offer those transports as well as UDP, or those users will fail to connect at all.

How often will calls use a relay?

There is no recent neutral figure, and every number here comes from a vendor or analyst. VideoSDK says about 8 to 15 percent of sessions, Metered says about 20 to 25 percent, and BlogGeek.me calls roughly 80 percent without a relay “common lore”. Both Metered and VideoSDK sell related infrastructure. Treat those figures as a starting assumption. Then log the selected candidate pair from getStats on real calls, which reports whether each side used a relay candidate. The math for relay capacity is simple. A relayed Opus call at 32 kbps uses about 53.6 kbps per direction once you add the 4-byte TURN channel header to the figures in the chart below. The relay forwards both directions, so it sends about 107 kbps, or 48 MB an hour. As an illustration, take 5,000 concurrent calls with 20% relayed. That’s 1,000 relayed calls, or about 107 Mbps out of your TURN fleet, with the same amount coming in.

Is WebRTC always peer-to-peer?

No. Two people on a simple call can run peer-to-peer, but most business uses put a server in the media path. Then the “peer” your browser connects to is that server.

How does WebRTC reach a phone number?

WebRTC has no concept of a phone number. Reaching one takes a gateway, a carrier, and a number you’re allowed to use as caller ID. Diagram of a browser call reaching a phone. The browser signals with SIP over secure WebSocket to a registrar, which connects by SIP to the carrier. Audio goes as Opus or G.711 over DTLS-SRTP to a media gateway, then often as G.711 at 8 kHz over RTP to the phone. WebRTC encryption ends at the gateway. Diagram of a browser call reaching a phone. The browser signals with SIP over secure WebSocket to a registrar, which connects by SIP to the carrier. Audio goes as Opus or G.711 over DTLS-SRTP to a media gateway, then often as G.711 at 8 kHz over RTP to the phone. WebRTC encryption ends at the gateway. Three things change at that gateway:
  • Audio can narrow. WebRTC endpoints must implement both Opus and G.711. When the phone side uses G.711, the caller’s wideband audio is reduced to 8 kHz for that leg, whichever codec the browser sent.
  • WebRTC’s encryption ends. The DTLS-SRTP session terminates at the gateway. Any protection on the carrier leg comes from the telephony side.
  • Keypad tones still work. The same RFC requires support for telephone events, so a browser client can drive a phone menu.

What codecs does WebRTC use, and how much bandwidth?

Every WebRTC browser must support a shared baseline, so two browsers can always agree on something. Opus spans 6 to 510 kbps. The same RFC suggests 16 to 20 kbps for wideband speech and 28 to 40 kbps for full-band speech. The audio is only part of what you send, though: Bar chart of one-direction voice bandwidth at 20 millisecond packets over IPv4. Opus wideband uses 20 kbps of audio plus 20 of headers, for 40 kbps. Opus full-band uses 32 plus 20, for 52 kbps. G.711 uses 64 plus 20, for 84 kbps. Over an hour in both directions, that is 36, 47, and 76 megabytes. Bar chart of one-direction voice bandwidth at 20 millisecond packets over IPv4. Opus wideband uses 20 kbps of audio plus 20 of headers, for 40 kbps. Opus full-band uses 32 plus 20, for 52 kbps. G.711 uses 64 plus 20, for 84 kbps. Over an hour in both directions, that is 36, 47, and 76 megabytes. IPv6 headers are 20 bytes longer, which adds 8 kbps to each stream at this packet rate. For a voice agent, the wideband path matters most: it gives a speech model more of the voice to work with than an 8 kHz phone leg does.

How is WebRTC different from SIP, WebSocket, and VoIP?

These terms sit at different levels, so a system often uses several of them at once. VoIP is the category. WebRTC is one way to do it, and so is SIP with RTP. They also combine well. A softphone can run SIP over a WebSocket for signalling and use WebRTC for its audio. If your choice is between SIP and WebSocket streaming on the telephony side, that guide covers it in depth.

When should you use WebRTC?

Start with who is on the other end and what they already have open.

Is WebRTC secure?

The media layer is secure by rule. RFC 8827 requires SRTP for all media, DTLS for all data channels, and DTLS-SRTP for keys, and it forbids plain RTP and null ciphers. Other risks sit around that layer, and these are yours to handle:
  • Signalling. The DTLS fingerprints travel in your SDP, so a compromised signalling path undermines the check. Use TLS and authenticate every user.
  • Servers in the path. SRTP protects each hop. An SFU, gateway, or AI server that terminates it can access the media. SFrame (RFC 9605) offers end-to-end encryption through an SFU when your design allows it.
  • IP address exposure. Connecting peers means revealing network addresses. RFC 8828 limits what a site sees until the user grants consent, and a relay-only policy can hide them further.
  • Credentials. Issue short-lived TURN credentials and client tokens, and never put a long-lived account secret in front-end code.

What changes when your users are in India?

The textbook WebRTC setup assumes office Wi-Fi. India’s Internet looks different, so test for it. Per TRAI’s April to June 2026 report, India had 1,114.17 million Internet subscribers at the end of June 2026, of whom 1,066.43 million were wireless. That’s about 96%, against 47.73 million on wired connections. IPv6 capability then varies widely by operator: Bar chart of IPv6 capability on Indian networks from APNIC Labs, read 3 November 2026. Jio 95.8 percent, Airtel mobile 89.8, Vi AS38266 82.3, Airtel broadband 77.3, all of India 76.4, Tata Play Broadband 74.1, Netplus 69.1, GTPL 45.1, ACT AS24309 43.4, BSNL 23.8, Excitel 8.1, and Hathway 1.8. Bar chart of IPv6 capability on Indian networks from APNIC Labs, read 3 November 2026. Jio 95.8 percent, Airtel mobile 89.8, Vi AS38266 82.3, Airtel broadband 77.3, all of India 76.4, Tata Play Broadband 74.1, Netplus 69.1, GTPL 45.1, ACT AS24309 43.4, BSNL 23.8, Excitel 8.1, and Hathway 1.8. These figures come from APNIC Labs’ India page, and they change daily. They measure capability, not WebRTC success. Operators can run several networks, so read the numbers as a guide to variety. Here’s what we’d do with that data. These are our recommendations, not measured WebRTC results:
  1. Test on real SIMs and home broadband. Include at least Jio, Airtel, and Vi mobile data, and one IPv4-heavy cable provider. Office Wi-Fi tells you little about your customers.
  2. Run TURN and media servers on both IPv4 and IPv6. A Jio user and a Hathway user may share no IPv6 path, so that call falls back to IPv4 and any carrier-grade NAT in front of it. A dual-stack relay can bridge the two families.
  3. Host relays in India for Indian users. A relay abroad adds a long round trip to every packet of the call.
  4. Report relay share by operator. Your national average can hide a single network that relays most of its calls.
  5. Keep audio bitrates modest on mobile. Wideband Opus uses about 36 MB an hour both ways, which suits long agent shifts and prepaid data better than full-band audio does.

Phone-call rules still apply

A browser is only the start of the call. Once it reaches an Indian phone number, India’s calling regulations apply, and the channel you started from changes nothing. That covers KYC, caller ID, number series, consent, and the media anchoring rule, under which both legs of a call stay in India. Check where your browser clients and media servers sit before you launch. TRAI’s Third Amendment regulations, issued on 18 September 2026 and summarised in press release 119/2026, also matter here:
  • Definition. An A2P call is one started by an application, software system, or automated platform without direct human dialling, including autodialling, robo-calls, and pre-recorded or artificial voice.
  • Duty. Once in force, senders must declare A2P use and caller ID ranges to their originating provider in advance. Undeclared calls found on investigation count as unsolicited.
  • Live agents. Stakeholders asked TRAI to exclude calls with a live human agent, and TRAI declined because networks can’t reliably tell the two apart.
  • Charge. Terminating operators can charge originating operators up to ₹0.05 per minute on A2P calls, with 140xx, 1600xx, and 1601xx series exempt.
An AI agent or an app-triggered callback appears to fit that definition. An agent who types a number into a browser softphone looks closer to direct human dialling, but the text doesn’t mention softphones, so confirm your flow with your provider. The declaration and the charge both start 60 days after Gazette publication. We couldn’t confirm that date, so check whether they’re in force when you launch. Separately, Khaitan & Co reports that DoT notified new authorisation rules under the Telecommunications Act, 2023 in June 2026. If you plan to offer calling as your own service, rather than as a customer of an authorised provider, take legal advice first.

How Vobiz handles WebRTC

Vobiz connects your WebRTC clients to phone numbers and call control. Here’s how each client type connects, per the docs:
  • Browser testing. The hosted WebRTC Playground makes and receives calls in a browser tab using your Auth ID and Auth Token. It creates its own application on first connect, and you attach a DID to receive inbound calls. The inbound guide walks through it.
  • Custom browser clients. Create a SIP endpoint, then register it over SIP on a WebSocket with the endpoint’s username and password. Each endpoint holds one active registration, so give each agent their own.
  • iOS apps. Run the browser SDK inside a WebView, or place calls through the Voice API and connect the app over your own transport.
  • Call logic. An application holds the Answer URL that returns VobizXML. Calls to an endpoint hit it.
  • Voice AI on phone calls. Connect trunks to a platform such as LiveKit, which brings callers into WebRTC rooms as SIP participants. Or use <Stream> for bidirectional WebSocket audio, with L16 at 8 or 16 kHz inbound and up to 24 kHz for playback.
  • WhatsApp calls. The WhatsApp calling API takes a WebRTC SDP offer and runs over WhatsApp’s own WebRTC infrastructure.
  • Quality data. Each call detail record reports the negotiated codec, with mos, jitter, and packet_loss.
Vobiz is available in 130+ countries, and current rates are on the pricing page. Test calls are real and billed to your account. Use your own credentials, confirm numbers first, and enter your Auth Token only on Vobiz services or your own server.

Frequently asked questions

WebRTC means Web Real-Time Communication. The name covers a browser API, a set of network protocols, and an open-source engine that work together. They let a web page or app send live audio, video, and data without a plugin.
It can be. Media goes directly between two peers when the network allows, and through a TURN relay when it doesn’t. Many business deployments also put a media server in the path for recording, group calls, or AI. Setup always needs a signalling server.
Encryption is mandatory: SRTP protects media and DTLS protects data channels, with no plain mode. Your application still has to secure signalling, login, and any server in the media path, because that server can access the audio.
For a production service, yes. Some networks block every direct path, and those calls fail without a relay. Published estimates put relayed sessions between about 8% and 25%, so measure your own share. Offer TURN over UDP and over TLS.
Not by itself, because WebRTC connects browsers, apps, and servers over IP. To reach a phone number, you need a gateway that joins the session to a carrier, plus a number to use as caller ID. On Vobiz, a registered endpoint can place those calls.
The standards and the open-source code cost nothing to use. Running a real service does cost money: signalling servers, TURN bandwidth, and any media servers. Calls that reach the phone network also carry telephony charges.

Further reading on Vobiz

Sources

Web and browser standards IETF standards India Industry estimates

Build on Vobiz

Get a number and connect your WebRTC client to the phone network.