diff --git a/src/call.cpp b/src/call.cpp index eca7f5ab36d0e5c1ce92c934732fbb10d3dadac7..b75637c6ca1411fb9fed7d1019cd76acffffb62d 100644 --- a/src/call.cpp +++ b/src/call.cpp @@ -152,7 +152,6 @@ Call::removeCall() setState(CallState::OVER); if (Recordable::isRecording()) Recordable::stopRecording(); - Manager::instance().checkAudio(); } const std::string& diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index 4732252d0a106a0a503efcea511ca985dd086ca8..cf541fc85526e102840746d46828b94249cb275f 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -763,12 +763,15 @@ SIPCall::sendTextMessage(const std::map<std::string, std::string>& messages, void SIPCall::removeCall() { - std::lock_guard<std::recursive_mutex> lk {callMutex_}; - JAMI_WARN("[call:%s] removeCall()", getCallId().c_str()); - Call::removeCall(); - mediaTransport_.reset(); - inv.reset(); - setTransport({}); + { + std::lock_guard<std::recursive_mutex> lk {callMutex_}; + JAMI_WARN("[call:%s] removeCall()", getCallId().c_str()); + Call::removeCall(); + mediaTransport_.reset(); + inv.reset(); + setTransport({}); + } + Manager::instance().checkAudio(); } void