WebRTC (Web Real-Time Communications)
WebRTC is a browser-native API and protocol stack for peer-to-peer audio, video, and data transfer. It runs in every modern browser without plugins and is the foundation for browser-based softphones and voice agents.
Stack overview
WebRTC bundles four protocol families:
- Signaling: typically SIP-over-WebSocket (RFC 7118) or a custom HTTP/WS API. The browser exchanges SDP offers/answers.
- NAT traversal: ICE (RFC 8445), STUN, TURN.
- Media: SRTP (encrypted RTP) keyed via DTLS-SRTP.
- Codecs: Opus (audio), VP8/VP9/H.264/AV1 (video), G.711 (PSTN interop).
Browser API
const pc = new RTCPeerConnection({ iceServers: [ { urls: "stun:stun.didhub.io:3478" }, { urls: "turn:turn.didhub.io:443?transport=tcp", username: "u", credential: "p" }, ], }); const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); stream.getTracks().forEach(t => pc.addTrack(t, stream)); const offer = await pc.createOffer(); await pc.setLocalDescription(offer); // Send offer.sdp to your signaling server (SIP WSS or custom)
WebRTC to PSTN interop
WebRTC alone cannot reach the PSTN — you need a SIP gateway that bridges WebRTC media (DTLS-SRTP, Opus) to traditional SIP/RTP (G.711). DIDHub provides this bridge as part of every SIP trunk: just send your INVITE over WSS and the carrier handles transcoding.
Related terms
Related glossary terms
Asterisk (open-source PBX framework)
Asterisk is the original open-source telephony framework, started by Mark Spencer in 1999. It is a Class 5 PBX engine: it terminates SIP/IAX
Attestation Levels (A, B, C)
Attestation levels are the three trust ratings that an originating carrier assigns to outbound calls under STIR/SHAKEN. They tell the termin
Auto-Provisioning (zero-touch desk phone setup)
Auto-provisioning is how you deploy 50, 500, or 50,000 desk phones without manually configuring each one. The phone boots, fetches its confi
BYOC (Bring Your Own Carrier)
BYOC is a deployment model where you use a third-party SaaS platform (Vapi, Retell, Microsoft Teams, Zoom Phone, Twilio Flex) for the call-c
Ready to get a number?
Pick a DID in 130+ countries from $1.99/month. Activates instantly on most numbers.