Skip to content
Snippets Groups Projects
Commit f4a56d34 authored by Hugo Lefeuvre's avatar Hugo Lefeuvre Committed by Sébastien Blin
Browse files

conferences: better handle conf state changes


Never emit callStatusChanged in togglePause and wait for
daemon's signal to do so. Handle ACTIVE_DETACHED and
ACTIVE_ATTACHED in call::to_status().

Change-Id: Ic6d709d37be053e82949b71f628e08631ce135d4
Gitlab: #389
Reviewed-by: default avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
parent a10fb62a
No related branches found
No related tags found
No related merge requests found
...@@ -98,9 +98,9 @@ to_status(const std::string& status) ...@@ -98,9 +98,9 @@ to_status(const std::string& status)
return Status::OUTGOING_RINGING; return Status::OUTGOING_RINGING;
else if (status == "HUNGUP") else if (status == "HUNGUP")
return Status::TERMINATING; return Status::TERMINATING;
else if (status == "HOLD") else if (status == "HOLD" || status == "ACTIVE_DETACHED")
return Status::PAUSED; return Status::PAUSED;
else if (status == "UNHOLD" || status == "CURRENT") else if (status == "UNHOLD" || status == "CURRENT" || status == "ACTIVE_ATTACHED")
return Status::IN_PROGRESS; return Status::IN_PROGRESS;
else if (status == "INACTIVE" || status == "BUSY") else if (status == "INACTIVE" || status == "BUSY")
return Status::INACTIVE; return Status::INACTIVE;
......
...@@ -239,21 +239,18 @@ NewCallModel::togglePause(const std::string& callId) const ...@@ -239,21 +239,18 @@ NewCallModel::togglePause(const std::string& callId) const
{ {
if (!hasCall(callId)) return; if (!hasCall(callId)) return;
auto& call = pimpl_->calls[callId]; auto& call = pimpl_->calls[callId];
if (call->status == call::Status::PAUSED) { if (call->status == call::Status::PAUSED) {
if (call->type == call::Type::DIALOG) if (call->type == call::Type::DIALOG)
CallManager::instance().unhold(callId.c_str()); CallManager::instance().unhold(callId.c_str());
else { else {
CallManager::instance().unholdConference(callId.c_str()); CallManager::instance().unholdConference(callId.c_str());
call->status = call::Status::IN_PROGRESS;
emit callStatusChanged(callId);
} }
} else if (call->status == call::Status::IN_PROGRESS) { } else if (call->status == call::Status::IN_PROGRESS) {
if (call->type == call::Type::DIALOG) if (call->type == call::Type::DIALOG)
CallManager::instance().hold(callId.c_str()); CallManager::instance().hold(callId.c_str());
else { else {
CallManager::instance().holdConference(callId.c_str()); CallManager::instance().holdConference(callId.c_str());
call->status = call::Status::PAUSED;
emit callStatusChanged(callId);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment