JsSIP browser softphone library
JsSIP is the JavaScript library that turns a browser tab into a phone. Connect's softphone uses it to register a person's SIP endpoint with the carrier over secure WebSocket and to carry the call's audio over WebRTC. It is vendored as one self-contained file with a recorded checksum, and it is loaded only when the phone connects.
What it is#
JsSIP is an open-source SIP stack for browsers, maintained by Versatica. It implements SIP over WebSocket (RFC 7118) for signalling and uses the browser's WebRTC for media.
npm publishes JsSIP as CommonJS, which a browser cannot import directly, and CDN builds tried earlier still imported their dependencies from absolute paths. Connect bundles version 3.13.8 once with esbuild into a single ES module with no imports, and records how, so the build is reproducible byte for byte.
- Category
- SIP over WebSocket (browser)
- Version
- 3.13.8, bundled with esbuild
- File
webapp/vendor/jssip.esm.js, withjssip.esm.js.sha256- Official site
- jssip.net
Where Connect uses it#
| Place in Connect | What it does there |
|---|---|
softphone.js | Loads JsSIP dynamically inside connect() and registers the endpoint |
| Carrier registrar | Secure WebSocket to the carrier (Vobiz) |
tools/test_softphone_ui_v1.py | Asserts the file has no imports: the check that would have caught the outage |
How it connects#
- A person opens the phone;
softphone.jsimports JsSIP - JsSIP opens a secure WebSocket to the registrar
- REGISTER with the person's own SIP endpoint
- An INVITE sets up the call, and WebRTC carries the audio
- Hang-up sends BYE; the call record is written by the server from the carrier's events
Benefits and limits#
What it gives Connect:
- A full phone in the browser without a plugin or desk handset.
- Per-person endpoints can be revoked individually.
- Loaded lazily, so a phone failure stays inside the phone.
Where it stops, and what Connect does about it:
- A registered phone that never rings fails silently. Upgrades need a real registration test, not only the suite.
- Browsers need microphone permission and a secure origin.
- Network address translation can block media. Calls depend on the carrier's media relay.
Security and privacy#
- SIP over TLS WebSocket (
wss://), never plainws://. - Endpoint credentials are issued per person and kept out of the page source.
- The sha256 record makes any change to the vendored bundle visible in review.
Licence, cost and versions#
| Question | Answer |
|---|---|
| Licence | MIT |
| Cost | None. Call charges are the carrier's |
| Version | 3.13.8 (vendored) |
| Compatibility | Current browsers with WebRTC; built with --target=es2020 |
Troubleshooting#
- The whole app fails to load after an upgrade
- The new bundle has an import. It must have none.
- Registered but no incoming calls
- The registrar address or the endpoint is wrong. Use the carrier SDK's working address.
- One-way audio
- A NAT or firewall is blocking media. Test from another network.
Official references#
Questions#
Why not load JsSIP from a CDN?
Every CDN build tried still imported dependencies from absolute paths that resolved against Connect's own origin and 404'd. That broke the module graph for the entire app. A single self-contained vendored file removes the risk.
Does the softphone record calls in the browser?
No. Call records come from the server and the carrier's events, under the workspace's settings.