KamoCRM

Pipe sip.js init steps to server log via beacon

Otherkamo-internal
Shipped
26 ஏப்ரல், 2026 அன்று 8:39 PM UTC
Author
kamo
Commit
6fd7d5c

The browser-side SDK init failure is currently invisible — the popup just says "Phone SDK failed to initialize" with no message, the WebSocket never opens, and we have no DevTools output. Add a /api/softphone-debug beacon endpoint that logs whatever the browser POSTs, then have SipJsPhoneSdk emit a step-by-step trail of phase events (precheck, new-UserAgent-failed, ua-start-call, ua-start-failed, register-call, register-rejected/threw, etc.). Each phase carries any underlying error message. This lets us read kamo-internal pod logs to see exactly where init dies without round-tripping through the browser console.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing