SIP over WebSocket (WSS)
SIP over Secure WebSocket (WSS) is a transport binding (RFC 7118) that lets browsers and JavaScript softphones speak SIP signaling natively. Combined with WebRTC media, it is how zero-install browser phones work.
Why WebSocket?
SIP traditionally runs on UDP/TCP/TLS. Browsers cannot open raw UDP or TCP sockets, so SIP-over-WebSocket was standardized to fit the browser's networking model. WSS = WebSocket Secure (over TLS).
The wire format is plain SIP messages framed by WebSocket's text-frame boundary — the same INVITE / 200 OK / BYE you would send over UDP, just wrapped in a WebSocket frame.
Connection example
// Using sip.js const ua = new SIP.UserAgent({ uri: SIP.UserAgent.makeURI("sip:user@didhub.io"), transportOptions: { server: "wss://wss.didhub.io", }, authorizationUsername: "trunk_xxxxx", authorizationPassword: "<PASSWORD>", }); await ua.start();
Common gotchas
- Mixed-content: a page served over HTTPS cannot connect to
ws://— onlywss://. - Origin allow-list: the WSS server should accept the browser's
Originheader. DIDHub WSS accepts any origin for trunked customers. - Keepalives: NATs and proxies kill idle WebSockets. Set CRLF keepalives every 30s.
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.