From 4e8ff419148ad97d22e90d90475911f27e7499c3 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.net>
Date: Thu, 20 Aug 2009 17:36:16 -0400
Subject: [PATCH] [#1883] Move switchCall in onHoldCall function
Signed-off-by: Alexandre Savard <alexandre.savard@savoirfairelinux.net>
---
sflphone-common/src/managerimpl.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp
index abfc99b3eb..d39f198899 100644
--- a/sflphone-common/src/managerimpl.cpp
+++ b/sflphone-common/src/managerimpl.cpp
@@ -221,7 +221,7 @@ ManagerImpl::outgoingCall (const std::string& accountid, const CallID& id, const
Call::CallConfiguration callConfig;
SIPVoIPLink *siplink;
- _debug ("ManagerImpl::outgoingCall() method \n");
+ _debug ("ManagerImpl::outgoingCall(%s)\n", id.c_str());
if (getConfigString (HOOKS, PHONE_NUMBER_HOOK_ENABLED) == "1")
_cleaner->set_phone_number_prefix (getConfigString (HOOKS, PHONE_NUMBER_HOOK_ADD_PREFIX));
@@ -282,7 +282,8 @@ ManagerImpl::outgoingCall (const std::string& accountid, const CallID& id, const
bool
ManagerImpl::answerCall (const CallID& id)
{
- bool isActive = false;
+
+ _debug("ManagerImpl::answerCall(%s)", id.c_str());
stopTone (true);
@@ -455,8 +456,7 @@ ManagerImpl::onHoldCall (const CallID& id)
call_id = id;
- if(participToConference(id))
- removeParticipant(id);
+ switchCall (id);
/* Direct IP to IP call */
@@ -500,11 +500,13 @@ ManagerImpl::offHoldCall (const CallID& id)
call_id = id;
//Place current call on hold if it isn't
- if (hasCurrentCall()) {
+ if (hasCurrentCall() ) {
_debug ("Put the current call (ID=%s) on hold\n", getCurrentCallId().c_str());
onHoldCall (getCurrentCallId());
}
+ switchCall(id);
+
/* Direct IP to IP call */
if (getConfigFromCall (id) == Call::IPtoIP) {
rec = SIPVoIPLink::instance (AccountNULL)-> isRecording (id);
@@ -535,7 +537,7 @@ ManagerImpl::offHoldCall (const CallID& id)
}
- switchCall (id);
+ // switchCall (id);
codecName = getCurrentCodecName (id);
// _debug("ManagerImpl::hangupCall(): broadcast codec name %s \n",codecName.c_str());
--
GitLab