diff --git a/src/api/call.h b/src/api/call.h index 06f1ffdf5fc614a770c2d45fc133726a356f024d..0bcabd7126149be7aed91876a80ca5ed777c125c 100644 --- a/src/api/call.h +++ b/src/api/call.h @@ -98,9 +98,9 @@ to_status(const std::string& status) return Status::OUTGOING_RINGING; else if (status == "HUNGUP") return Status::TERMINATING; - else if (status == "HOLD") + else if (status == "HOLD" || status == "ACTIVE_DETACHED") return Status::PAUSED; - else if (status == "UNHOLD" || status == "CURRENT") + else if (status == "UNHOLD" || status == "CURRENT" || status == "ACTIVE_ATTACHED") return Status::IN_PROGRESS; else if (status == "INACTIVE" || status == "BUSY") return Status::INACTIVE; diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index 26cc2b496eaa111da11c127fd0a5f54567103a72..12df2a523736cc17b3a357c59e0dde8e8fe4d98f 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -239,21 +239,18 @@ NewCallModel::togglePause(const std::string& callId) const { if (!hasCall(callId)) return; auto& call = pimpl_->calls[callId]; + if (call->status == call::Status::PAUSED) { if (call->type == call::Type::DIALOG) CallManager::instance().unhold(callId.c_str()); else { CallManager::instance().unholdConference(callId.c_str()); - call->status = call::Status::IN_PROGRESS; - emit callStatusChanged(callId); } } else if (call->status == call::Status::IN_PROGRESS) { if (call->type == call::Type::DIALOG) CallManager::instance().hold(callId.c_str()); else { CallManager::instance().holdConference(callId.c_str()); - call->status = call::Status::PAUSED; - emit callStatusChanged(callId); } } }