From 80240f62ef019e149ca4058cc00c0e649aae9c4d Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 30 Jul 2025 09:54:08 +0300 Subject: [PATCH] MT#55283 fix recording auto-start when paused on new offer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a new offer is received while recording is in paused mode, recording should remain paused until explicitly re-enabled. The detect_setup_recording function was starting recording when record_call flags were set, ignoring the current pause state. 🤖 Generated with [Claude Code](https://claude.ai/code) Closes #1983 Change-Id: I49daf03532b74ec942550b184a7e7d2828e70f81 Co-Authored-By: Claude --- daemon/recording.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/recording.c b/daemon/recording.c index 930837720..f9185c3d1 100644 --- a/daemon/recording.c +++ b/daemon/recording.c @@ -495,8 +495,12 @@ void detect_setup_recording(call_t *call, const sdp_ng_flags *flags) { const str *recordcall = &flags->record_call_str; - if (!str_cmp(recordcall, "yes") || !str_cmp(recordcall, "on") || flags->record_call) - recording_start(call); + if (!str_cmp(recordcall, "yes") || !str_cmp(recordcall, "on") || flags->record_call) { + // Don't auto-start recording if it's currently paused + // Only start if there's no existing recording or if recording is not paused + if (!call->recording || CALL_ISSET(call, RECORDING_ON)) + recording_start(call); + } else if (!str_cmp(recordcall, "no") || !str_cmp(recordcall, "off")) recording_stop(call); else if (!str_cmp(recordcall, "discard") || flags->discard_recording)