Procházet zdrojové kódy

acd,分机取消注册时,清理视频话机资源

baiwenju %!s(int64=3) %!d(string=před) roky
rodič
revize
e6e3ad5f45

+ 3 - 2
MidWare_WinStandard1.0-zmd/ACD/AcdCore.cpp

613
 			if (Agentid != 0)
613
 			if (Agentid != 0)
614
 				__removeAgent(Agentid, ExtID, 0);			// 迁出坐席
614
 				__removeAgent(Agentid, ExtID, 0);			// 迁出坐席
615
 
615
 
616
-			//删除分机
616
+			// 删除分机
617
 			m_ExtenCtrl.removeExten(ExtID);
617
 			m_ExtenCtrl.removeExten(ExtID);
618
+			// 2023-01-17 分机取消注册时,清理分机使用资源
619
+			m_VideoOffice.recoverVideoExten(ExtID, true);
618
 		}
620
 		}
619
 	}
621
 	}
620
 	else
622
 	else
858
 	{
860
 	{
859
 		IOtlConnection::getInstance()->Disconnect();
861
 		IOtlConnection::getInstance()->Disconnect();
860
 		AfxMessageBox("加载分机部门信息失败");
862
 		AfxMessageBox("加载分机部门信息失败");
861
-		return false;
862
 	}
863
 	}
863
 	std::cout << m_DepttelextOffice.GetAllDeptTelext() << std::endl;
864
 	std::cout << m_DepttelextOffice.GetAllDeptTelext() << std::endl;
864
 	return true;
865
 	return true;

+ 6 - 2
MidWare_WinStandard1.0-zmd/ACD/VideoOffice.cpp

58
 	return false;
58
 	return false;
59
 }
59
 }
60
 
60
 
61
-bool CVideoOffice::recoverVideoExten(uint32_t a_VideoExtId)
61
+bool CVideoOffice::recoverVideoExten(uint32_t a_VideoExtId, bool bIsRm)
62
 {
62
 {
63
 	std::unique_lock<std::mutex> lock(mut);
63
 	std::unique_lock<std::mutex> lock(mut);
64
 	auto it = m_VideoExtens.find(a_VideoExtId);
64
 	auto it = m_VideoExtens.find(a_VideoExtId);
65
 	if (it != m_VideoExtens.end())
65
 	if (it != m_VideoExtens.end())
66
 	{
66
 	{
67
 		it->second->isUsed() = false;
67
 		it->second->isUsed() = false;
68
-		ILogger::getInstance().log(LOG_CLASS_BUSI, LOG_LEVEL_NORMAL, _T("{CVideoOffice}: 释放视频分机号[%lu]状态[%s]"), a_VideoExtId, it->second->isUsed() ? "不可用" : "可用");
68
+		if (!bIsRm)
69
+			ILogger::getInstance().log(LOG_CLASS_BUSI, LOG_LEVEL_NORMAL, _T("{CVideoOffice}: 释放视频分机号[%lu]状态[%s]"), a_VideoExtId, it->second->isUsed() ? "不可用" : "可用");
70
+		else
71
+			ILogger::getInstance().log(LOG_CLASS_BUSI, LOG_LEVEL_NORMAL, _T("{CVideoOffice}: 释放视频分机号[%lu]状态[%s],话机取消注册"), a_VideoExtId, it->second->isUsed() ? "不可用" : "可用");
72
+
69
 	}
73
 	}
70
 	
74
 	
71
 	{
75
 	{

+ 1 - 1
MidWare_WinStandard1.0-zmd/ACD/VideoOffice.h

11
 
11
 
12
 	bool initVideoExten();
12
 	bool initVideoExten();
13
 	bool findVideoExten(uint32_t &a_VideoExtId,std::string &a_VideoExtPwd);
13
 	bool findVideoExten(uint32_t &a_VideoExtId,std::string &a_VideoExtPwd);
14
-	bool recoverVideoExten(uint32_t a_VideoExtId);
14
+	bool recoverVideoExten(uint32_t a_VideoExtId, bool bIsRm = false);
15
 
15
 
16
 	void close();
16
 	void close();
17
 
17