mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-01-25 02:07:56 +00:00
* fix: propagate SIP 488 error to SBC on endpoint allocation failure When FreeSWITCH returns a SIP 488 'Not Acceptable Here' error during endpoint allocation (e.g., codec incompatibility), this error was not being propagated back to the SBC/client. Instead, the call would wait indefinitely for websocket commands or return a generic 603 response. Implementation: - In _evalEndpointPrecondition(), detect SipError by checking err.type === 'SipError' or err.name === 'SipError' - Extract the SIP status code (e.g., 488), reason, and the Reason header from the error response (e.g., Q.850;cause=88;text=INCOMPATIBLE_DESTINATION) - Send the SIP error response immediately to the SBC with: - X-Reason header: endpoint allocation failure details - Reason header: original Q.850 cause from FreeSWITCH - Notify call status change as Failed with proper SIP status - Release the call immediately instead of waiting for commands Also added fallback handling in InboundCallSession._onTasksDone() to propagate the stored error if immediate send was not possible. * wip * Simplify SipError check to only use err.name