How Peer-to-Peer Calls Work (WebRTC Explained Simply)
What happens when you press call? A plain-English explanation of WebRTC, peer-to-peer connections, STUN and TURN servers, and why direct calls feel faster.
You tap the call button and a second later you're talking. Behind that second is a clever technology called WebRTC.
Step 1: Signalling — the introduction
Your phone tells the Yapie server "I want to call Sara". The server forwards that to Sara's devices, which ring. When she accepts, the two devices exchange technical details (supported codecs, network addresses) through the server. This is **signalling**.Step 2: Finding a path — ICE, STUN and TURN
Most phones sit behind routers that hide their real address (NAT). To connect directly, the devices need to discover how they're reachable:- STUN servers tell each device its public address, like looking in a mirror.
- The devices try several possible paths and pick the best one — this process is called ICE.
- If no direct path works (strict corporate or mobile networks), a TURN server relays the audio and video between them.
Step 3: Media flows peer-to-peer
Once a path is found, voice and video travel **directly between devices**, encrypted in transit with DTLS-SRTP (a WebRTC requirement). Direct paths usually mean **lower delay** than routing every packet through a far-away server.Group calls
In small group calls each device can connect to each other device (a "mesh"). That's efficient for a handful of people; very large calls need a media server to scale.Screen sharing
Screen sharing is just another video track. Yapie can add it mid-call — even to a voice call — by renegotiating the connection, which is why you can share your screen without turning on your camera.What this means for you
- Calls start fast and feel responsive. - Quality depends on both people's connections — see [call quality tips](/blog/call-quality-slow-internet-tips). - Server operators can configure their own STUN/TURN servers for difficult networks.Frequently asked questions
What is WebRTC?
An open standard built into browsers and apps for real-time voice, video and data between devices.Are WebRTC calls encrypted?
Yes. WebRTC encrypts media in transit using DTLS-SRTP.Why do some calls fail to connect?
Strict networks can block direct connections; a TURN relay server is needed in those cases.Try Yapie free
No credit card, no Google account needed. Your chats come with you to every device.