Browser and mobile softphone via SIP over WebSocket
PBX supports WebRTC calling, allowing users to make and receive calls directly from a web browser or mobile app without installing any SIP software.
Browser (JsSIP/SIP.js)
↕ WSS (SIP over WebSocket)
Drachtio SIP Server
↕ RTP via rtpengine
PSTN / Other ExtensionsWebRTC calls use:
wss://sip.pbx.dev:8443/v1/pbx/ice-serversGet STUN/TURN server configuration
curl -X GET "https://api.do.dev/v1/pbx/ice-servers" \
-H "Authorization: Bearer do_live_your_key_here"{
"iceServers": [
{ "urls": "stun:turn.pbx.dev:3478" },
{
"urls": ["turn:turn.pbx.dev:3478", "turns:turn.pbx.dev:443"],
"username": "1711460000:ext_101",
"credential": "generated_credential_here"
}
],
"expiresAt": "2026-03-26T15:00:00Z"
}TURN credentials are time-limited and auto-rotated. Request fresh credentials before each call.
import JsSIP from "jssip";
const socket = new JsSIP.WebSocketInterface("wss://sip.pbx.dev:8443");
const ua = new JsSIP.UA({
sockets: [socket],
uri: "sip:101_a1b2c3@pbx.dev",
password: "sip_password_here",
display_name: "Front Desk",
});
ua.on("registered", () => console.log("Registered"));
ua.on("newRTCSession", (data) => {
const session = data.session;
// Handle incoming/outgoing call
});
ua.start();const session = ua.call("sip:102@pbx.dev", {
mediaConstraints: { audio: true, video: false },
pcConfig: {
iceServers: iceServers, // from /ice-servers endpoint
},
});The PBX mobile app (React Native) uses the same WebRTC infrastructure. It registers via WebSocket, receives push notifications for incoming calls, and renders a native calling UI.