Procházet zdrojové kódy

添加发送按键功能

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

+ 8 - 10
FreeSWITCH-linux/Agent.cpp

@@ -78,7 +78,9 @@ bool Agent::setState(AGENT_STATE a_AgentState)
78 78
 	break;
79 79
 	case AGENT_STATE_REPOSE:
80 80
 	{
81
-		m_ReposeNum++;
81
+		if (m_IsRepose) {
82
+			m_ReposeNum++;
83
+		}
82 84
 		m_IsRepose = true;
83 85
 	}
84 86
 	break;
@@ -91,16 +93,12 @@ bool Agent::setState(AGENT_STATE a_AgentState)
91 93
 	default:
92 94
 		break;
93 95
 	}
94
-	//if (m_State == AGENT_STATE_BUSY)  // 通话中变空闲,为话后处理
95
-	//	m_State = AGENT_STATE_POST_PROCESSING;
96
-	//else
96
+	
97 97
 	m_State = a_AgentState;
98
-	if (a_AgentState == AGENT_STATE_REQUESTED || a_AgentState == AGENT_STATE_BUSY || a_AgentState == AGENT_STATE_FREE || a_AgentState == AGENT_STATE_REPOSE || a_AgentState == AGENT_STATE_LOGING || a_AgentState == AGENT_STATE_LOGOUT)
99
-	{
100
-		Format fmt("insert into agent_state(agent,exten,cur_time,state,group_no) values('%s','%s','%s',%d,'%s')");
101
-		fmt %m_AgentID %m_Exten %__FormatTime(__getCurTime()) % m_State %m_Group;
102
-		SqlWrite::GetInstance()->addSql(fmt.str());
103
-	}
98
+
99
+	Format fmt("insert into agent_state(agent,exten,cur_time,state,group_no) values('%s','%s','%s',%d,'%s')");
100
+	fmt %m_AgentID %m_Exten %__FormatTime(__getCurTime()) % m_State %m_Group;
101
+	SqlWrite::GetInstance()->addSql(fmt.str());
104 102
 
105 103
 	return true;
106 104
 }

+ 2 - 2
FreeSWITCH-linux/Config.cpp

@@ -69,7 +69,7 @@ std::string CConfig::fsAddr()
69 69
 short int CConfig::fsPort()
70 70
 {
71 71
 	//return 8021;
72
-	return root["fsPort"].asInt();
72
+	return (int16_t)root["fsPort"].asInt();
73 73
 }
74 74
 
75 75
 std::string CConfig::fsPwd()
@@ -80,7 +80,7 @@ std::string CConfig::fsPwd()
80 80
 uint16_t CConfig::wsPort()
81 81
 {
82 82
 	//return 9002;
83
-	return root["wsPort"].asUInt();
83
+	return (uint16_t)root["wsPort"].asUInt();
84 84
 }
85 85
 std::string CConfig::dbAddr()
86 86
 {

+ 3 - 0
FreeSWITCH-linux/DevInfoInc.h

@@ -38,6 +38,8 @@ typedef enum tagLINE_OP
38 38
 	LINE_OP_AGENT_MONI_FORCE_STATE = 31,      // 强制状态控制
39 39
 	LINE_OP_MULTI_CONFERENCE = 32,            // 多步会议
40 40
 	LINE_OP_MULTI_CONFERENCE_TAKEBACK = 33,   // 多步会议接回
41
+	LINE_OP_SEND_DTMF = 34,       //  发送按键, 
42
+	LINE_OP_SET_CHANNEL_VARIABLE = 35,      // 设置通道变量,单腿设置
41 43
 } LINE_OP;
42 44
 
43 45
 // 设备资源类型常量 
@@ -103,6 +105,7 @@ typedef struct tagLineOpParam			/* 线路控制参数信息 */
103 105
 	std::string		szParam2;	// 被叫号码
104 106
 											// 班长操作: 被操作的分机号
105 107
 	std::string		szParam3;	// 继续排队命令: 放音文件 /录音文件名
108
+	std::string     szDtmf;     // 按键内容
106 109
 } LineOpParam;
107 110
 
108 111
 

+ 14 - 8
FreeSWITCH-linux/EslGateway.cpp

@@ -30,7 +30,7 @@ bool CEslGateway::start(void)
30 30
 	LOG_INFO_S(("{EslGateway}: 处理客户端连接m_EslHdl4Listen OK"));
31 31
 
32 32
 	esl_events(&m_EslHdl4Listen, ESL_EVENT_TYPE_PLAIN,
33
-		"BACKGROUND_JOB CHANNEL_CREATE CHANNEL_PROGRESS CHANNEL_PROGRESS_MEDIA CHANNEL_ANSWER CHANNEL_HANGUP_COMPLETE CHANNEL_HOLD CHANNEL_UNHOLD DTMF CUSTOM sofia::register sofia::unregister");
33
+		"BACKGROUND_JOB CHANNEL_CREATE CHANNEL_PROGRESS CHANNEL_PROGRESS_MEDIA CHANNEL_ANSWER CHANNEL_HANGUP_COMPLETE CHANNEL_HOLD CHANNEL_UNHOLD DTMF CUSTOM sofia::register sofia::unregister callcenter::info");
34 34
 	LOG_INFO(("{EslGateway}: 处理客户端连接, ip = %s,port=%d,pwd=%s"), cfg->fsAddr().c_str(), cfg->fsPort(), cfg->fsPwd().c_str());
35 35
 	esl_connect(&m_EslHdl4Send, cfg->fsAddr().c_str(), cfg->fsPort(), NULL, cfg->fsPwd().c_str());
36 36
 	if (!m_EslHdl4Send.connected)
@@ -331,8 +331,6 @@ void CEslGateway::__onEslDisconnect(void)
331 331
 
332 332
 void CEslGateway::__onEslEvtBgJobDone(esl_event_t * pEvent)
333 333
 {
334
-	//try
335
-	{
336 334
 		BG_JOB_NOTIFY Notify;
337 335
 		memset(&Notify, '\0', sizeof(BG_JOB_NOTIFY));
338 336
 		char* HeaderValue = esl_event_get_header(pEvent, ESL_HEADER_JOB_UUID);
@@ -345,11 +343,6 @@ void CEslGateway::__onEslEvtBgJobDone(esl_event_t * pEvent)
345 343
 		if (HeaderValue != nullptr)
346 344
 			Notify.JobBody = HeaderValue;
347 345
 		m_pParent->onEslEvtBgJobDone(&Notify);
348
-	}
349
-	//catch (const std::exception& e)
350
-	{
351
-	//	LOG_ERROR_S(e.what());
352
-	}
353 346
 	
354 347
 }
355 348
 
@@ -486,6 +479,19 @@ void CEslGateway::__onEslEvtCustom(esl_event_t * pEvent)
486 479
 			m_pParent->onEslExtenUnreg(ExtenNo);
487 480
 		}
488 481
 	}
482
+	else if (strcmp(HeaderValue, "callcenter::info") == 0) {
483
+		const char* queueName = esl_event_get_header(pEvent, "CC-Queue");
484
+		const char* callsWaitingStr = esl_event_get_header(pEvent, "CC-Count");
485
+		if (callsWaitingStr) {
486
+			LOG_INFO("队列[%s]当前排队人数[%s]", queueName, callsWaitingStr);
487
+			m_pParent->onCallcenterQueue(queueName, callsWaitingStr);
488
+		}
489
+
490
+		char *pContent = new char[2048];
491
+		esl_event_serialize(pEvent, &pContent, ESL_TRUE);
492
+		LOG_DEBUG_S(pContent);
493
+		FS_LINK_DELETE(pContent);
494
+	}
489 495
 }
490 496
 
491 497
 void CEslGateway::__onEslEvtDtmf(esl_event_t * pEvent)

+ 3 - 0
FreeSWITCH-linux/FreeSWITCH-linux.vcxproj

@@ -113,6 +113,7 @@
113 113
     <ClCompile Include="OpMute.cpp" />
114 114
     <ClCompile Include="OpMyd.cpp" />
115 115
     <ClCompile Include="OpRecord.cpp" />
116
+    <ClCompile Include="OpSendDtmf.cpp" />
116 117
     <ClCompile Include="OpTransfer.cpp" />
117 118
     <ClCompile Include="Session.cpp" />
118 119
     <ClCompile Include="SoftAuth.cpp" />
@@ -158,6 +159,7 @@
158 159
     <ClInclude Include="OpMute.h" />
159 160
     <ClInclude Include="OpMyd.h" />
160 161
     <ClInclude Include="OpRecord.h" />
162
+    <ClInclude Include="OpSendDtmf.h" />
161 163
     <ClInclude Include="OpTransfer.h" />
162 164
     <ClInclude Include="Session.h" />
163 165
     <ClInclude Include="SoftAuth.h" />
@@ -191,6 +193,7 @@
191 193
       <AdditionalOptions>-D _WEBSOCKETPP_CPP11_STL_ %(AdditionalOptions)</AdditionalOptions>
192 194
       <Optimization>Disabled</Optimization>
193 195
       <DebugInformationFormat>FullDebug</DebugInformationFormat>
196
+      <CppLanguageStandard>c++17</CppLanguageStandard>
194 197
     </ClCompile>
195 198
     <Link>
196 199
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

+ 6 - 0
FreeSWITCH-linux/FreeSWITCH-linux.vcxproj.filters

@@ -116,6 +116,9 @@
116 116
     <ClCompile Include="AgentDetail.cpp">
117 117
       <Filter>Statistics</Filter>
118 118
     </ClCompile>
119
+    <ClCompile Include="OpSendDtmf.cpp">
120
+      <Filter>Operator</Filter>
121
+    </ClCompile>
119 122
   </ItemGroup>
120 123
   <ItemGroup>
121 124
     <Filter Include="Net">
@@ -335,6 +338,9 @@
335 338
     <ClInclude Include="AgentDetail.h">
336 339
       <Filter>Statistics</Filter>
337 340
     </ClInclude>
341
+    <ClInclude Include="OpSendDtmf.h">
342
+      <Filter>Operator</Filter>
343
+    </ClInclude>
338 344
   </ItemGroup>
339 345
   <ItemGroup>
340 346
     <None Include="log4cpp.conf">

+ 268 - 137
FreeSWITCH-linux/FsProxy.cpp

@@ -186,82 +186,67 @@ void CFsProxy::onChanStateUpdate(long OpInstance, VirtualChan * pChan)
186 186
 	}
187 187
 	Format fmt("lineType = %s[%s],lineState = %s,chanState = %d");
188 188
 	fmt % lineType % chanNo % state % chanState;
189
-	LOG_DEBUG_S(fmt.str())
189
+	LOG_DEBUG_S(fmt.str());
190 190
 
191
-		if (devType == DEV_RES_TYPE_EXT) {
192
-			map<std::string, Agent*>::iterator it;
193
-			
194
-			std::unique_lock<std::mutex>lock(m_AgentLock);
195
-			it = m_MapAgent.find(chanNo);
196
-		
197
-			if (it != m_MapAgent.end())
198
-			{
199
-				if (it->second == nullptr)
200
-				{
201
-					LOG_DEBUG("查不到分机[%s]", chanNo.c_str());
202
-				}
203
-				else
204
-				{
205
-					LOG_DEBUG("查到分机[%s]", chanNo.c_str());
191
+	if (devType == DEV_RES_TYPE_EXT) {
192
+		map<std::string, Agent*>::iterator it;
193
+
194
+		std::unique_lock<std::mutex>lock(m_AgentLock);
195
+		it = m_MapAgent.find(chanNo);
196
+
197
+		if (it != m_MapAgent.end()) {
198
+			if (it->second == nullptr) {
199
+				LOG_WARN("查到分机[%s]对应坐席空", chanNo.c_str());
200
+				return;
201
+			}
202
+
203
+			if (chanState == CHAN_LOGIC_STATE_FREE) {
204
+				if (it->second->isRepose()) {
205
+					it->second->setState(AGENT_STATE_REPOSE);
206
+					state = it->second->state_s();
206 207
 				}
207
-				if (chanState == CHAN_LOGIC_STATE_FREE && !it->second->isRepose()) {
208
+				else {
208 209
 					if (it->second->state() == AGENT_STATE_BUSY) {
209 210
 						__setStatePostProcessing(it->second->id()); // 在fs中设置坐席话后处理
210 211
 						it->second->setState(AGENT_STATE_POST_PROCESSING);
211
-						state = "话后处理";
212 212
 						state = it->second->state_s();
213 213
 					}
214 214
 					else {
215 215
 						it->second->setState(AGENT_STATE_FREE);
216 216
 					}
217 217
 				}
218
-				else if (chanState == CHAN_LOGIC_STATE_TALKING)
219
-					it->second->setState(AGENT_STATE_BUSY);
220
-				else if (chanState == CHAN_LOGIC_STATE_RING_BACK || chanState == CHAN_LOGIC_STATE_ALERTING)
221
-					it->second->setState(AGENT_STATE_REQUESTED);
222
-
223
-				if (it->second->isRepose() /*&& chanState == CHAN_LOGIC_STATE_FREE*/)
224
-				{
225
-					state = "小休";
226
-				}
227
-				/*else if (it->second->state() == AGENT_STATE_POST_PROCESSING)
228
-				{
229
-					state = it->second->state_s();
230
-					__setStatePostProcessing(it->second->id());
231
-				}*/
232
-				if (!state.empty())    // 过滤掉保持状态
233
-				{
234
-					std::string data = creatJson("LineState", state);
235
-					m_Server.sendMsg(it->second->hdl(), data);
236
-
237
-					data = creatJson("Monitor", state, it->second->id(), chanNo);
238
-					m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
218
+			}
219
+			else if (chanState == CHAN_LOGIC_STATE_TALKING) {
220
+				it->second->setState(AGENT_STATE_BUSY);
221
+			}
222
+			else if (chanState == CHAN_LOGIC_STATE_RING_BACK || chanState == CHAN_LOGIC_STATE_ALERTING) {
223
+				if (AGENT_STATE_REQUESTED == it->second->state()) {  // 当前状态已通知过,不在重复通知
224
+					return;
239 225
 				}
226
+				it->second->setState(AGENT_STATE_REQUESTED);
227
+			}
240 228
 
241
-				__agentDetail(lock.release()); // 通知坐席详情变化
229
+			if (!state.empty()) { // 过滤掉保持状态
230
+				std::string data = creatJson("LineState", state);
231
+				m_Server.sendMsg(it->second->hdl(), data);
242 232
 
243
-				// 坐席空闲且没有置忙 执行外呼 2022-06-28 不用自动外呼
244
-				//if (it->second->state() == AGENT_STATE_FREE && !it->second->isRepose())
245
-				//{
246
-				//	//LOG_DEBUG_S("进自动外呼等待");
247
-				//	m_AutoCall.waitTask(it->second->id());
248
-				//	//LOG_DEBUG_S("出自动外呼等待");
249
-				//}
250
-			}
251
-			else
252
-			{
253
-				LOG_WARN("线路状态通知失败,找不到分机[%s]对应的坐席", chanNo.c_str());
233
+				data = creatJson("Monitor", state, it->second->id(), chanNo);
234
+				m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
254 235
 			}
255
-
236
+			__agentDetail(lock.release()); // 通知坐席详情变化
256 237
 		}
257
-		else if (devType == DEV_RES_TYPE_TRUNK) {
258
-			if (CHAN_LOGIC_STATE_ALERTING == chanState) {
259
-				__agentDetailTrunkChange(1);  // 计算呼入数量
260
-			}
261
-			else if (CHAN_LOGIC_STATE_FREE == chanState) {
262
-				__agentDetailTrunkChange(-1);
263
-			}
238
+		else {
239
+			LOG_WARN("线路状态通知失败,找不到分机[%s]对应的坐席", chanNo.c_str());
240
+		}
241
+	}
242
+	else if (devType == DEV_RES_TYPE_TRUNK) {
243
+		if (CHAN_LOGIC_STATE_ALERTING == chanState) {
244
+			__agentDetailTrunkChange(1);  // 计算呼入数量
264 245
 		}
246
+		else if (CHAN_LOGIC_STATE_FREE == chanState) {
247
+			__agentDetailTrunkChange(-1);
248
+		}
249
+	}
265 250
 }
266 251
 
267 252
 void CFsProxy::onChanPoor(Session * pSession, PCHAN_EVENT_NOTIFY pNotify)
@@ -270,6 +255,42 @@ void CFsProxy::onChanPoor(Session * pSession, PCHAN_EVENT_NOTIFY pNotify)
270 255
 	__kill(FS_LINK_JOBID_INVALID, pNotify->ChanId);
271 256
 }
272 257
 
258
+void CFsProxy::onCallcenterQueue(const std::string & strQueueName, const std::string & strQueueCount)
259
+{
260
+	std::unique_lock<std::shared_mutex>lock(m_mutQueryCount);
261
+	m_QueryCount[strQueueName] = strQueueCount;
262
+	Json::Value root;
263
+	Json::StreamWriterBuilder jsrocd;
264
+	root["Type"] = "WaitCount";
265
+	root["Result"] = true;
266
+	std::int32_t nTotal = 0;
267
+
268
+	for (auto it = m_QueryCount.begin(); it != m_QueryCount.end(); ++it) {
269
+		root[it->first] = it->second;
270
+		try {
271
+			auto n = stoi(it->second);
272
+			nTotal += n;
273
+		}
274
+		catch (const std::exception& e) {
275
+			LOG_ERROR("坐席组[%s]数量[%s]转换失败:[%s]", it->first.c_str(), it->second.c_str(), e.what());
276
+		}
277
+	}
278
+
279
+	root["Total"] = nTotal;
280
+	auto strJson = Json::writeString(jsrocd, root);
281
+
282
+	// 发送给需要的坐席
283
+	for (auto it = m_subWaitCount.begin(); it != m_subWaitCount.end();) {
284
+		auto bOk = m_Server.sendMsg(*it, strJson);
285
+		if (bOk) {
286
+			++it;
287
+		}
288
+		else {
289
+			it = m_subWaitCount.erase(it);
290
+		}
291
+	}
292
+}
293
+
273 294
 void CFsProxy::onEslDisconnect(void)
274 295
 {
275 296
 	// esl 断开重连
@@ -714,6 +735,31 @@ bool CFsProxy::transfer2Context(long JobId, std::string DestChanId, std::string
714 735
 	return m_Gateway.sendCmd(EslCmd);
715 736
 }
716 737
 
738
+bool CFsProxy::setChannelVariable(long JobId, std::string DestChanId, std::string VarName, std::string Content)
739
+{
740
+	std::string EslCmd;
741
+	Format fmt("bgapi uuid_setvar %s %s %s\r\n%s: %ld");
742
+	fmt % DestChanId % VarName % Content % ESL_HEADER_JOB_UUID % JobId;
743
+	EslCmd = fmt.str();
744
+	bool ret = m_Gateway.sendCmd(EslCmd);
745
+	return ret;
746
+}
747
+
748
+bool CFsProxy::ExecteApp(std::string App, std::string Param, std::string ChanId)
749
+{
750
+	return m_Gateway.Execte(App.c_str(), Param.c_str(), ChanId.c_str());
751
+}
752
+
753
+bool CFsProxy::sendDtmf(long JobId, std::string DestChanId, std::string Content)
754
+{
755
+	std::string EslCmd;
756
+	Format fmt("bgapi uuid_send_dtmf %s %s\r\n%s: %ld");
757
+	fmt %DestChanId %Content %ESL_HEADER_JOB_UUID % JobId;
758
+	EslCmd = fmt.str();
759
+	bool ret = m_Gateway.sendCmd(EslCmd);
760
+	return ret;
761
+}
762
+
717 763
 bool CFsProxy::getConferenceMemberId(std::string MeetingId, std::string ChanId, std::string & MemberId)
718 764
 {
719 765
 	return m_Gateway.getConferenceMemberId(MeetingId, ChanId, MemberId);
@@ -782,6 +828,19 @@ std::string CFsProxy::creatJson(std::string type, bool result)
782 828
 	return os.str();
783 829
 }
784 830
 
831
+std::string CFsProxy::creatJson(std::string type, bool result, std::string desc)
832
+{
833
+	Json::Value root;
834
+	Json::StreamWriterBuilder jsrocd;
835
+	std::unique_ptr<Json::StreamWriter> write(jsrocd.newStreamWriter());
836
+	Json::OStringStream os;
837
+	root["Type"] = type;
838
+	root["Result"] = result;
839
+	root["Desc"] = desc;
840
+	write->write(root, &os);
841
+	return os.str();
842
+}
843
+
785 844
 std::string CFsProxy::creatJson(std::string type, std::string result, std::string agentId)
786 845
 {
787 846
 	Format fmt("{ \"Type\":\"%s\",\"Result\":\"%s\",\"AgentID\":\"%s\" }");
@@ -1084,8 +1143,8 @@ bool CFsProxy::__login(std::string AgentID, std::string ExtenNo, std::list<std::
1084 1143
 
1085 1144
 	cmd = boost::str(Format("bgapi callcenter_config agent set max_no_answer %1% 0") % AgentID);   // 0禁用 
1086 1145
 	ret &= m_Gateway.sendCmd(cmd);
1087
-	//cmd = boost::str(Format("bgapi callcenter_config agent set wrap_up_time %1% 20") % AgentID);   // 话后处理时长
1088
-	cmd = boost::str(Format("bgapi callcenter_config agent set wrap_up_time %1% %2%") % AgentID %CConfig::GetInstance()->postProcessTime());
1146
+	cmd = boost::str(Format("bgapi callcenter_config agent set wrap_up_time %1% 2") % AgentID);   // 话后处理时长,2秒
1147
+	//cmd = boost::str(Format("bgapi callcenter_config agent set wrap_up_time %1% %2%") % AgentID %CConfig::GetInstance()->postProcessTime());
1089 1148
 	ret &= m_Gateway.sendCmd(cmd);
1090 1149
 	cmd = boost::str(Format("bgapi callcenter_config agent set reject_delay_time %1% 0") % AgentID);
1091 1150
 	ret &= m_Gateway.sendCmd(cmd);
@@ -1278,81 +1337,50 @@ void CFsProxy::__recvMsgFun(websocketpp::connection_hdl hdl, string msg)
1278 1337
 				return;
1279 1338
 			}
1280 1339
 			// 判断 坐席,分机是否已被签入
1281
-			//{
1282
-				std::unique_lock<std::mutex>lock(m_AgentLock);
1340
+			std::unique_lock<std::mutex>lock(m_AgentLock);
1283 1341
 
1284
-				auto it = m_MapAgent.begin();
1285
-				while (it != m_MapAgent.end()) {
1286
-					if (it->second->id() == AgentID) {
1287
-						Format fmt("坐席已被绑定,Agent = %s,Exten = %s");
1288
-						fmt % AgentID % AgentExten;
1289
-						LOG_INFO_S(fmt.str());
1290
-						m_Server.sendMsg(hdl, creatJson(type, std::string("坐席已被绑定")));
1291
-						return;
1292
-					}
1293
-					else if (it->first == AgentExten) {
1294
-						Format fmt("分机已被绑定,Agent = %s,Exten = %s");
1295
-						fmt % AgentID % AgentExten;
1296
-						LOG_INFO_S(fmt.str());
1297
-						m_Server.sendMsg(hdl, creatJson(type, std::string("分机已被绑定")));
1298
-						return;
1299
-					}
1300
-					++it;
1342
+			auto it = m_MapAgent.begin();
1343
+			while (it != m_MapAgent.end()) {
1344
+				if (it->second->id() == AgentID) {
1345
+					Format fmt("坐席已被绑定,Agent = %s,Exten = %s");
1346
+					fmt % AgentID % AgentExten;
1347
+					LOG_INFO_S(fmt.str());
1348
+					m_Server.sendMsg(hdl, creatJson(type, std::string("坐席已被绑定")));
1349
+					return;
1301 1350
 				}
1302
-
1303
-				std::string AgentGroup = root["AgentGroup"].asString();
1304
-				Agent  *agent = new Agent(AgentID, AgentExten, AgentGroup);
1305
-				agent->hdl() = hdl;
1306
-				m_MapAgent[AgentExten] = agent;   // 分机号作为key
1307
-
1308
-				if (!__login(AgentID, AgentExten, agent->groups())){
1309
-					m_MapAgent.erase(AgentExten);
1310
-
1311
-					Format fmt("座席签入失败,Agent = %s,Exten = %d, %s");
1312
-					fmt % AgentID % AgentExten % hdl.lock().get();
1351
+				else if (it->first == AgentExten) {
1352
+					Format fmt("分机已被绑定,Agent = %s,Exten = %s");
1353
+					fmt % AgentID % AgentExten;
1313 1354
 					LOG_INFO_S(fmt.str());
1314
-					m_Server.sendMsg(hdl, creatJson(type, false));
1355
+					m_Server.sendMsg(hdl, creatJson(type, std::string("分机已被绑定")));
1315 1356
 					return;
1316 1357
 				}
1317
-				Format fmt("座席签入成功,Agent = %s,Exten = %d,AgentGroup = %s %s");
1318
-				fmt % AgentID % AgentExten % AgentGroup % hdl.lock().get();
1319
-				LOG_INFO_S(fmt.str());
1320
-				m_Server.sendMsg(hdl, creatJson(type, true));
1321
-
1322
-				__agentDetail(lock.release()); // 通知坐席详情变化
1323
-
1324
-				std::string data = creatJson("Monitor", "空闲", AgentID, AgentExten);
1325
-				m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
1326
-			//}
1327
-
1328
-			//std::string AgentGroup = root["AgentGroup"].asString();
1329
-			//Agent  *agent = new Agent(AgentID, AgentExten, AgentGroup);
1330
-			//agent->hdl() = hdl;
1331
-			//{
1332
-			//	std::unique_lock<std::mutex>lock(m_AgentLock);
1333
-			//	m_MapAgent[AgentExten] = agent;   // 分机号作为key
1334
-			//}
1358
+				++it;
1359
+			}
1335 1360
 
1336
-			//if (!__login(AgentID, AgentExten, agent->groups()))
1337
-			//{
1338
-			//	m_MapAgent.erase(AgentExten);
1361
+			std::string AgentGroup = root["AgentGroup"].asString();
1362
+			Agent  *agent = new Agent(AgentID, AgentExten, AgentGroup);
1363
+			agent->hdl() = hdl;
1364
+			m_MapAgent[AgentExten] = agent;   // 分机号作为key
1339 1365
 
1340
-			//	Format fmt("座席签入失败,Agent = %s,Exten = %d, %s");
1341
-			//	fmt % AgentID % AgentExten % hdl.lock().get();
1342
-			//	LOG_INFO_S(fmt.str());
1343
-			//	m_Server.sendMsg(hdl, creatJson(type, false));
1344
-			//	return;
1345
-			//}
1366
+			if (!__login(AgentID, AgentExten, agent->groups())) {
1367
+				m_MapAgent.erase(AgentExten);
1346 1368
 
1347
-			//Format fmt("座席签入成功,Agent = %s,Exten = %d,AgentGroup = %s %s");
1348
-			//fmt % AgentID % AgentExten % AgentGroup % hdl.lock().get();
1349
-			//LOG_INFO_S(fmt.str());
1350
-			//m_Server.sendMsg(hdl, creatJson(type, true));
1369
+				Format fmt("座席签入失败,Agent = %s,Exten = %d, %s");
1370
+				fmt % AgentID % AgentExten % hdl.lock().get();
1371
+				LOG_INFO_S(fmt.str());
1372
+				m_Server.sendMsg(hdl, creatJson(type, false));
1373
+				return;
1374
+			}
1375
+			Format fmt("座席签入成功,Agent = %s,Exten = %d,AgentGroup = %s %s");
1376
+			fmt % AgentID % AgentExten % AgentGroup % hdl.lock().get();
1377
+			LOG_INFO_S(fmt.str());
1378
+			m_Server.sendMsg(hdl, creatJson(type, true));
1351 1379
 
1352
-			//std::string data = creatJson("Monitor", "空闲", AgentID, AgentExten);
1353
-			//m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
1380
+			__agentDetail(lock.release()); // 通知坐席详情变化
1354 1381
 
1355
-		//	__agentDetail(); // 通知坐席详情变化
1382
+			std::string data = creatJson("Monitor", "空闲", AgentID, AgentExten);
1383
+			m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
1356 1384
 
1357 1385
 		}
1358 1386
 		else if ("Logout" == type) {    // 签出
@@ -1368,19 +1396,19 @@ void CFsProxy::__recvMsgFun(websocketpp::connection_hdl hdl, string msg)
1368 1396
 		}
1369 1397
 		else if ("SayBusy" == type) {   // 置忙
1370 1398
 			bool ret = __setState(AgentID, false);
1371
-			 
1372
-				std::unique_lock<std::mutex>lock(m_AgentLock);
1373
-				auto it = m_MapAgent.find(AgentExten);
1374
-				if (it != m_MapAgent.end())
1375
-					it->second->setState(AGENT_STATE_REPOSE);
1376
-				__agentDetail(lock.release()); // 通知坐席详情变化
1399
+
1400
+			std::unique_lock<std::mutex>lock(m_AgentLock);
1401
+			auto it = m_MapAgent.find(AgentExten);
1402
+			if (it != m_MapAgent.end())
1403
+				it->second->setState(AGENT_STATE_REPOSE);
1404
+			__agentDetail(lock.release()); // 通知坐席详情变化
1377 1405
 
1378 1406
 			m_Server.sendMsg(hdl, creatJson(type, ret));
1379 1407
 
1380 1408
 			std::string data = creatJson("Monitor", "小休", AgentID, AgentExten);
1381 1409
 			m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
1382 1410
 
1383
-			
1411
+
1384 1412
 		}
1385 1413
 		else if ("SayFree" == type) {   // 置闲
1386 1414
 			bool ret = __setState(AgentID, true);
@@ -1394,7 +1422,6 @@ void CFsProxy::__recvMsgFun(websocketpp::connection_hdl hdl, string msg)
1394 1422
 			std::string data = creatJson("Monitor", "空闲", AgentID, AgentExten);
1395 1423
 			m_MonitAgents.loopAgent(m_Server, data);  // 通知班长坐席监控
1396 1424
 
1397
-			 
1398 1425
 		}
1399 1426
 		else if ("ForceAgentState" == type) {   // 强制更改座席状态
1400 1427
 
@@ -1622,19 +1649,84 @@ void CFsProxy::__recvMsgFun(websocketpp::connection_hdl hdl, string msg)
1622 1649
 		else if ("TurnIvr" == type) {   // 转满意度
1623 1650
 			COperationReactor::GetInstance()->procOperation(opInstance++, LINE_OP_TURNIVR, ExtenNo, nullptr);
1624 1651
 		}
1652
+		else if ("Heart" == type) {   // 心跳
1653
+			m_Server.sendMsg(hdl, msg);
1654
+		}
1625 1655
 		else if ("AutoCall" == type) {   // 自动外呼
1626 1656
 			//m_AutoCall.addTask();   // 从数据库刷新任务
1627 1657
 			m_Server.sendMsg(hdl, creatJson(type, true));
1628 1658
 		}
1629
-		else if ("Heart" == type) {   // 心跳
1630
-			m_Server.sendMsg(hdl, msg);
1631
-		}
1632 1659
 		else if ("GetAgentDetail" == type) {
1633 1660
 			auto data = m_AgentDetail.to_string();
1634 1661
 			m_Server.sendMsg(hdl, data);
1635 1662
 
1636 1663
 			m_mpAgentDetailHdl[conID] = hdl;
1637 1664
 		}
1665
+		else if ("WaitCount" == type) {
1666
+
1667
+			std::unique_lock<std::shared_mutex>lock(m_mutQueryCount);
1668
+			auto it = std::find_if(m_subWaitCount.begin(), m_subWaitCount.end(), [=](websocketpp::connection_hdl hdltmp) {return hdltmp.lock() == hdl.lock(); });
1669
+			if (it == m_subWaitCount.end()) {  // 第一次发送则保存
1670
+				m_subWaitCount.emplace_back(hdl);  // 保存订阅排队数量的坐席
1671
+			}
1672
+			Json::Value root;
1673
+			Json::StreamWriterBuilder jsrocd;
1674
+			root["Type"] = "WaitCount";
1675
+			root["Result"] = true;
1676
+			std::int32_t nTotal = 0;
1677
+
1678
+			for (auto it = m_QueryCount.begin(); it != m_QueryCount.end(); ++it) {
1679
+				root[it->first] = it->second;
1680
+				try {
1681
+					auto n = stoi(it->second);
1682
+					nTotal += n;
1683
+				}
1684
+				catch (const std::exception& e) {
1685
+					LOG_ERROR("坐席组[%s]数量[%s]转换失败:[%s]", it->first.c_str(), it->second.c_str(), e.what());
1686
+				}
1687
+			}
1688
+			lock.unlock();
1689
+			root["Total"] = nTotal;
1690
+			auto data = Json::writeString(jsrocd, root);
1691
+			m_Server.sendMsg(hdl, data);
1692
+		}
1693
+		else if ("SendDtmf" == type){
1694
+            std::string Dtmf = root["Dtmf"].asString();
1695
+			std::unique_lock<std::mutex>lock(m_AgentLock);
1696
+			auto it = m_MapAgent.find(AgentExten);
1697
+			if (it == m_MapAgent.end()) { // 坐席未签入
1698
+				lock.unlock();
1699
+				m_Server.sendMsg(hdl, creatJson(type, false,"坐席未签入"));
1700
+				return;
1701
+			}
1702
+			if (AGENT_STATE_BUSY != it->second->state()) {
1703
+				lock.unlock();
1704
+				m_Server.sendMsg(hdl, creatJson(type, false, "坐席未通话"));
1705
+				return;
1706
+			}
1707
+			auto pChanIter = m_MapChanExt.find(ExtenNo);
1708
+			if (pChanIter == m_MapChanExt.end()) {
1709
+				return;
1710
+			}
1711
+			auto pChan = pChanIter->second;
1712
+			auto pSession = __getSessionByChanId(pChan->chanId());
1713
+			auto pFinalChan = pSession->getAssoFinalChan();
1714
+			if (CHAN_LOGIC_STATE_TALKING != pFinalChan->state() || !pFinalChan->isInMeeting()) {
1715
+				m_Server.sendMsg(hdl, creatJson(type, false, "目标线路未通话或未在会议中"));
1716
+				return;
1717
+			}
1718
+			LineOpParam param;
1719
+			param.szParam1 = AgentExten;
1720
+			param.szParam2 = std::to_string(pFinalChan->no());
1721
+			param.szParam3 = pFinalChan->chanId();
1722
+			param.szDtmf = Dtmf; // 按键
1723
+			bool ret = COperationReactor::GetInstance()->procOperation(ExtenNo, LINE_OP_SEND_DTMF, pFinalChan->no(), &param);
1724
+			if (!ret)
1725
+				m_Server.sendMsg(hdl, creatJson(type, std::string("操作失败")));
1726
+		}
1727
+		else {
1728
+
1729
+		}
1638 1730
 		// try 结束
1639 1731
 	}
1640 1732
 	catch (const Json::LogicError& e)
@@ -1833,4 +1925,43 @@ void CFsProxy::__agentDetailTrunkChange(const std::int32_t& nCount)
1833 1925
 	}
1834 1926
 }
1835 1927
 
1928
+std::string CFsProxy::__queryCount(const bool & bIsLock)
1929
+{
1930
+	Json::Value root;
1931
+	Json::StreamWriterBuilder jsrocd;
1932
+	root["Type"] = "WaitCount";
1933
+	root["Result"] = true;
1934
+	std::int32_t nTotal = 0;
1935
+	if (bIsLock) {
1936
+		std::shared_lock<std::shared_mutex>lock(m_mutQueryCount);
1937
+		for (auto it = m_QueryCount.begin(); it != m_QueryCount.end(); ++it) {
1938
+			root[it->first] = it->second;
1939
+			try {
1940
+				auto n = stoi(it->second);
1941
+				nTotal += n;
1942
+			}
1943
+			catch (const std::exception& e) {
1944
+				LOG_ERROR("坐席组[%s]数量[%s]转换失败:[%s]", it->first.c_str(), it->second.c_str(), e.what());
1945
+			}
1946
+		}
1947
+		lock.unlock();
1948
+	}
1949
+	else {
1950
+		for (auto it = m_QueryCount.begin(); it != m_QueryCount.end(); ++it) {
1951
+			root[it->first] = it->second;
1952
+			try {
1953
+				auto n = stoi(it->second);
1954
+				nTotal += n;
1955
+			}
1956
+			catch (const std::exception& e) {
1957
+				LOG_ERROR("坐席组[%s]数量[%s]转换失败:[%s]", it->first.c_str(), it->second.c_str(), e.what());
1958
+			}
1959
+		}
1960
+	}
1961
+	//m_WaitCounter
1962
+	root["Total"] = nTotal;
1963
+	auto strJson = Json::writeString(jsrocd, root);
1964
+	return strJson;
1965
+}
1966
+
1836 1967
 CFsProxy CFsProxy::instance;

+ 17 - 0
FreeSWITCH-linux/FsProxy.h

@@ -9,7 +9,10 @@
9 9
 #include "TtsBaidu.h"
10 10
 #include "CallStringMaker.h"
11 11
 #include <map>
12
+#include <list>
12 13
 #include <mutex>
14
+#include <shared_mutex>
15
+ 
13 16
 #include "AutoCall.h"
14 17
 #include "AgentDetail.h"
15 18
 
@@ -62,6 +65,7 @@ public:
62 65
 	void onExtenDirectOp(DEV_OP OpType, VirtualChan* pHostChan, PCHAN_EVENT_NOTIFY pNotify);
63 66
 	void onChanStateUpdate(long OpInstance, VirtualChan* pChan);
64 67
 	void onChanPoor(Session* pSession, PCHAN_EVENT_NOTIFY pNotify);
68
+	void onCallcenterQueue(const std::string& strQueueName, const std::string&strQueueCount); // 技能组排队数量
65 69
 
66 70
 	// ESL事件
67 71
 	void onEslDisconnect(void);
@@ -109,6 +113,11 @@ public:
109 113
 	bool turnIvr(long JobId, VirtualChan* pChan);  // 转满意度
110 114
 	bool transfer(long JobId, VirtualChan* pChan, std::string DestNum);
111 115
 	bool transfer2Context(long JobId, std::string DestChanId, std::string Exten, std::string Context, bool BothSide = false);
116
+	
117
+	bool setChannelVariable(long JobId, std::string DestChanId, std::string VarName, std::string Content); // 2021-12-2 设置单腿通道变量
118
+	bool ExecteApp(std::string App, std::string Param, std::string ChanId);  //执行app 2021-12-09
119
+	bool sendDtmf(long JobId, std::string DestChanId, std::string Content);   // 发送按键 2022-01-12
120
+	
112 121
 	bool getConferenceMemberId(std::string MeetingId, std::string ChanId, std::string &MemberId);
113 122
 	bool setConferenceExitSound(std::string MeetingId, bool isPlay);
114 123
 	bool setConferenceIsMute(long JobId, std::string MeetingId, std::string MemberId, bool isMute);
@@ -117,6 +126,7 @@ public:
117 126
 	// 创建json字符串
118 127
 	std::string creatJson(std::string type, std::string result);
119 128
 	std::string creatJson(std::string type, bool result);
129
+	std::string creatJson(std::string type, bool result,std::string desc);
120 130
 	std::string creatJson(std::string type, std::string result, std::string agentId);
121 131
 	std::string creatJson(std::string type, std::string result, std::string agentId, std::string extenNo);
122 132
 	std::string creatJsonIncoming(std::string callid, std::string caller, std::string callee, std::string trunkNumber,int incomintType);
@@ -163,6 +173,9 @@ private:
163 173
 	void __agentDetail(std::mutex*p_mtx,bool islock=false);  // 第一个参数,locak.release()
164 174
 	void __agentDetailTrunkChange(const std::int32_t& nCount);
165 175
 
176
+	// 坐席组排队数量
177
+	std::string __queryCount(const bool&bIsLock );  // 返回json字符串
178
+
166 179
 private:
167 180
 	CEslGateway m_Gateway;
168 181
 	CWebSocketServer m_Server;
@@ -177,6 +190,10 @@ private:
177 190
 	std::map<std::string, Agent*> m_MapAgent;   // 分机-坐席
178 191
 	std::mutex m_AgentLock;
179 192
 
193
+	std::map<std::string, std::string> m_QueryCount; // 排队数量,组-数量
194
+	std::shared_mutex m_mutQueryCount;
195
+	std::list<websocketpp::connection_hdl> m_subWaitCount; // 需要接收排队数量的坐席
196
+	
180 197
 	MonitorAgent m_MonitAgents;     // 坐席监控集合
181 198
 
182 199
 	::AutoCall m_AutoCall;    // 自动外呼类

+ 62 - 0
FreeSWITCH-linux/OpSendDtmf.cpp

@@ -0,0 +1,62 @@
1
+#include "OpSendDtmf.h"
2
+#include "VirtualChan.h"
3
+#include "FsProxy.h"
4
+#include "OperationReactor.h"
5
+
6
+COpSendDtmf::COpSendDtmf(COperationReactor * pParent, long Instance) :COperation(pParent, Instance)
7
+{
8
+}
9
+
10
+COpSendDtmf::~COpSendDtmf(void)
11
+{
12
+}
13
+
14
+bool COpSendDtmf::attachHostChan(VirtualChan * pChan)
15
+{
16
+	m_pHostChan = pChan;
17
+	return true;
18
+}
19
+
20
+void COpSendDtmf::detachHostChan(void)
21
+{
22
+	m_pHostChan = NULL;
23
+}
24
+
25
+bool COpSendDtmf::start(LineOpParam * pParam)
26
+{
27
+	if (m_pHostChan == NULL || m_pHostChan->state() != CHAN_LOGIC_STATE_TALKING)
28
+	{
29
+		LOG_ERROR("通道[%s]发送[%s]按键失败,未在通话中", pParam->szParam1.c_str(), pParam->szParam2.c_str());
30
+		return false;
31
+	}
32
+	m_dtmf = pParam->szDtmf;
33
+	LOG_INFO("{COpSendDtmf}: 通道[%s]执行通道[%lu]发送按键, DTMF = %s", pParam->szParam1.c_str(), m_pHostChan->no(), m_dtmf.c_str());
34
+	return CFsProxy::GetInstance().sendDtmf(uniqueId(), m_pHostChan->chanId(), m_dtmf);
35
+}
36
+
37
+void COpSendDtmf::onBackgroudJobDone(PBG_JOB_NOTIFY pNotify)
38
+{
39
+	if (pNotify->JobBody.find(ESL_JOB_DONE_RES_FAILED) == std::string::npos)
40
+		_end(true);
41
+	else
42
+		_end(false);
43
+}
44
+
45
+void COpSendDtmf::_end(bool IsSucceed)
46
+{
47
+	if (IsSucceed)
48
+	{
49
+		LOG_INFO("{COpSendDtmf}: 线路[%ld][%lu]发送按键成功, DTMF = %s", m_Instance, m_pHostChan->no(), m_dtmf.c_str());
50
+	}
51
+	else
52
+	{
53
+		LOG_ERROR("{COpSendDtmf}: 线路[%ld][%lu]发送按键失败, DTMF = %s", m_Instance, m_pHostChan->no(), m_dtmf.c_str());
54
+	}
55
+
56
+	// 返回执行结果
57
+	if (m_InstanceCancel != FS_LINK_INSTANCE_INVALID)
58
+		m_pParent->onOpResult(m_InstanceCancel, !IsSucceed);
59
+
60
+	m_pParent->onOpResult(m_Instance, this, IsSucceed, std::to_string(m_Instance));
61
+}
62
+

+ 27 - 0
FreeSWITCH-linux/OpSendDtmf.h

@@ -0,0 +1,27 @@
1
+#pragma once
2
+#include "Operation.h"
3
+
4
+class COpSendDtmf : public COperation
5
+{
6
+public:
7
+	COpSendDtmf(COperationReactor* pParent, long Instance);
8
+	virtual ~COpSendDtmf(void);
9
+
10
+	virtual LINE_OP type(void) const { return LINE_OP_SEND_DTMF; }
11
+
12
+	// 关联操作
13
+	virtual bool attachHostChan(VirtualChan* pChan);			// 设置主控通道的关联
14
+	virtual void detachHostChan(void);							// 取消通道关联
15
+
16
+	virtual bool start(LineOpParam* pParam);
17
+
18
+	// 事件响应接口
19
+	virtual void onBackgroudJobDone(PBG_JOB_NOTIFY pNotify);	// 后台命令执行结束事件处理
20
+
21
+protected:
22
+	virtual void _end(bool IsSucceed);			// 操作完成(注:此操作之后只能调用 return 语句)
23
+
24
+private:
25
+	std::string m_dtmf;  // 要发送的按键
26
+};
27
+

+ 33 - 11
FreeSWITCH-linux/OperationReactor.cpp

@@ -18,6 +18,7 @@
18 18
 #include "OpMyd.h"
19 19
 #include "OpAutoCall.h"
20 20
 #include "OpForceAgentState.h"
21
+#include "OpSendDtmf.h"
21 22
 #include "VirtualChan.h"
22 23
 #include "FsProxy.h"
23 24
 #include "JsonStringMaker.h"
@@ -89,6 +90,9 @@ bool COperationReactor::procOperation(long Instance, uint32_t OpType, uint32_t R
89 90
 	case LINE_OP_AGENT_MONI_FORCE_STATE:          // 强制状态控制
90 91
 		Res = __procOpForceAgentState(Instance, ResID, pParam);
91 92
 		break;
93
+	case LINE_OP_SEND_DTMF:  // 发送按键
94
+		Res=__procOpSendDtmf(Instance, ResID, pParam);
95
+		break;
92 96
 	default:
93 97
 		break;
94 98
 	}
@@ -108,17 +112,6 @@ void COperationReactor::onOpResult(long Instance, COperation * pOp, bool IsSucce
108 112
 {
109 113
 	if (pOp == nullptr) return;
110 114
 	int OpType = pOp->type();
111
-	//if (CurOpType != "MuteOn" && (CurOpType != "Hold"))    // 静音,保持操作时不能释放op 
112
-	//{
113
-	//	if (__delOperation(pOp))		// 非取消操作的返回结果
114
-	//	{
115
-	//		LOG_DEBUG("释放操作[%d]", pOp->type());
116
-	//		// 关闭线路关联
117
-	//		pOp->detachHostChan();
118
-	//		// 释放操作
119
-	//		FS_LINK_DELETE(pOp);
120
-	//	} // end if
121
-	//}
122 115
 
123 116
 	if ((CurOpType != "MuteOn" && (CurOpType != "Hold")&&(CurOpType!="MultiMeeting")) || IsSucceed == false)    // 静音,保持操作时不能释放op 
124 117
 	{
@@ -181,7 +174,11 @@ void COperationReactor::onOpResult(long Instance, COperation * pOp, bool IsSucce
181 174
 	//case LINE_OP_MUTE_END:				// 静音结束
182 175
 	//	data = CFsProxy::GetInstance().creatJson("MuteOff", IsSucceed);
183 176
 	//	break;
177
+	case LINE_OP_SEND_DTMF:
178
+		data = CFsProxy::GetInstance().creatJson("SendDtmf", IsSucceed);
179
+		break;
184 180
 	default:
181
+		data = CFsProxy::GetInstance().creatJson(CurOpType, IsSucceed);
185 182
 		break;
186 183
 	}
187 184
 
@@ -721,4 +718,29 @@ bool COperationReactor::__procOpForceAgentState(long Instance, uint32_t ResID, L
721 718
 	return __execOp(pOp, pParam);
722 719
 }
723 720
 
721
+bool COperationReactor::__procOpSendDtmf(long Instance, uint32_t ResID, LineOpParam * pParam)
722
+{
723
+	VirtualChan* pChan = CFsProxy::GetInstance().getTrunk(ResID);
724
+	if (pChan == nullptr) {
725
+		pChan = CFsProxy::GetInstance().getExten(ResID);
726
+	}
727
+	if (pChan == nullptr)
728
+	{
729
+		LOG_WARN(("{OperationReactor}: 执行发送按键失败, 未找到分机通道[%lu]"), ResID);
730
+		return false;
731
+	}
732
+	auto pOp = new COpSendDtmf(this, Instance);
733
+	if (!pOp->attachHostChan(pChan))
734
+	{
735
+		// 如果线路正在执行其它操作
736
+		LOG_WARN(("{OperationReactor}: 执行发送按键叫失败, 无法绑定通道[%lu], ChanCurTask = %d"), ResID,
737
+			(pChan->currOp() == NULL ? LINE_OP_UNKNOWN : pChan->currOp()->type()));
738
+
739
+		FS_LINK_DELETE(pOp);
740
+		return false;
741
+	}
742
+	// 启动操作
743
+	return __execOp(pOp, pParam);
744
+}
745
+
724 746
 COperationReactor COperationReactor::instance;

+ 1 - 0
FreeSWITCH-linux/OperationReactor.h

@@ -55,6 +55,7 @@ private:
55 55
 	bool __procOpMyd(long Instance, uint32_t ResID, LineOpParam* pParam);			     	// 满意度
56 56
 	bool __procOpAutoCall(long Instance, uint32_t ResID, LineOpParam* pParam);			    // 自动外呼
57 57
 	bool __procOpForceAgentState(long Instance, uint32_t ResID, LineOpParam* pParam);		// 强制状态控制
58
+	bool __procOpSendDtmf(long Instance, uint32_t ResID, LineOpParam* pParam);              // 发送按键
58 59
 
59 60
 private:
60 61
 	static COperationReactor instance;

+ 23 - 6
FreeSWITCH-linux/Session.cpp

@@ -1,4 +1,8 @@
1
-#include "Session.h"
1
+#include "..\AsrService\Session.h"
2
+#include "..\AsrService\Session.h"
3
+#include "..\AsrService\Session.h"
4
+#include "..\AsrService\Session.h"
5
+#include "Session.h"
2 6
 #include <boost/filesystem.hpp>
3 7
 #include "FsProxy.h"
4 8
 #include "ChanTrunk.h"
@@ -12,7 +16,6 @@ Session::Session(CFsProxy* pParent, string Id) : m_pParent(pParent), m_Id(Id), m
12 16
 {
13 17
 }
14 18
 
15
-
16 19
 Session::~Session()
17 20
 {
18 21
 }
@@ -101,6 +104,20 @@ VirtualChan * Session::getAssoChan(VirtualChan * pChan)
101 104
 	return nullptr;
102 105
 }
103 106
 
107
+VirtualChan * Session::getAssoFinalChan()
108
+{
109
+	std::unique_lock<std::mutex> lock(m_ChanLock);
110
+	return m_ListChan.back();
111
+}
112
+
113
+VirtualChan * Session::getAssoFinalChan(VirtualChan * pChan)
114
+{
115
+	std::unique_lock<std::mutex> lock(m_ChanLock);
116
+	auto pFinalChan = m_ListChan.back();
117
+	if (pFinalChan == pChan)return nullptr; // 是同一条,返回空
118
+	return m_ListChan.back();
119
+}
120
+
104 121
 VirtualChan * Session::__getFirstChan()
105 122
 {
106 123
 	std::unique_lock<std::mutex> lock(m_ChanLock);
@@ -516,7 +533,7 @@ void Session::__onRecord(VirtualChan * pChan, PCHAN_EVENT_NOTIFY pNotify)
516 533
 	*/
517 534
 	
518 535
 	// 保持状态过滤
519
-	uint Status = (HELD_STATE_FILTER_MASK & pChan->state());
536
+	auto Status = (HELD_STATE_FILTER_MASK & pChan->state());
520 537
 	// 通话
521 538
 	if (Status == TRUNK_STATE_TALKING || Status == INNER_STATE_TALKING)
522 539
 	{
@@ -524,8 +541,8 @@ void Session::__onRecord(VirtualChan * pChan, PCHAN_EVENT_NOTIFY pNotify)
524 541
 		{
525 542
 			if (pTempChan == NULL || pTempChan == pChan)
526 543
 				continue;
527
-			uint nTempStatus = (HELD_STATE_FILTER_MASK & pTempChan->state());
528
-			if (Status == TRUNK_STATE_TALKING || Status == INNER_STATE_TALKING)
544
+			auto nTempStatus = (HELD_STATE_FILTER_MASK & pTempChan->state());
545
+			if (nTempStatus == TRUNK_STATE_TALKING || nTempStatus == INNER_STATE_TALKING)
529 546
 			{
530 547
 				__onLineTalking(pChan);
531 548
 				__onLineTalking(pTempChan);
@@ -541,7 +558,7 @@ void Session::__createFileName(VirtualChan * pChan)
541 558
 	{
542 559
 		std::string strCurTime = Util::CurTime();
543 560
 		strCurTime = std::regex_replace(strCurTime, std::regex("-|:"), "");
544
-		std::int32_t index = strCurTime.find(" ");
561
+		auto index = strCurTime.find(" ");
545 562
 		std::string data = strCurTime.substr(0, index);
546 563
 		std::string time = strCurTime.substr(index+1);
547 564
 		std::string strTempCallID = regex_replace(m_Id, std::regex("-"), "");

+ 2 - 0
FreeSWITCH-linux/Session.h

@@ -29,6 +29,8 @@ public:
29 29
 	void onChanDtmf(PDTMF_NOTIFY pNotify);
30 30
 	void onChanHold(PHOLD_NOTIFY pNotify);
31 31
 	VirtualChan* getAssoChan(VirtualChan* pChan);
32
+	VirtualChan* getAssoFinalChan();  // 最后一条通道
33
+	VirtualChan* getAssoFinalChan(VirtualChan* pChan);  // 最后一条通道
32 34
 
33 35
 private:
34 36
 	VirtualChan* __getFirstChan();

+ 3 - 0
FreeSWITCH-linux/WebSocketServer.cpp

@@ -52,14 +52,17 @@ bool CWebSocketServer::sendMsg(websocketpp::connection_hdl hdl, string msg)
52 52
 	{
53 53
 		websocketpp::frame::opcode::value op = websocketpp::frame::opcode::value::TEXT;
54 54
 		m_endpoint.send(hdl, msg, op);
55
+		LOG_INFO("消息发送到坐席成功,[%s]",msg.c_str());
55 56
 	}
56 57
 	catch (websocketpp::exception const & e) {
57 58
 		stringstream str;
58 59
 		str << "Echo failed because: "
59 60
 			<< "(" << e.what() << ")";
60 61
 		LOG_ERROR_S(str.str());
62
+		LOG_ERROR("消息发送到坐席失败,[%s]", msg.c_str());
61 63
 		return false;
62 64
 	}
65
+	
63 66
 	return true;
64 67
 }
65 68
 

binární
FreeSWITCH-linux/bin/x64/Release/middleware


File diff suppressed because it is too large
+ 46 - 44
FreeSWITCH-linux/obj/x64/Release/1149391537.CompileUpToDateFile.tlog


+ 14 - 12
FreeSWITCH-linux/obj/x64/Release/1149391537.CopySourcesUpToDateFile.tlog

@@ -1,23 +1,23 @@
1
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.cpp|638217550335409049|~/projects/FreeSWITCH-linux|
1
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.cpp|638218384452441233|~/projects/FreeSWITCH-linux|
2 2
 G:\git\Middlewares-Linux\FreeSWITCH-linux\AgentDetail.cpp|638205475825278208|~/projects/FreeSWITCH-linux|
3 3
 G:\git\Middlewares-Linux\FreeSWITCH-linux\AutoCall.cpp|637896099232125673|~/projects/FreeSWITCH-linux|
4 4
 G:\git\Middlewares-Linux\FreeSWITCH-linux\CallStringMaker.cpp|637896099232135650|~/projects/FreeSWITCH-linux|
5 5
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanExten.cpp|637896099232145619|~/projects/FreeSWITCH-linux|
6
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.cpp|637896099232155594|~/projects/FreeSWITCH-linux|
6
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.cpp|638218346880218213|~/projects/FreeSWITCH-linux|
7 7
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JsonStringMaker.cpp|637896099232215431|~/projects/FreeSWITCH-linux|
8 8
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpAutoCall.cpp|637896099232235381|~/projects/FreeSWITCH-linux|
9 9
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpForceAgentState.cpp|637896099232235381|~/projects/FreeSWITCH-linux|
10 10
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHangup.cpp|637896099232245354|~/projects/FreeSWITCH-linux|
11 11
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHoldon.cpp|637896099232255325|~/projects/FreeSWITCH-linux|
12
-G:\git\Middlewares-Linux\FreeSWITCH-linux\EslGateway.cpp|638192507892748488|~/projects/FreeSWITCH-linux|
13
-G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.cpp|638218191461288534|~/projects/FreeSWITCH-linux|
12
+G:\git\Middlewares-Linux\FreeSWITCH-linux\EslGateway.cpp|638218437376967127|~/projects/FreeSWITCH-linux|
13
+G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.cpp|638223546421547704|~/projects/FreeSWITCH-linux|
14 14
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanTrunk.cpp|637896099232145619|~/projects/FreeSWITCH-linux|
15 15
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JdbcHelper.cpp|637896099232205458|~/projects/FreeSWITCH-linux|
16 16
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Log.cpp|637896099232215431|~/projects/FreeSWITCH-linux|
17 17
 G:\git\Middlewares-Linux\FreeSWITCH-linux\main.cpp|637896204514450062|~/projects/FreeSWITCH-linux|
18 18
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Md5.cpp|637896099232225407|~/projects/FreeSWITCH-linux|
19 19
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Operation.cpp|637896099232305186|~/projects/FreeSWITCH-linux|
20
-G:\git\Middlewares-Linux\FreeSWITCH-linux\OperationReactor.cpp|638200254361890753|~/projects/FreeSWITCH-linux|
20
+G:\git\Middlewares-Linux\FreeSWITCH-linux\OperationReactor.cpp|638223368584261454|~/projects/FreeSWITCH-linux|
21 21
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpInsert.cpp|637896099232255325|~/projects/FreeSWITCH-linux|
22 22
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpInstead.cpp|637896099232255325|~/projects/FreeSWITCH-linux|
23 23
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpIntercept.cpp|637896099232265297|~/projects/FreeSWITCH-linux|
@@ -28,15 +28,16 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMultiMeeting.cpp|638200250259459506|
28 28
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMute.cpp|637896099232275272|~/projects/FreeSWITCH-linux|
29 29
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMyd.cpp|637896099232285247|~/projects/FreeSWITCH-linux|
30 30
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpRecord.cpp|637920930843653676|~/projects/FreeSWITCH-linux|
31
+G:\git\Middlewares-Linux\FreeSWITCH-linux\OpSendDtmf.cpp|638223397880165293|~/projects/FreeSWITCH-linux|
31 32
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpTransfer.cpp|637920240908673583|~/projects/FreeSWITCH-linux|
32
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.cpp|637921161580448044|~/projects/FreeSWITCH-linux|
33
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.cpp|638223331393607724|~/projects/FreeSWITCH-linux|
33 34
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SoftAuth.cpp|637896160351710859|~/projects/FreeSWITCH-linux|
34 35
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SqlWrite.cpp|637896099232335119|~/projects/FreeSWITCH-linux|
35 36
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TimeScheduler.cpp|637896099232335119|~/projects/FreeSWITCH-linux|
36 37
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TtsBaidu.cpp|637896099232345089|~/projects/FreeSWITCH-linux|
37 38
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Util.cpp|637896099232345089|~/projects/FreeSWITCH-linux|
38 39
 G:\git\Middlewares-Linux\FreeSWITCH-linux\VirtualChan.cpp|637920964767764556|~/projects/FreeSWITCH-linux|
39
-G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.cpp|638215805950679872|~/projects/FreeSWITCH-linux|
40
+G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.cpp|638223406777131312|~/projects/FreeSWITCH-linux|
40 41
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.h|638215748197194972|~/projects/FreeSWITCH-linux|
41 42
 G:\git\Middlewares-Linux\FreeSWITCH-linux\AgentDetail.h|638205475044108214|~/projects/FreeSWITCH-linux|
42 43
 G:\git\Middlewares-Linux\FreeSWITCH-linux\AutoCall.h|637896099232125673|~/projects/FreeSWITCH-linux|
@@ -50,17 +51,17 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpAutoCall.h|637896099232235381|~/proj
50 51
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpForceAgentState.h|637896099232245354|~/projects/FreeSWITCH-linux|
51 52
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHangup.h|637896099232245354|~/projects/FreeSWITCH-linux|
52 53
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHoldon.h|637896099232255325|~/projects/FreeSWITCH-linux|
53
-G:\git\Middlewares-Linux\FreeSWITCH-linux\DevInfoInc.h|638200167490028303|~/projects/FreeSWITCH-linux|
54
+G:\git\Middlewares-Linux\FreeSWITCH-linux\DevInfoInc.h|638223606730398680|~/projects/FreeSWITCH-linux|
54 55
 G:\git\Middlewares-Linux\FreeSWITCH-linux\EslGateway.h|638192505089056425|~/projects/FreeSWITCH-linux|
55 56
 G:\git\Middlewares-Linux\FreeSWITCH-linux\FsLinkInc.h|637896099232185522|~/projects/FreeSWITCH-linux|
56
-G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.h|638207083837560879|~/projects/FreeSWITCH-linux|
57
+G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.h|638223305044392825|~/projects/FreeSWITCH-linux|
57 58
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanTrunk.h|637896099232155594|~/projects/FreeSWITCH-linux|
58 59
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ITimer.h|637896099232205458|~/projects/FreeSWITCH-linux|
59 60
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JdbcHelper.h|637896099232215431|~/projects/FreeSWITCH-linux|
60
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Log.h|637896099232225407|~/projects/FreeSWITCH-linux|
61
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Log.h|638218343685357293|~/projects/FreeSWITCH-linux|
61 62
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Md5.h|637896099232225407|~/projects/FreeSWITCH-linux|
62 63
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Operation.h|637919392157788133|~/projects/FreeSWITCH-linux|
63
-G:\git\Middlewares-Linux\FreeSWITCH-linux\OperationReactor.h|638200177340692951|~/projects/FreeSWITCH-linux|
64
+G:\git\Middlewares-Linux\FreeSWITCH-linux\OperationReactor.h|638223368631410046|~/projects/FreeSWITCH-linux|
64 65
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpInsert.h|637896099232255325|~/projects/FreeSWITCH-linux|
65 66
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpInstead.h|637896099232255325|~/projects/FreeSWITCH-linux|
66 67
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpIntercept.h|637896099232265297|~/projects/FreeSWITCH-linux|
@@ -71,8 +72,9 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMultiMeeting.h|638199984789291357|~/
71 72
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMute.h|637896099232285247|~/projects/FreeSWITCH-linux|
72 73
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMyd.h|637896099232285247|~/projects/FreeSWITCH-linux|
73 74
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpRecord.h|637896099232295217|~/projects/FreeSWITCH-linux|
75
+G:\git\Middlewares-Linux\FreeSWITCH-linux\OpSendDtmf.h|638222746994875868|~/projects/FreeSWITCH-linux|
74 76
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpTransfer.h|637920240990215499|~/projects/FreeSWITCH-linux|
75
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.h|637920955680078317|~/projects/FreeSWITCH-linux|
77
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.h|638223333460349527|~/projects/FreeSWITCH-linux|
76 78
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SoftAuth.h|637896099232335119|~/projects/FreeSWITCH-linux|
77 79
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SqlWrite.h|637896099232335119|~/projects/FreeSWITCH-linux|
78 80
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TimeScheduler.h|637896099232335119|~/projects/FreeSWITCH-linux|

File diff suppressed because it is too large
+ 1 - 1
FreeSWITCH-linux/obj/x64/Release/1149391537.LinkUpToDateFile.tlog


+ 2 - 0
FreeSWITCH-linux/obj/x64/Release/1149391537.Local_Remote_PathMapping.tlog

@@ -30,6 +30,7 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMultiMeeting.cpp|/root/projects/Free
30 30
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMute.cpp|/root/projects/FreeSWITCH-linux/OpMute.cpp
31 31
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMyd.cpp|/root/projects/FreeSWITCH-linux/OpMyd.cpp
32 32
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpRecord.cpp|/root/projects/FreeSWITCH-linux/OpRecord.cpp
33
+G:\git\Middlewares-Linux\FreeSWITCH-linux\OpSendDtmf.cpp|/root/projects/FreeSWITCH-linux/OpSendDtmf.cpp
33 34
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpTransfer.cpp|/root/projects/FreeSWITCH-linux/OpTransfer.cpp
34 35
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.cpp|/root/projects/FreeSWITCH-linux/Session.cpp
35 36
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SoftAuth.cpp|/root/projects/FreeSWITCH-linux/SoftAuth.cpp
@@ -73,6 +74,7 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMultiMeeting.h|/root/projects/FreeSW
73 74
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMute.h|/root/projects/FreeSWITCH-linux/OpMute.h
74 75
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMyd.h|/root/projects/FreeSWITCH-linux/OpMyd.h
75 76
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpRecord.h|/root/projects/FreeSWITCH-linux/OpRecord.h
77
+G:\git\Middlewares-Linux\FreeSWITCH-linux\OpSendDtmf.h|/root/projects/FreeSWITCH-linux/OpSendDtmf.h
76 78
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpTransfer.h|/root/projects/FreeSWITCH-linux/OpTransfer.h
77 79
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.h|/root/projects/FreeSWITCH-linux/Session.h
78 80
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SoftAuth.h|/root/projects/FreeSWITCH-linux/SoftAuth.h

+ 75 - 0
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.log

@@ -3,6 +3,81 @@
3 3
   Validating architecture
4 4
   Starting remote build
5 5
   Compiling sources:
6
+  Agent.cpp
7
+  AgentDetail.cpp
8
+  AutoCall.cpp
9
+  CallStringMaker.cpp
10
+  ChanExten.cpp
11
+  Config.cpp
12
+  JsonStringMaker.cpp
13
+  OpAutoCall.cpp
14
+  OpForceAgentState.cpp
15
+  OpHangup.cpp
16
+  OpHoldon.cpp
17
+  EslGateway.cpp
6 18
   FsProxy.cpp
19
+  ChanTrunk.cpp
20
+  JdbcHelper.cpp
21
+  Log.cpp
22
+  main.cpp
23
+  Md5.cpp
24
+  Operation.cpp
25
+  OperationReactor.cpp
26
+  OpInsert.cpp
27
+  OpInstead.cpp
28
+  OpIntercept.cpp
29
+  OpListen.cpp
30
+  OpMakeCall.cpp
31
+  OpMeeting.cpp
32
+  OpMultiMeeting.cpp
33
+  OpMute.cpp
34
+  OpMyd.cpp
35
+  OpRecord.cpp
36
+  OpSendDtmf.cpp
37
+  OpTransfer.cpp
38
+  Session.cpp
39
+  SoftAuth.cpp
40
+  SqlWrite.cpp
41
+  TimeScheduler.cpp
42
+  TtsBaidu.cpp
43
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(50,67): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
44
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(50,67): warning :                  char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
45
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(50,67): warning :                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(51,67): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
47
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(51,67): warning :                  char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
48
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(51,67): warning :                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(70,63): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
50
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(70,63): warning :              char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
51
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(70,63): warning :                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(71,63): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
53
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(71,63): warning :              char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
54
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(71,63): warning :                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(102,56): warning : conversion to ‘unsigned char’ from ‘std::__cxx11::basic_string<char>::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
56
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(102,56): warning :                      char_array_4[i] = base64_chars.find(char_array_4[i]);
57
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(102,56): warning :                                        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
58
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(104,58): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
59
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(104,58): warning :                  char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
60
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(104,58): warning :                                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(105,66): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
62
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(105,66): warning :                  char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
63
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(105,66): warning :                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(106,66): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
65
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(106,66): warning :                  char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
66
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(106,66): warning :                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
67
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(119,52): warning : conversion to ‘unsigned char’ from ‘std::__cxx11::basic_string<char>::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
68
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(119,52): warning :                  char_array_4[j] = base64_chars.find(char_array_4[j]);
69
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(119,52): warning :                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
70
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(121,54): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
71
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(121,54): warning :              char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
72
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(121,54): warning :                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(122,62): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
74
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(122,62): warning :              char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
75
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(122,62): warning :                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(123,62): warning : conversion to ‘unsigned char’ from ‘int’ may alter its value [-Wconversion]
77
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(123,62): warning :              char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
78
+G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\base\base64.h(123,62): warning :                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
79
+  Util.cpp
80
+  VirtualChan.cpp
81
+  WebSocketServer.cpp
7 82
   Linking objects
8 83
   FreeSWITCH-linux.vcxproj -> G:\git\Middlewares-Linux\FreeSWITCH-linux\bin\x64\Release\middleware

binární
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/compile.read.1.tlog


binární
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/compile.write.1.tlog


binární
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/link.write.1.tlog