diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index 74b9f0d1575b89005fcbefda143cf35e80d91a20..052b87fadfaf8a41f3f7ab0a8ed4975257674b83 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -779,6 +779,19 @@ ManagerImpl::refuseCall (const CallID& id) stopTone (true); + + int nbCalls = getCallList().size(); + + // AudioLayer* audiolayer = getAudioDriver(); + + if (nbCalls <= 1) + { + _debug(" hangupCall: stop audio stream, ther is only %i call(s) remaining\n", nbCalls); + + AudioLayer* audiolayer = getAudioDriver(); + audiolayer->stopStream(); + } + /* Direct IP to IP call */ if (getConfigFromCall (id) == Call::IPtoIP) { @@ -809,6 +822,8 @@ ManagerImpl::refuseCall (const CallID& id) switchCall (""); } + + return returnValue; }