From 7827033456a26f269ce8eceba215ecaee5825f1a Mon Sep 17 00:00:00 2001 From: Eddie Fiorentine Date: Sun, 4 Jan 2026 22:22:17 -0500 Subject: [PATCH] Update server/monitor-types/sip-options.js Co-authored-by: Frank Elsinga --- server/monitor-types/sip-options.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/monitor-types/sip-options.js b/server/monitor-types/sip-options.js index 1f80c8525..ad315cc2e 100644 --- a/server/monitor-types/sip-options.js +++ b/server/monitor-types/sip-options.js @@ -32,7 +32,16 @@ class SIPMonitorType extends MonitorType { * @throws Will throw an error if the command execution encounters any error. */ async runSipSak(hostname, port, timeout) { - const { stdout, stderr } = await exec(`sipsak -s sip:${hostname}:${port} --from sip:sipsak@${hostname} -v`, { timeout: timeout }); + const { stdout, stderr } = await execFile( + "sipsak", + [ + "-s", `sip:${hostname}:${port}`, + "--from", `sip:sipsak@${hostname}`, + "-v", + ], + { timeout } + ); + if (!stdout && stderr && stderr.toString()) { throw new Error(`Error in output: ${stderr.toString()}`); }