Skip to content
Snippets Groups Projects
Commit 1ad7e284 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#5921: Fix no audio after holding a conference

parent 22c277bc
No related branches found
No related tags found
No related merge requests found
......@@ -625,77 +625,75 @@ bool ManagerImpl::onHoldCall (const CallID& callId)
}
//THREAD=Main
bool ManagerImpl::offHoldCall (const CallID& call_id)
bool ManagerImpl::offHoldCall (const CallID& callId)
{
AccountID account_id;
AccountID accountId;
bool returnValue, isRec;
std::string codecName;
isRec = false;
_debug ("Manager: Put call %s off hold", call_id.c_str());
_debug ("Manager: Put call %s off hold", callId.c_str());
stopTone();
CallID current_call_id = getCurrentCallId();
CallID currentCallId = getCurrentCallId();
//Place current call on hold if it isn't
if (hasCurrentCall()) {
// if this is not a conference and this and is not a conference participant
if (!isConference (current_call_id) && !participToConference (current_call_id)) {
_debug ("Manager: Has current call (%s), put on hold", current_call_id.c_str());
onHoldCall (current_call_id);
} else if (isConference (current_call_id) && !participToConference (call_id)) {
detachParticipant (default_id, current_call_id);
if (!isConference (currentCallId) && !participToConference (currentCallId)) {
_debug ("Manager: Has current call (%s), put on hold", currentCallId.c_str());
onHoldCall (currentCallId);
} else if (isConference (currentCallId) && !participToConference (callId)) {
detachParticipant (default_id, currentCallId);
}
}
/* Direct IP to IP call */
if (getConfigFromCall (call_id) == Call::IPtoIP) {
if (getConfigFromCall (callId) == Call::IPtoIP) {
// is_rec = SIPVoIPLink::instance (AccountNULL)-> isRecording (call_id);
returnValue = SIPVoIPLink::instance (AccountNULL)-> offhold (call_id);
returnValue = SIPVoIPLink::instance (AccountNULL)-> offhold (callId);
}
/* Classic call, attached to an account */
else {
account_id = getAccountFromCall (call_id);
accountId = getAccountFromCall (callId);
_debug ("Manager: Setting offhold, Account %s, callid %s", account_id.c_str(), call_id.c_str());
_debug ("Manager: Setting offhold, Account %s, callid %s", accountId.c_str(), callId.c_str());
isRec = getAccountLink (account_id)->getCall (call_id)->isRecording();
returnValue = getAccountLink (account_id)->offhold (call_id);
isRec = getAccountLink (accountId)->getCall (callId)->isRecording();
returnValue = getAccountLink (accountId)->offhold (callId);
}
if (_dbus == NULL) {
_error("Manager: Error: DBUS not initialized");
}
if (_dbus) {
if (isRec) {
_dbus->getCallManager()->callStateChanged (call_id, "UNHOLD_RECORD");
_dbus->getCallManager()->callStateChanged (callId, "UNHOLD_RECORD");
}
else {
_dbus->getCallManager()->callStateChanged (call_id, "UNHOLD_CURRENT");
}
_dbus->getCallManager()->callStateChanged (callId, "UNHOLD_CURRENT");
}
if (participToConference (call_id)) {
if (participToConference (callId)) {
AccountID currentAccountId;
Call* call = NULL;
currentAccountId = getAccountFromCall (call_id);
call = getAccountLink (currentAccountId)->getCall (call_id);
currentAccountId = getAccountFromCall (callId);
call = getAccountLink (currentAccountId)->getCall (callId);
switchCall (call->getConfId());
} else {
switchCall (call_id);
// audioLayerMutexLock();
// _audiodriver->flushMain();
// audioLayerMutexUnlock();
addStream(call_id);
switchCall (callId);
}
addStream(callId);
getMainBuffer()->stateInfo();
return returnValue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment