diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index 7d66305764a7ab3674c4758d2022da21152d06d8..a4fc3fb56285a121f003bbb10eff382b88492406 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -806,6 +806,12 @@ SIPVoIPLink::hangup (const CallID& id) return false; } + // Release RTP thread + if (Manager::instance().isCurrentCall (id)) { + _debug ("* SIP Info: Stopping AudioRTP for hangup\n"); + _audiortp->stop(); + } + // User hangup current call. Notify peer status = pjsip_inv_end_session (call->getInvSession(), 404, NULL, &tdata); @@ -825,12 +831,14 @@ SIPVoIPLink::hangup (const CallID& id) call->getInvSession()->mod_data[getModId() ] = NULL; + // Release RTP thread if (Manager::instance().isCurrentCall (id)) { _debug ("* SIP Info: Stopping AudioRTP for hangup\n"); call->getAudioRtp()->stop(); } + terminateOneCall (id); removeCall (id); @@ -852,6 +860,12 @@ SIPVoIPLink::peerHungup (const CallID& id) return false; } + // Release RTP thread + if (Manager::instance().isCurrentCall (id)) { + _debug ("* SIP Info: Stopping AudioRTP for hangup\n"); + _audiortp->stop(); + } + // User hangup current call. Notify peer status = pjsip_inv_end_session (call->getInvSession(), 404, NULL, &tdata); @@ -868,12 +882,14 @@ SIPVoIPLink::peerHungup (const CallID& id) call->getInvSession()->mod_data[getModId() ] = NULL; + // Release RTP thread if (Manager::instance().isCurrentCall (id)) { _debug ("* SIP Info: Stopping AudioRTP for hangup\n"); call->getAudioRtp()->stop(); } + terminateOneCall (id); removeCall (id);