@sautikit/webrtc
v0.1.2
Published
Sautikit browser WebRTC calling SDK: mint a SIP token server-side, then place and receive phone calls from the browser.
Maintainers
Readme
@sautikit/webrtc
Browser WebRTC calling for Sautikit. Your server mints a short-lived SIP token; this SDK uses it to open a WebSocket to the Sautikit SIP gateway and place or receive phone calls from any browser tab, with call billing attributed to your workspace's KES wallet.
Install
npm install @sautikit/webrtcUse
import { Client, WebRTCError } from "@sautikit/webrtc";
const client = new Client({
endpoint: "wss://sip.sautikit.com", // your workspace's SIP gateway
// ...token/config: see ClientConfig
});
client.on("incoming", (call) => {
// ring your UI; call client.accept() / client.reject()
});
await client.call("+254700000001");
// client.hangup(), client.mute(), client.dtmf("1"), client.destroy()The public API is the Client class plus the WebRTCError type and the event
payload types exported from the package root.
