SIP.js is a comprehensive JavaScript library designed for building real-time communication applications using SIP (Session Initiation Protocol) over WebSockets, with deep integration for WebRTC. It enables peer-to-peer audio and video sessions, instant messaging, presence, and DTMF signaling. The current stable version is 0.21.2. The project maintains an active release cadence with regular minor and patch updates, often introducing new features and addressing bugs. Key differentiators include its TypeScript-first development, compatibility with standard SIP servers like Asterisk and FreeSWITCH, and support for all major web browsers and Node.js environments. It offers both a simplified `SimpleUser` API for common use cases and a full API framework for more granular control over SIP sessions.
npm install sip.jsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to establish a basic audio-only SIP call using the `SimpleUser` API, connecting to a WebSocket server, and handling call initiation with basic error logging.
Migrate all imports to ES module syntax (e.g., `import { Name } from 'sip.js';`). Update TypeScript compiler options `module` and `moduleResolution` to `NodeNext` and ensure all imports are fully specified with `.js` extensions.Update calls to `simpleUser.register()` to match the new signature. If options are needed, pass them via the `registererOptions` property in the `SimpleUser` constructor: `const simpleUser = new Web.SimpleUser(server, { registererOptions: { expires: 1800 } });`.Review and adapt custom Session Description Handlers to conform to the new RFC 8829 compliant implementation. Existing workarounds for previous non-compliant behavior may need to be removed or adjusted.
Replace `hackWssInTransport: true` in `UserAgentOptions` with `contactParams: { transport: "wss" }`.If your application extended the default Session Description Handler, manually copy the old default SDH source code into your project to ensure continued functionality.
Update all `require()` statements to ES module `import` syntax, e.g., `import { UserAgent } from 'sip.js';`Pass `RegistererRegisterOptions` via the `registererOptions` property in the `SimpleUser` constructor instead of directly to the `register()` method.
Remove `hackWssInTransport` from `UserAgentOptions` and use `contactParams: { transport: "wss" }` instead.No dependency data recorded yet.