{"record":{"id":"d48b11018fd20da2","repo":"louislam/uptime-kuma","slug":"no-output-from-sipsak","errorCode":null,"errorMessage":"No output from sipsak","messagePattern":"No output from sipsak","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/monitor-types/sip-options.js","lineNumber":43,"sourceCode":"     * @param {number} port SIP server port\n     * @param {number} timeout timeout of options reply\n     * @returns {Promise<string>} A Promise that resolves to the output of the Sipsak options ping\n     * @throws Will throw an error if the command execution encounters any error.\n     */\n    async runSipSak(hostname, port, timeout) {\n        const { stdout, stderr } = await execFile(\n            \"sipsak\",\n            [\"-s\", `sip:${hostname}:${port}`, \"--from\", `sip:sipsak@${hostname}`, \"-v\"],\n            { timeout }\n        );\n\n        if (!stdout && stderr && stderr.toString()) {\n            throw new Error(`Error in output: ${stderr.toString()}`);\n        }\n        if (stdout && stdout.toString()) {\n            return stdout.toString();\n        } else {\n            throw new Error(\"No output from sipsak\");\n        }\n    }\n\n    /**\n     * @param {string} res response to be parsed\n     * @param {object} heartbeat heartbeat object to update\n     * @returns {void} returns nothing\n     */\n    parseSipsakResponse(res, heartbeat) {\n        let lines = res.split(\"\\n\");\n        for (let line of lines) {\n            if (line.includes(\"200 OK\")) {\n                heartbeat.status = UP;\n                heartbeat.msg = line;\n                break;\n            }\n        }\n    }","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/monitor-types/sip-options.js#L25-L61","documentation":"If execFile resolved with neither stdout nor stderr content, sipsak produced nothing usable — no answer and no diagnostic. The monitor cannot determine success and throws 'No output from sipsak'. This is distinct from error 116 (which had stderr); here the binary was silent.","triggerScenarios":"sipsak exited cleanly (so execFile did not throw) but emitted nothing on either stream: typically a timeout-truncated run where the { timeout } option killed the child mid-flight before output, or a version of sipsak that swallows output.","commonSituations":"SIP server not answering OPTIONS (silent drop), timeout too short, packet loss on UDP SIP, or sipsak built with output suppressed.","solutions":["Increase the monitor timeout so sipsak has time to receive a SIP response.","Verify the SIP server answers OPTIONS requests (sngrep / tcpdump on port 5060).","Confirm UDP vs TCP transport matches what the SIP server expects.","Run sipsak manually to see whether any output ever appears."],"exampleFix":"// before\nmonitor.timeout = 2;  // sipsak killed before SIP reply\n// after\nmonitor.timeout = 10;","handlingStrategy":"retry","validationCode":"function preflightSipTimeout(timeout, interval) {\n  if (timeout >= interval) return;\n  // sipsak needs headroom for UDP retransmits; warn if too tight\n  if (timeout < 5) console.warn('SIP timeout very low; sipsak may produce no output');\n}","typeGuard":"function isSilentSipsak(out) { return !!out && !out.stdout && !out.stderr; }","tryCatchPattern":"try {\n  await runSipSak(hostname, port, timeout);\n} catch (e) {\n  if (e.message === 'No output from sipsak') {\n    // retry once with a longer timeout; if still silent, the SIP server is not answering\n  }\n  throw e;\n}","preventionTips":["Set the monitor timeout generously for SIP/UDP retransmits.","Verify the SIP server responds to OPTIONS with sngrep/tcpdump.","Distinguish 'no output' (timeout) from 'error in output' (server-rejected)."],"tags":["sip","sipsak","timeout","subprocess"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}