diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index ef329f245b686691f8dd9542eb725f667d6d7660..008724b987c5a814a0af858fc74e03f03bdb33e5 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -1408,6 +1408,10 @@ SIPCall::startAllMedia() bool peer_holding {true}; int slotN = -1; + // reset + readyToRecord_ = false; + resetMediaReady(); + for (const auto& slot : slots) { ++slotN; const auto& local = slot.first; @@ -2018,7 +2022,8 @@ SIPCall::toggleRecording() return false; } auto title = fmt::format("Conversation at %TIMESTAMP between {} and {}", - account->getUserUri(), peerUri_); + account->getUserUri(), + peerUri_); recorder_->setMetadata(title, ""); // use default description auto const& audioRtp = getAudioRtp(); if (audioRtp) @@ -2033,8 +2038,6 @@ SIPCall::toggleRecording() } else { updateRecState(false); deinitRecorder(); - readyToRecord_ = false; - resetMediaReady(); } pendingRecord_ = false; return Call::toggleRecording();