Skip to content

1.0.2

Latest

Choose a tag to compare

@yasir-rasheed-dev yasir-rasheed-dev released this 19 Sep 14:34
frontend: translate raw SIP error codes into agent-readable messages

Dial/registration failures were surfacing the wire protocol text
verbatim — "Call failed: 487 Request Terminated", a bare "404" — which
agents don't know how to act on.

lib/sipErrors.js: friendlyCallError(reason, fallback) maps the common SIP
response codes (404 not reachable, 486 busy, 487 ended before connecting,
408 timed out, 480/603 unavailable/declined, 5xx carrier/server issue,
...) and recognizable WebRTC/browser exceptions (mic permission/device/
network) to a plain sentence; anything still code- or exception-shaped
falls back to a generic "please try again" instead of leaking raw text.

Wired into Softphone.jsx's onCallRejected, the call() setup catch, and
onRegistrationRejected (401/403 get a specific "check the password"
message). Single shared component, so this covers the web UI and the
Electron call window.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>