baiwenju лет назад: 2
Родитель
Сommit
4166dd5f06
30 измененных файлов с 944 добавлено и 73 удалено
  1. 2 0
      FreeSWITCH-linux/Agent.cpp
  2. 18 0
      FreeSWITCH-linux/Agent.h
  3. 8 0
      FreeSWITCH-linux/Config.cpp
  4. 3 1
      FreeSWITCH-linux/Config.h
  5. 85 0
      FreeSWITCH-linux/DepttelextOffice.cpp
  6. 45 0
      FreeSWITCH-linux/DepttelextOffice.h
  7. 9 1
      FreeSWITCH-linux/FreeSWITCH-linux.vcxproj
  8. 27 0
      FreeSWITCH-linux/FreeSWITCH-linux.vcxproj.filters
  9. 129 0
      FreeSWITCH-linux/FsProxy.cpp
  10. 15 1
      FreeSWITCH-linux/FsProxy.h
  11. 7 2
      FreeSWITCH-linux/Session.cpp
  12. 10 0
      FreeSWITCH-linux/VideoExten.cpp
  13. 23 0
      FreeSWITCH-linux/VideoExten.h
  14. 89 0
      FreeSWITCH-linux/VideoExtenHdl.cpp
  15. 25 0
      FreeSWITCH-linux/VideoExtenHdl.h
  16. 90 0
      FreeSWITCH-linux/VideoOffice.cpp
  17. 23 0
      FreeSWITCH-linux/VideoOffice.h
  18. 123 0
      FreeSWITCH-linux/WebSocketServer - 副本.cpp
  19. 60 0
      FreeSWITCH-linux/WebSocketServer - 副本.h
  20. 76 31
      FreeSWITCH-linux/WebSocketServer.cpp
  21. 33 16
      FreeSWITCH-linux/WebSocketServer.h
  22. BIN
      FreeSWITCH-linux/bin/x64/Release/middleware
  23. 17 9
      FreeSWITCH-linux/obj/x64/Release/1149391537.CompileUpToDateFile.tlog
  24. 17 9
      FreeSWITCH-linux/obj/x64/Release/1149391537.CopySourcesUpToDateFile.tlog
  25. 1 1
      FreeSWITCH-linux/obj/x64/Release/1149391537.LinkUpToDateFile.tlog
  26. 8 0
      FreeSWITCH-linux/obj/x64/Release/1149391537.Local_Remote_PathMapping.tlog
  27. 1 2
      FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.log
  28. BIN
      FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/compile.read.1.tlog
  29. BIN
      FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/compile.write.1.tlog
  30. BIN
      FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/link.write.1.tlog

+ 2 - 0
FreeSWITCH-linux/Agent.cpp

@@ -62,6 +62,8 @@ void Agent::removeAgent(std::string HostAgent)
62 62
 
63 63
 bool Agent::setState(AGENT_STATE a_AgentState)
64 64
 {
65
+	m_bVideoLock = false; // 取消视频请求锁定状态,其它状态可以保证该坐席不会被分配
66
+
65 67
 	__statistics(a_AgentState);
66 68
 
67 69
 	switch (a_AgentState)

+ 18 - 0
FreeSWITCH-linux/Agent.h

@@ -44,6 +44,21 @@ public:
44 44
 
45 45
 	std::list<std::string> groups() const { return m_Groups; };
46 46
 	std::string group() const { return m_Group; };
47
+
48
+	/*视频相关,请求空闲坐席*/
49
+	bool VideoLock() {
50
+		if (m_State == AGENT_STATE_FREE && !m_bVideoLock) {
51
+			m_bVideoLock = true;
52
+			return true;
53
+		}
54
+		return false;
55
+	}
56
+	/*取消视频请求锁定*/
57
+	bool CancelVideoLock() {
58
+		m_bVideoLock = false;
59
+		return true;
60
+	}
61
+
47 62
 private:
48 63
 	bool __login();
49 64
 	bool __logout();
@@ -84,5 +99,8 @@ private:
84 99
 	std::string m_Group;  // 坐席组,未分割
85 100
 
86 101
 	websocketpp::connection_hdl m_hdl;
102
+
103
+	/*视频相关*/
104
+	bool m_bVideoLock; // 是否锁定
87 105
 };
88 106
 

+ 8 - 0
FreeSWITCH-linux/Config.cpp

@@ -158,4 +158,12 @@ std::string CConfig::aesMark()
158 158
 {
159 159
 	return root["secretMark"].asString();
160 160
 }
161
+bool CConfig::isVideo()
162
+{
163
+	return root["isVideo"].asBool();
164
+}
165
+bool CConfig::isWss()
166
+{
167
+	return root["isWss"].asBool();
168
+}
161 169
 CConfig CConfig::cfg;

+ 3 - 1
FreeSWITCH-linux/Config.h

@@ -30,7 +30,9 @@ public:
30 30
 	bool isAutoRecord();           // 是否自动录音
31 31
 	int postProcessTime();         // 话后处理时长
32 32
 	std::string aesKey();          // aes密码
33
-	std::string aesMark();        // 标识
33
+	std::string aesMark();         // 标识
34
+	bool isVideo();                // 是否是视频 
35
+	bool isWss();                  // 是否开启wss
34 36
 	static CConfig* GetInstance() { return &cfg; }
35 37
 private:
36 38
 	static CConfig cfg;

+ 85 - 0
FreeSWITCH-linux/DepttelextOffice.cpp

@@ -0,0 +1,85 @@
1
+#include "DepttelextOffice.h"
2
+#include <iostream>
3
+#include <json/json.h>
4
+#include "Log.h"
5
+#include "JdbcHelper.h"
6
+
7
+CDepttelextOffice::~CDepttelextOffice()
8
+{
9
+	std::unique_lock<std::mutex>lock(mut);
10
+	auto it = m_DeptTelextmap.begin();
11
+	DeptTelext *pDeptTelext = nullptr;
12
+	while (it != m_DeptTelextmap.end())
13
+	{
14
+		pDeptTelext = it->second;
15
+		if (pDeptTelext) {
16
+			delete pDeptTelext;
17
+			pDeptTelext = nullptr;
18
+		}
19
+		++it;
20
+	}
21
+}
22
+
23
+bool CDepttelextOffice::InitDepttelext()
24
+{
25
+	LOG_INFO("督办分机号码列表开始初始化");
26
+	std::string strSQL = "SELECT id,Name,Telephone,Extension FROM  rep_video_depttelext";
27
+	std::unique_lock<std::mutex>lock(mut);
28
+	JdbcHelper::GetInstance()->jdbc_executeQuery(strSQL, NULL, [this](sql::ResultSet* result) {
29
+
30
+		while (result->next()){
31
+			DeptTelext *pDeptTelext = new DeptTelext();
32
+			pDeptTelext->Name = result->getString("Name");
33
+			pDeptTelext->Telephone = result->getString("Telephone");
34
+			pDeptTelext->Extension = result->getString("Extension");
35
+			pDeptTelext->State = 0;// 默认不可用
36
+			 
37
+			auto extenId = std::stoul(pDeptTelext->Extension);
38
+			m_DeptTelextmap.insert(std::make_pair(extenId, pDeptTelext));
39
+		}
40
+	}, NULL);
41
+	LOG_INFO("督办分机号码列表结束初始化");
42
+	return true;
43
+}
44
+
45
+bool CDepttelextOffice::UpdateDepttelext(uint32_t extno, int state)
46
+{
47
+	std::unique_lock<std::mutex>lock(mut);
48
+	auto it = m_DeptTelextmap.find(extno);
49
+	if (it == m_DeptTelextmap.end()) return false;
50
+	if (it->second) {
51
+		it->second->UpdateState(state);
52
+	}
53
+	return true;
54
+}
55
+
56
+std::string CDepttelextOffice::GetAllDeptTelext()
57
+{
58
+	Json::Value root;
59
+	Json::Value person;
60
+	
61
+	Json::FastWriter writer;
62
+	person["Type"] = "";
63
+	person["Result"] = true;
64
+
65
+	std::unique_lock<std::mutex>lock(mut);
66
+	auto it = m_DeptTelextmap.begin();
67
+	DeptTelext *pDeptTelext = nullptr;
68
+	while (it != m_DeptTelextmap.end()) {
69
+		pDeptTelext = it->second;
70
+		if (pDeptTelext) {
71
+			Json::Value body;
72
+			body["Name"] = pDeptTelext->Name;
73
+			body["Telephone"] = pDeptTelext->Telephone;
74
+			body["AgentExten"] = pDeptTelext->Extension;
75
+			body["State"] = pDeptTelext->State;
76
+
77
+			person["ExtenList"].append(body);
78
+		}
79
+		++it;
80
+	}
81
+	lock.unlock();
82
+	root.append(person);
83
+	return writer.write(root);
84
+}
85
+

+ 45 - 0
FreeSWITCH-linux/DepttelextOffice.h

@@ -0,0 +1,45 @@
1
+#pragma once
2
+#include <map>
3
+#include <string>
4
+#include <iostream>
5
+#include <atomic>
6
+#include <mutex>
7
+
8
+class CDepttelextOffice
9
+{
10
+public:
11
+	CDepttelextOffice() {};
12
+	~CDepttelextOffice();
13
+
14
+	bool InitDepttelext();
15
+	bool UpdateDepttelext(uint32_t extno, int state);
16
+	std::string GetAllDeptTelext();
17
+
18
+private:
19
+
20
+private:
21
+	typedef struct tagtel_depttelext {
22
+		int Id;
23
+		std::string Name;
24
+		std::string Telephone;
25
+		std::string Extension;
26
+		std::string AgentID;
27
+		int State;
28
+
29
+		tagtel_depttelext() {
30
+			State = 0;
31
+		}
32
+		void UpdateState(int state) {
33
+			this->State = state;
34
+			
35
+		}
36
+		
37
+		void print() {
38
+			std::cout << Name << "-" << Telephone << "-" << Extension << "-" << AgentID << "-" << State << std::endl;
39
+		}
40
+	}DeptTelext;
41
+
42
+	std::map<uint32_t, DeptTelext*> m_DeptTelextmap;  
43
+	std::mutex mut;
44
+};
45
+

+ 9 - 1
FreeSWITCH-linux/FreeSWITCH-linux.vcxproj

@@ -89,6 +89,7 @@
89 89
     <ClCompile Include="CallStringMaker.cpp" />
90 90
     <ClCompile Include="ChanExten.cpp" />
91 91
     <ClCompile Include="Config.cpp" />
92
+    <ClCompile Include="DepttelextOffice.cpp" />
92 93
     <ClCompile Include="JsonStringMaker.cpp" />
93 94
     <ClCompile Include="OpAutoCall.cpp" />
94 95
     <ClCompile Include="OpForceAgentState.cpp" />
@@ -122,6 +123,9 @@
122 123
     <ClCompile Include="TokenList.cpp" />
123 124
     <ClCompile Include="TtsBaidu.cpp" />
124 125
     <ClCompile Include="Util.cpp" />
126
+    <ClCompile Include="VideoExten.cpp" />
127
+    <ClCompile Include="VideoExtenHdl.cpp" />
128
+    <ClCompile Include="VideoOffice.cpp" />
125 129
     <ClCompile Include="VirtualChan.cpp" />
126 130
     <ClCompile Include="WebSocketServer.cpp" />
127 131
   </ItemGroup>
@@ -133,6 +137,7 @@
133 137
     <ClInclude Include="CallStringMaker.h" />
134 138
     <ClInclude Include="ChanExten.h" />
135 139
     <ClInclude Include="Config.h" />
140
+    <ClInclude Include="DepttelextOffice.h" />
136 141
     <ClInclude Include="ICdr.h" />
137 142
     <ClInclude Include="JsonStringMaker.h" />
138 143
     <ClInclude Include="OpAutoCall.h" />
@@ -181,6 +186,9 @@
181 186
     <ClInclude Include="ttsapi\speech.h" />
182 187
     <ClInclude Include="TtsBaidu.h" />
183 188
     <ClInclude Include="Util.h" />
189
+    <ClInclude Include="VideoExten.h" />
190
+    <ClInclude Include="VideoExtenHdl.h" />
191
+    <ClInclude Include="VideoOffice.h" />
184 192
     <ClInclude Include="VirtualChan.h" />
185 193
     <ClInclude Include="WebSocketServer.h" />
186 194
   </ItemGroup>
@@ -199,7 +207,7 @@
199 207
     </ClCompile>
200 208
     <Link>
201 209
       <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
202
-      <LibraryDependencies>pthread;esl;log4cpp;jsoncpp;mysqlcppconn;curl;crypto;boost_filesystem;boost_date_time;cryptopp</LibraryDependencies>
210
+      <LibraryDependencies>pthread;esl;log4cpp;jsoncpp;mysqlcppconn;curl;crypto;ssl;boost_filesystem;boost_date_time;cryptopp</LibraryDependencies>
203 211
       <AdditionalOptions>-lm  %(AdditionalOptions)</AdditionalOptions>
204 212
     </Link>
205 213
     <PreBuildEvent>

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

@@ -122,6 +122,18 @@
122 122
     <ClCompile Include="TokenList.cpp">
123 123
       <Filter>Token</Filter>
124 124
     </ClCompile>
125
+    <ClCompile Include="VideoExten.cpp">
126
+      <Filter>VideoExten</Filter>
127
+    </ClCompile>
128
+    <ClCompile Include="VideoOffice.cpp">
129
+      <Filter>VideoExten</Filter>
130
+    </ClCompile>
131
+    <ClCompile Include="DepttelextOffice.cpp">
132
+      <Filter>VideoExten</Filter>
133
+    </ClCompile>
134
+    <ClCompile Include="VideoExtenHdl.cpp">
135
+      <Filter>VideoExten</Filter>
136
+    </ClCompile>
125 137
   </ItemGroup>
126 138
   <ItemGroup>
127 139
     <Filter Include="Net">
@@ -181,6 +193,9 @@
181 193
     <Filter Include="Token">
182 194
       <UniqueIdentifier>{c15f03ed-a70f-4eb0-bcd7-7f984b36dfc5}</UniqueIdentifier>
183 195
     </Filter>
196
+    <Filter Include="VideoExten">
197
+      <UniqueIdentifier>{b3ad3ea7-78bf-4dda-b3a8-913703708f2d}</UniqueIdentifier>
198
+    </Filter>
184 199
   </ItemGroup>
185 200
   <ItemGroup>
186 201
     <ClInclude Include="WebSocketServer.h">
@@ -350,6 +365,18 @@
350 365
     <ClInclude Include="TokenList.h">
351 366
       <Filter>Token</Filter>
352 367
     </ClInclude>
368
+    <ClInclude Include="VideoExten.h">
369
+      <Filter>VideoExten</Filter>
370
+    </ClInclude>
371
+    <ClInclude Include="VideoOffice.h">
372
+      <Filter>VideoExten</Filter>
373
+    </ClInclude>
374
+    <ClInclude Include="DepttelextOffice.h">
375
+      <Filter>VideoExten</Filter>
376
+    </ClInclude>
377
+    <ClInclude Include="VideoExtenHdl.h">
378
+      <Filter>VideoExten</Filter>
379
+    </ClInclude>
353 380
   </ItemGroup>
354 381
   <ItemGroup>
355 382
     <None Include="log4cpp.conf">

+ 129 - 0
FreeSWITCH-linux/FsProxy.cpp

@@ -48,6 +48,9 @@ bool CFsProxy::init()
48 48
 		LOG_ERROR(fmt.str().c_str());
49 49
 	});
50 50
 
51
+	m_VideoOffice.initVideoExten();
52
+	m_DepttelOffice.InitDepttelext();
53
+
51 54
 	if (!m_Server.init(cfg->wsPort()))
52 55
 	{
53 56
 		LOG_ERROR("程序运行失败,请检查端口[%d]是否已被占用", cfg->wsPort());
@@ -190,6 +193,13 @@ void CFsProxy::onChanStateUpdate(long OpInstance, VirtualChan * pChan)
190 193
 	LOG_DEBUG_S(fmt.str());
191 194
 
192 195
 	if (devType == DEV_RES_TYPE_EXT) {
196
+		// 更新督办分机状态
197
+		if (m_DepttelOffice.UpdateDepttelext(pChan->no(), chanState)) {
198
+			return;
199
+		}
200
+	}
201
+	
202
+	if (devType == DEV_RES_TYPE_EXT) {
193 203
 		map<std::string, Agent*>::iterator it;
194 204
 
195 205
 		std::unique_lock<std::mutex>lock(m_AgentLock);
@@ -858,6 +868,13 @@ std::string CFsProxy::creatJson(std::string type, std::string result, std::strin
858 868
 
859 869
 std::string CFsProxy::creatJsonIncoming(std::string callid, std::string caller, std::string callee, std::string trunkNumber, int incomintType)
860 870
 {
871
+	if (incomintType == 1) { // 视频通话,来电弹屏将来电分机号替换为相应手机号
872
+		auto it = m_ExtPhone.find(atoi(caller.c_str()));
873
+		if (it != m_ExtPhone.end()) {
874
+			caller = it->second;
875
+		}
876
+	}
877
+	
861 878
 	Json::Value root;
862 879
 	Json::StreamWriterBuilder jsrocd;
863 880
 	root["Type"] = "Incoming";
@@ -881,6 +898,45 @@ std::string CFsProxy::creatJsonRecord(std::string callid, std::string recordPath
881 898
 	return Json::writeString(jsrocd, root);
882 899
 }
883 900
 
901
+std::string CFsProxy::creatJson2(std::string type, bool result)
902
+{
903
+	Json::Value root;
904
+	Json::StreamWriterBuilder jsrocd;
905
+	Json::Value person;
906
+
907
+	person["Type"] = type;
908
+	person["Result"] = result;
909
+	root.append(person);
910
+	return Json::writeString(jsrocd, root);
911
+}
912
+
913
+std::string CFsProxy::creatJson2(std::string type, bool result, int extenID)
914
+{
915
+	Json::Value root;
916
+	Json::StreamWriterBuilder jsrocd;
917
+	Json::Value person;
918
+
919
+	person["Type"] = type;
920
+	person["Result"] = result;
921
+	person["AgentExten"] = extenID;
922
+	root.append(person);
923
+	return Json::writeString(jsrocd, root);
924
+}
925
+
926
+std::string CFsProxy::creatJson2(std::string type, bool result, int extenID, std::string pwd)
927
+{
928
+	Json::Value root;
929
+	Json::StreamWriterBuilder jsrocd;
930
+	Json::Value person;
931
+
932
+	person["Type"] = type;
933
+	person["Result"] = result;
934
+	person["AgentExten"] = extenID;
935
+	person["ExtenPwd"] = pwd;
936
+	root.append(person);
937
+	return Json::writeString(jsrocd, root);
938
+}
939
+
884 940
 bool CFsProxy::__init()
885 941
 {
886 942
 	__initTrunkChan();
@@ -1740,6 +1796,66 @@ void CFsProxy::__recvMsgFun(websocketpp::connection_hdl hdl, string msg)
1740 1796
 			if (!ret)
1741 1797
 				m_Server.sendMsg(hdl, creatJson(type, std::string("操作失败")));
1742 1798
 		}
1799
+		// 以下是视频接口
1800
+		else if ("VideoReqExten" == type) {  // 请求可以注册的分机号
1801
+		   uint32_t extenId;
1802
+		   std::string pwd;
1803
+		   auto ret = m_VideoOffice.findVideoExten(extenId, pwd);
1804
+		   if (ret) {
1805
+			   auto agent = AgentID;
1806
+			   ret = m_VideoExtenHdl.add(ExtenNo, agent, hdl);
1807
+			   if (!ret) {
1808
+				   m_VideoOffice.recoverVideoExten(extenId);
1809
+			   }
1810
+		   }
1811
+		   auto data = creatJson2("VideoReqExten", ret, extenId, pwd);
1812
+		   m_Server.sendMsg(hdl, data);
1813
+		}
1814
+		else if ("VideoReqBindExtPhone" == type) { // 绑定分机号-手机号关系
1815
+		   const string DestinationNumber = root["DestinationNumber"].asString();
1816
+		   m_ExtPhone[ExtenNo] = DestinationNumber;
1817
+		   auto data = creatJson2(type, true);
1818
+		   m_Server.sendMsg(hdl, data);
1819
+		}
1820
+		else if ("VideoReqIdeAgent" == type) { // 请求空闲坐席
1821
+		    std::unique_lock<std::mutex>lock(m_AgentLock);
1822
+		    bool ret = false;
1823
+		    uint32_t exten = 0;
1824
+		    for (auto it = m_MapAgent.begin(); it != m_MapAgent.end(); ++it) {
1825
+			   if (it->second->VideoLock()) {
1826
+				  exten = (uint32_t)stoul(it->first);
1827
+				  ret = true;
1828
+				  break;
1829
+			   }
1830
+		    }
1831
+			lock.unlock();
1832
+		    auto data = creatJson2(type, ret, exten);
1833
+		    m_Server.sendMsg(hdl, data);
1834
+			ret = m_VideoExtenHdl.bindReqAgentExten(ExtenNo, exten);
1835
+			if (!ret && exten != 0) {
1836
+				lock.lock();
1837
+				auto it = m_MapAgent.find(std::to_string(exten));
1838
+				if (ret && it != m_MapAgent.end()) {
1839
+					it->second->CancelVideoLock();
1840
+				}
1841
+				lock.unlock();
1842
+			}
1843
+		}
1844
+		else if ("VideoDesExten" == type) { // 销毁/回收请求的分机号
1845
+		   m_VideoOffice.recoverVideoExten(ExtenNo);
1846
+		   std::string data = creatJson2(type, true);
1847
+		   m_Server.sendMsg(hdl, data);
1848
+		}
1849
+		else if ("VideoReqBindAgent" == type) { //督办专员 保存
1850
+		   auto agent = AgentID;
1851
+		   auto ret = m_VideoExtenHdl.add(ExtenNo, agent,hdl);
1852
+		   std::string data = creatJson2(type, ret);
1853
+		   m_Server.sendMsg(hdl, data);
1854
+		}
1855
+		else if ("GetExtenList" == type) { // 获取督办部门状态
1856
+		  auto data = m_DepttelOffice.GetAllDeptTelext();
1857
+		  m_Server.sendMsg(hdl, data);
1858
+		}
1743 1859
 		else {
1744 1860
 
1745 1861
 		}
@@ -1764,6 +1880,19 @@ void CFsProxy::__closeFun(websocketpp::connection_hdl hdl)
1764 1880
 
1765 1881
 	m_mpAgentDetailHdl.erase(conID);
1766 1882
 
1883
+	/*视频处理*/
1884
+	auto pair = m_VideoExtenHdl.del(hdl);
1885
+	if (pair.first > 0) {
1886
+		m_VideoOffice.recoverVideoExten(pair.first, true);
1887
+		m_DepttelOffice.UpdateDepttelext(pair.first, 0);
1888
+		if (pair.second > 0) {
1889
+			std::unique_lock<std::mutex>lock(m_AgentLock);
1890
+			auto it = m_MapAgent.find(std::to_string(pair.second));
1891
+			it->second->CancelVideoLock();
1892
+		}
1893
+		return;
1894
+	}
1895
+	
1767 1896
 	std::string agentId;
1768 1897
 	std::string extenNo;
1769 1898
 	std::unique_lock<std::mutex>lock(m_AgentLock);

+ 15 - 1
FreeSWITCH-linux/FsProxy.h

@@ -16,6 +16,9 @@
16 16
 #include "AutoCall.h"
17 17
 #include "AgentDetail.h"
18 18
 #include "TokenList.h"
19
+#include "VideoOffice.h"
20
+#include "DepttelextOffice.h"
21
+#include "VideoExtenHdl.h"
19 22
 
20 23
 typedef struct MyStruct
21 24
 {
@@ -132,7 +135,11 @@ public:
132 135
 	std::string creatJson(std::string type, std::string result, std::string agentId, std::string extenNo);
133 136
 	std::string creatJsonIncoming(std::string callid, std::string caller, std::string callee, std::string trunkNumber,int incomintType);
134 137
 	std::string creatJsonRecord(std::string callid,std::string recordPath);
135
-
138
+	// 视频
139
+	std::string creatJson2(std::string type, bool result);
140
+	std::string creatJson2(std::string type, bool result, int extenID);
141
+	std::string creatJson2(std::string type, bool result, int extenID, std::string pwd);
142
+	
136 143
 private:
137 144
 	bool __init();
138 145
 	uint32_t __transLogicState2CtiState(DEV_RES_TYPE ChanType, CHAN_LOGIC_STATE State);
@@ -202,6 +209,13 @@ private:
202 209
 	std::map<long,websocketpp::connection_hdl> m_mpAgentDetailHdl;  // 保存坐席详情hdl
203 210
 	
204 211
 	TokenList m_ToeknList; // token验证
212
+
213
+	/*视频相关*/
214
+	CVideoOffice m_VideoOffice; // 市民分机管理
215
+	CDepttelextOffice m_DepttelOffice; // 督办分机状态管理
216
+	CVideoExtenHdl m_VideoExtenHdl; // 保存市民/督办 分机-连接关系
217
+	std::unordered_map<int, std::string> m_ExtPhone;// 分机号-手机号
218
+
205 219
 	//static
206 220
 	volatile long opInstance = 1l;  // 无实际意义
207 221
 	static CFsProxy instance; 

+ 7 - 2
FreeSWITCH-linux/Session.cpp

@@ -571,9 +571,14 @@ void Session::__createFileName(VirtualChan * pChan)
571 571
 		{
572 572
 			boost::filesystem::create_directories(p);
573 573
 		}
574
-
575 574
 		std::stringstream ss;
576
-		ss << m_RecordFile << pChan->no() << "/" << strTempCallID << ".wav";
575
+		ss << m_RecordFile << pChan->no() << "/" << strTempCallID;
576
+		if (CConfig::GetInstance()->isVideo()) {
577
+			ss << ".mp4";
578
+		}
579
+		else {
580
+			ss << ".wav";
581
+		}
577 582
 		m_RecordFile = ss.str();
578 583
 	}
579 584
 }

+ 10 - 0
FreeSWITCH-linux/VideoExten.cpp

@@ -0,0 +1,10 @@
1
+#include "VideoExten.h"
2
+
3
+CVideoExten::CVideoExten(uint32_t a_ExtId, std::string a_ExtPwd, bool a_IsUsed) :m_Id(a_ExtId), m_Password(a_ExtPwd), m_IsUsed(a_IsUsed)
4
+{
5
+	std::cout << m_Id << "-" << m_Password << std::endl;
6
+}
7
+
8
+CVideoExten::~CVideoExten()
9
+{
10
+}

+ 23 - 0
FreeSWITCH-linux/VideoExten.h

@@ -0,0 +1,23 @@
1
+#pragma once
2
+#include <iostream>
3
+#include <string>
4
+
5
+class CVideoExten
6
+{
7
+public:
8
+	CVideoExten(uint32_t a_ExtId, std::string a_ExtPwd, bool a_IsUsed = false);
9
+	~CVideoExten();
10
+
11
+	uint32_t id() const { return m_Id; }
12
+	std::string pwd() const { return m_Password; }
13
+	bool isUsed() const { return m_IsUsed; };
14
+	bool& isUsed() { return m_IsUsed; }
15
+
16
+
17
+private:
18
+	uint32_t m_Id;   // 分机号
19
+	std::string m_Password; // 分机密码
20
+	bool m_IsUsed;   // 是否被用  true已被用,false可用
21
+
22
+};
23
+

+ 89 - 0
FreeSWITCH-linux/VideoExtenHdl.cpp

@@ -0,0 +1,89 @@
1
+#include "VideoExtenHdl.h"
2
+
3
+bool CVideoExtenHdl::add(uint32_t & exten, std::string & agent, websocketpp::connection_hdl hdl)
4
+{
5
+	std::unique_lock<std::mutex>lock(mut);
6
+	auto it = m_ExtenAgent.find(exten);
7
+	if (it == m_ExtenAgent.end()) {
8
+		m_ExtenAgent[exten] = agent;
9
+		m_ExtenHdl[exten] = hdl;
10
+		return true;
11
+	}
12
+	return false;
13
+}
14
+
15
+bool CVideoExtenHdl::bindReqAgentExten(const uint32_t & exten, uint32_t & agentExten)
16
+{
17
+	std::unique_lock<std::mutex>lock(mut);
18
+	{
19
+		auto it = m_ExtenAgent.find(exten);
20
+		if (it == m_ExtenAgent.end()) {
21
+			return false;
22
+		}
23
+	}
24
+	for (auto it = m_ExtenBindReqAgentExten.begin(); it != m_ExtenBindReqAgentExten.end();) {
25
+		if (it->second == agentExten) {
26
+			it = m_ExtenBindReqAgentExten.erase(it);
27
+		}
28
+		else {
29
+			++it;
30
+		}
31
+	}
32
+	auto it = m_ExtenBindReqAgentExten.find(exten);
33
+	if (it == m_ExtenBindReqAgentExten.end()) {
34
+		m_ExtenBindReqAgentExten[exten] = agentExten;
35
+		return true;
36
+	}
37
+	else { // 如果之前绑定过,需要解除之前绑定
38
+		uint32_t oldAgentExten = it->second;
39
+		m_ExtenBindReqAgentExten[exten] = agentExten;
40
+		if (oldAgentExten == agentExten|| oldAgentExten == 0)return true;
41
+		agentExten = oldAgentExten;
42
+		return false;
43
+	}
44
+}
45
+
46
+std::pair<uint32_t, uint32_t> CVideoExtenHdl::del(websocketpp::connection_hdl hdl)
47
+{
48
+	std::unique_lock<std::mutex>lock(mut);
49
+	for (auto it = m_ExtenHdl.begin(); it != m_ExtenHdl.end(); ++it) {
50
+		if (it->second.lock() == hdl.lock()) {
51
+			uint32_t exten = 0;
52
+			uint32_t bindAgentExten = 0;
53
+			exten = it->first;
54
+			m_ExtenAgent.erase(exten);
55
+			m_ExtenHdl.erase(it);
56
+
57
+			auto itBind = m_ExtenBindReqAgentExten.find(exten);
58
+			if (itBind != m_ExtenBindReqAgentExten.end()) {
59
+				bindAgentExten = itBind->second;
60
+				m_ExtenBindReqAgentExten.erase(itBind);
61
+			}
62
+			return std::pair(exten, bindAgentExten);
63
+		}
64
+	}
65
+	return std::pair(0, 0);
66
+}
67
+
68
+void CVideoExtenHdl::del(uint32_t & exten)
69
+{
70
+	std::unique_lock<std::mutex>lock(mut);
71
+	m_ExtenAgent.erase(exten);
72
+	m_ExtenHdl.erase(exten);
73
+	m_ExtenBindReqAgentExten.erase(exten);
74
+}
75
+
76
+void CVideoExtenHdl::del(std::string & agent)
77
+{
78
+	std::unique_lock<std::mutex>lock(mut);
79
+	for (auto it = m_ExtenAgent.begin(); it != m_ExtenAgent.end(); ++it) {
80
+		if (it->second == agent) {
81
+			uint32_t exten = 0;
82
+			exten = it->first;
83
+			m_ExtenAgent.erase(exten);
84
+			m_ExtenHdl.erase(exten);
85
+			m_ExtenBindReqAgentExten.erase(exten);
86
+			break;
87
+		}
88
+	}
89
+}

+ 25 - 0
FreeSWITCH-linux/VideoExtenHdl.h

@@ -0,0 +1,25 @@
1
+#pragma once
2
+
3
+#include <map>
4
+#include <mutex>
5
+#include <websocketpp/connection.hpp>
6
+
7
+class CVideoExtenHdl
8
+{
9
+public:
10
+	CVideoExtenHdl() {};
11
+	~CVideoExtenHdl() {};
12
+
13
+	bool add(uint32_t&exten,std::string&agent, websocketpp::connection_hdl hdl);
14
+	bool bindReqAgentExten(const uint32_t&exten, uint32_t& agentExten);
15
+	std::pair<uint32_t, uint32_t> del(websocketpp::connection_hdl hdl);
16
+	void del(uint32_t&exten);
17
+	void del(std::string&agent);
18
+
19
+private:
20
+	std::map<uint32_t, std::string> m_ExtenAgent;
21
+	std::map<uint32_t, websocketpp::connection_hdl> m_ExtenHdl;
22
+	std::map<uint32_t, uint32_t> m_ExtenBindReqAgentExten; // °ó¶¨ÇëÇóµ½µÄ×øÏ¯·Ö»ú
23
+	std::mutex mut;
24
+};
25
+

+ 90 - 0
FreeSWITCH-linux/VideoOffice.cpp

@@ -0,0 +1,90 @@
1
+#include "VideoOffice.h"
2
+#include "VideoExten.h"
3
+#include "JdbcHelper.h"
4
+#include "Log.h"
5
+
6
+CVideoOffice::CVideoOffice()
7
+{
8
+}
9
+
10
+CVideoOffice::~CVideoOffice()
11
+{
12
+}
13
+
14
+bool CVideoOffice::initVideoExten()
15
+{
16
+	LOG_INFO("视频账号开始初始化");
17
+	std::string strSQL = "SELECT exten ,pwd FROM rep_video_account";
18
+	JdbcHelper::GetInstance()->jdbc_executeQuery(strSQL, NULL, [this](sql::ResultSet* result) {
19
+
20
+		while (result->next())
21
+		{
22
+			auto extenId = result->getUInt(1);
23
+			sql::SQLString pwd = result->getString(2);
24
+			CVideoExten *pExten = new CVideoExten(extenId, pwd);
25
+			m_VideoExtens.insert(std::make_pair(extenId, pExten));
26
+			LOG_INFO("添加视频账号[%lu]密码[%s]", extenId, pwd.c_str());
27
+		}
28
+	}, NULL);
29
+	LOG_INFO("视频账号结束初始化");
30
+	return true;
31
+}
32
+
33
+bool CVideoOffice::findVideoExten(uint32_t & a_VideoExtId, std::string & a_VideoExtPwd)
34
+{
35
+	std::unique_lock<std::mutex> lock(mut);
36
+	auto it = m_VideoExtens.begin();
37
+	while (it != m_VideoExtens.end())
38
+	{
39
+		if (it->second->isUsed() == false)
40
+		{
41
+			it->second->isUsed() = true;
42
+			a_VideoExtId = it->second->id();
43
+			a_VideoExtPwd = it->second->pwd();
44
+			LOG_INFO("获取视频分机号[%lu]密码[%s]",a_VideoExtId,a_VideoExtPwd.c_str());
45
+			return true;
46
+		}
47
+		++it;
48
+	}
49
+	LOG_WARN("找不到可用视频账号");
50
+	return false;
51
+}
52
+
53
+bool CVideoOffice::recoverVideoExten(uint32_t a_VideoExtId, bool bIsRm)
54
+{
55
+	bool ret = false;
56
+	std::unique_lock<std::mutex> lock(mut);
57
+	auto it = m_VideoExtens.find(a_VideoExtId);
58
+	if (it != m_VideoExtens.end()) {
59
+		ret = true;
60
+		it->second->isUsed() = false;
61
+		if (!bIsRm) {
62
+			LOG_INFO("释放视频分机号[%lu]状态[%s]", a_VideoExtId, it->second->isUsed() ? "不可用" : "可用");
63
+		}
64
+		else {
65
+			LOG_INFO("释放视频分机号[%lu]状态[%s],话机取消注册", a_VideoExtId, it->second->isUsed() ? "不可用" : "可用");
66
+		}
67
+	}
68
+	else {
69
+		return ret;
70
+	}
71
+
72
+	auto iter = m_VideoExtens.begin();
73
+	while (iter != m_VideoExtens.end()) {
74
+		LOG_DEBUG("分机[%lu]状态[%s]", iter->second->id(), iter->second->isUsed() ? "已被用" : "可用");
75
+		++iter;
76
+	}
77
+	return ret;
78
+}
79
+
80
+void CVideoOffice::close()
81
+{
82
+	std::unique_lock<std::mutex> lock(mut);
83
+	auto it = m_VideoExtens.begin();
84
+	while (it != m_VideoExtens.end()){
85
+		delete it->second;
86
+		it->second = nullptr;
87
+		++it;
88
+	}
89
+	m_VideoExtens.clear();
90
+}

+ 23 - 0
FreeSWITCH-linux/VideoOffice.h

@@ -0,0 +1,23 @@
1
+#pragma once
2
+
3
+#include <map>
4
+#include <mutex>
5
+
6
+class CVideoExten;
7
+class CVideoOffice
8
+{
9
+public:
10
+	CVideoOffice();
11
+	~CVideoOffice();
12
+
13
+	bool initVideoExten();
14
+	bool findVideoExten(uint32_t &a_VideoExtId, std::string &a_VideoExtPwd);
15
+	bool recoverVideoExten(uint32_t a_VideoExtId, bool bIsRm = false);
16
+
17
+	void close();
18
+
19
+private:
20
+	std::map<uint32_t, CVideoExten*> m_VideoExtens;
21
+	std::mutex mut;
22
+};
23
+

+ 123 - 0
FreeSWITCH-linux/WebSocketServer - 副本.cpp

@@ -0,0 +1,123 @@
1
+#include "WebSocketServer.h"
2
+#include "Log.h"
3
+#include <json/json.h>
4
+
5
+CWebSocketServer::CWebSocketServer() 
6
+{
7
+	// Set logging settings
8
+	/*m_endpoint.set_error_channels(websocketpp::log::elevel::all);*/
9
+	/*m_endpoint.set_access_channels(websocketpp::log::alevel::all ^ websocketpp::log::alevel::frame_payload);*/
10
+	m_endpoint.set_access_channels(websocketpp::log::alevel::none ^ websocketpp::log::alevel::none);
11
+
12
+	// Register our message handler
13
+
14
+	m_endpoint.set_message_handler(bind(&CWebSocketServer::on_message, this, &m_endpoint, std::placeholders::_1, std::placeholders::_2));
15
+	m_endpoint.set_open_handler(bind(&CWebSocketServer::on_open, this, &m_endpoint, std::placeholders::_1));
16
+	m_endpoint.set_close_handler(bind(&CWebSocketServer::on_close, this, &m_endpoint, std::placeholders::_1));
17
+	m_endpoint.set_fail_handler(bind(&CWebSocketServer::on_fail, this, &m_endpoint, std::placeholders::_1));
18
+	m_endpoint.init_asio();
19
+
20
+	m_endpoint.set_reuse_addr(true);
21
+	m_endpoint.start_perpetual();
22
+}
23
+
24
+CWebSocketServer::~CWebSocketServer()
25
+{
26
+	m_endpoint.stop_perpetual();
27
+	if (!m_endpoint.stopped()) {
28
+		m_endpoint.stop();
29
+	}
30
+}
31
+
32
+bool CWebSocketServer::init(uint16_t port)
33
+{
34
+	m_port = port;
35
+	try
36
+	{
37
+		m_endpoint.listen(m_port);
38
+		// Queues a connection accept operation
39
+		m_endpoint.start_accept();
40
+	}
41
+	catch (const std::exception& e)
42
+	{
43
+		LOG_ERROR_S(e.what());
44
+		return false;
45
+	}
46
+	return true;
47
+}
48
+
49
+bool CWebSocketServer::sendMsg(websocketpp::connection_hdl hdl, string msg)
50
+{
51
+	try
52
+	{
53
+		websocketpp::frame::opcode::value op = websocketpp::frame::opcode::value::TEXT;
54
+		m_endpoint.send(hdl, msg, op);
55
+		LOG_INFO("消息发送到坐席成功,[%s]",msg.c_str());
56
+	}
57
+	catch (websocketpp::exception const & e) {
58
+		stringstream str;
59
+		str << "Echo failed because: "
60
+			<< "(" << e.what() << ")";
61
+		LOG_ERROR_S(str.str());
62
+		LOG_ERROR("消息发送到坐席失败,[%s]", msg.c_str());
63
+		return false;
64
+	}
65
+	
66
+	return true;
67
+}
68
+
69
+void CWebSocketServer::run()
70
+{
71
+	// Start the Asio io_service run loop
72
+	m_endpoint.run(); 
73
+}
74
+
75
+void CWebSocketServer::close(websocketpp::connection_hdl hdl)
76
+{
77
+	m_endpoint.close(hdl, websocketpp::close::status::normal, "123");
78
+}
79
+
80
+void CWebSocketServer::stop()
81
+{
82
+	if (!m_endpoint.stopped()) {
83
+		m_endpoint.stop();
84
+	}
85
+}
86
+
87
+// Define a callback to handle incoming messages
88
+void CWebSocketServer::on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg)
89
+{
90
+	string msgInfo;
91
+	msgInfo = msg->get_payload();
92
+	stringstream str;
93
+	str << "on_message called with hdl: " << hdl.lock().get()
94
+		<< " and message: " <<
95
+		msgInfo << s->get_con_from_hdl(hdl)->get_remote_endpoint();
96
+	LOG_DEBUG_S(str.str());
97
+	if (this->pRecvFun != nullptr)
98
+		this->pRecvFun(hdl, msgInfo);   // 收到消息回调函数
99
+}
100
+
101
+void CWebSocketServer::on_open(server* s, websocketpp::connection_hdl hdl) {
102
+	stringstream str;
103
+	str << "on_open called with hdl: " << hdl.lock().get()
104
+		<< s->get_con_from_hdl(hdl)->get_remote_endpoint();
105
+	LOG_DEBUG_S(str.str());
106
+}
107
+
108
+void CWebSocketServer::on_close(server* s, websocketpp::connection_hdl hdl) {
109
+	stringstream str;
110
+	str << "on_close called with hdl: " << hdl.lock().get()
111
+		<< s->get_con_from_hdl(hdl)->get_remote_endpoint();
112
+	LOG_DEBUG_S(str.str());
113
+	if (this->pCloseFun != nullptr)
114
+		this->pCloseFun(hdl);    // 连接断开回调函数
115
+}
116
+
117
+void CWebSocketServer::on_fail(server* s, websocketpp::connection_hdl hdl)
118
+{
119
+	stringstream str;
120
+	str << "on_fail called with hdl: " << hdl.lock().get()
121
+		<< s->get_con_from_hdl(hdl)->get_remote_endpoint();
122
+	LOG_DEBUG_S(str.str());
123
+}

+ 60 - 0
FreeSWITCH-linux/WebSocketServer - 副本.h

@@ -0,0 +1,60 @@
1
+#pragma once
2
+
3
+#include <websocketpp/config/asio_no_tls.hpp>
4
+#include <websocketpp/server.hpp>
5
+#include <functional>
6
+#include <iostream>
7
+#include <string>
8
+
9
+#include <unordered_map>
10
+#include <mutex>
11
+#include <regex>
12
+#include <json/json.h>
13
+
14
+using namespace std;
15
+
16
+typedef enum MyDirect
17
+{
18
+	UNKNOWN = 0,
19
+	FS = 1,
20
+	CTI = 2,
21
+	ACD = 3,
22
+	IVR = 4,
23
+	WS = 5
24
+}Direct;
25
+
26
+class CWebSocketServer
27
+{
28
+private:
29
+	typedef websocketpp::server<websocketpp::config::asio> server;
30
+	typedef server::message_ptr message_ptr;
31
+
32
+public:
33
+	CWebSocketServer();
34
+	~CWebSocketServer();
35
+
36
+	bool init(uint16_t port = 9002);
37
+	bool sendMsg(websocketpp::connection_hdl hdl, string msg);
38
+	void run();
39
+	void close(websocketpp::connection_hdl hdl);  // 关闭与指定客户端的连接
40
+	void stop();
41
+	typedef function<void(websocketpp::connection_hdl hdl, string msg)> Callback_RecvMsg;
42
+	typedef function<void(websocketpp::connection_hdl hdl)> Callback_Close;
43
+	void setCallbackRecvMsg(Callback_RecvMsg pRecvFun) { this->pRecvFun = pRecvFun; };
44
+	void setCallbackClose(Callback_Close pCloseFun) { this->pCloseFun = pCloseFun; };
45
+
46
+private:
47
+
48
+	void on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg);
49
+	void on_open(server* s, websocketpp::connection_hdl hdl);
50
+	void on_close(server* s, websocketpp::connection_hdl hdl);
51
+	void on_fail(server* s, websocketpp::connection_hdl hdl);
52
+
53
+private:
54
+	server m_endpoint;
55
+	uint16_t m_port;      // 端口
56
+
57
+	Callback_RecvMsg pRecvFun;   // 接收消息回调函数
58
+	Callback_Close pCloseFun;    // 连接断开回调函数
59
+};
60
+

+ 76 - 31
FreeSWITCH-linux/WebSocketServer.cpp

@@ -2,30 +2,44 @@
2 2
 #include "Log.h"
3 3
 #include <json/json.h>
4 4
 
5
-CWebSocketServer::CWebSocketServer() 
5
+CWebSocketServer::CWebSocketServer()
6 6
 {
7
-	// Set logging settings
8
-	/*m_endpoint.set_error_channels(websocketpp::log::elevel::all);*/
9
-	/*m_endpoint.set_access_channels(websocketpp::log::alevel::all ^ websocketpp::log::alevel::frame_payload);*/
10
-	m_endpoint.set_access_channels(websocketpp::log::alevel::none ^ websocketpp::log::alevel::none);
11
-
12
-	// Register our message handler
13
-
14
-	m_endpoint.set_message_handler(bind(&CWebSocketServer::on_message, this, &m_endpoint, std::placeholders::_1, std::placeholders::_2));
15
-	m_endpoint.set_open_handler(bind(&CWebSocketServer::on_open, this, &m_endpoint, std::placeholders::_1));
16
-	m_endpoint.set_close_handler(bind(&CWebSocketServer::on_close, this, &m_endpoint, std::placeholders::_1));
17
-	m_endpoint.set_fail_handler(bind(&CWebSocketServer::on_fail, this, &m_endpoint, std::placeholders::_1));
18
-	m_endpoint.init_asio();
19
-
20
-	m_endpoint.set_reuse_addr(true);
21
-	m_endpoint.start_perpetual();
7
+	if (CConfig::GetInstance()->isWss()) {
8
+		m_endpoint_tls.set_access_channels(websocketpp::log::alevel::none ^ websocketpp::log::alevel::none);
9
+		m_endpoint_tls.set_message_handler(bind(&CWebSocketServer::on_message<server>, this, &m_endpoint, std::placeholders::_1, std::placeholders::_2));
10
+		m_endpoint_tls.set_open_handler(bind(&CWebSocketServer::on_open<server>, this, &m_endpoint, std::placeholders::_1));
11
+		m_endpoint_tls.set_close_handler(bind(&CWebSocketServer::on_close<server>, this, &m_endpoint, std::placeholders::_1));
12
+		m_endpoint_tls.set_fail_handler(bind(&CWebSocketServer::on_fail<server>, this, &m_endpoint, std::placeholders::_1));
13
+		m_endpoint_tls.set_tls_init_handler(bind(&CWebSocketServer::on_tls_init, this, std::placeholders::_1));
14
+		m_endpoint_tls.init_asio();
15
+		m_endpoint_tls.set_reuse_addr(true);
16
+		m_endpoint_tls.start_perpetual();
17
+	}
18
+	else {
19
+		m_endpoint.set_access_channels(websocketpp::log::alevel::none ^ websocketpp::log::alevel::none);
20
+		m_endpoint.set_message_handler(bind(&CWebSocketServer::on_message<server>, this, &m_endpoint, std::placeholders::_1, std::placeholders::_2));
21
+		m_endpoint.set_open_handler(bind(&CWebSocketServer::on_open<server>, this, &m_endpoint, std::placeholders::_1));
22
+		m_endpoint.set_close_handler(bind(&CWebSocketServer::on_close<server>, this, &m_endpoint, std::placeholders::_1));
23
+		m_endpoint.set_fail_handler(bind(&CWebSocketServer::on_fail<server>, this, &m_endpoint, std::placeholders::_1));
24
+		m_endpoint.init_asio();
25
+		m_endpoint.set_reuse_addr(true);
26
+		m_endpoint.start_perpetual();
27
+	}
22 28
 }
23 29
 
24 30
 CWebSocketServer::~CWebSocketServer()
25 31
 {
26
-	m_endpoint.stop_perpetual();
27
-	if (!m_endpoint.stopped()) {
28
-		m_endpoint.stop();
32
+	if (CConfig::GetInstance()->isWss()) {
33
+		m_endpoint_tls.stop_perpetual();
34
+		if (!m_endpoint_tls.stopped()) {
35
+			m_endpoint_tls.stop();
36
+		}
37
+	}
38
+	else {
39
+		m_endpoint.stop_perpetual();
40
+		if (!m_endpoint.stopped()) {
41
+			m_endpoint.stop();
42
+		}
29 43
 	}
30 44
 }
31 45
 
@@ -34,9 +48,14 @@ bool CWebSocketServer::init(uint16_t port)
34 48
 	m_port = port;
35 49
 	try
36 50
 	{
37
-		m_endpoint.listen(m_port);
38
-		// Queues a connection accept operation
39
-		m_endpoint.start_accept();
51
+		if (CConfig::GetInstance()->isWss()) {
52
+			m_endpoint_tls.listen(m_port);
53
+			m_endpoint_tls.start_accept();
54
+		}
55
+		else {
56
+			m_endpoint.listen(m_port);
57
+			m_endpoint.start_accept();
58
+		}
40 59
 	}
41 60
 	catch (const std::exception& e)
42 61
 	{
@@ -51,7 +70,12 @@ bool CWebSocketServer::sendMsg(websocketpp::connection_hdl hdl, string msg)
51 70
 	try
52 71
 	{
53 72
 		websocketpp::frame::opcode::value op = websocketpp::frame::opcode::value::TEXT;
54
-		m_endpoint.send(hdl, msg, op);
73
+		if (CConfig::GetInstance()->isWss()) {
74
+			m_endpoint_tls.send(hdl, msg, op);
75
+		}
76
+		else {
77
+			m_endpoint.send(hdl, msg, op);
78
+		}
55 79
 		LOG_INFO("消息发送到坐席成功,[%s]",msg.c_str());
56 80
 	}
57 81
 	catch (websocketpp::exception const & e) {
@@ -69,23 +93,41 @@ bool CWebSocketServer::sendMsg(websocketpp::connection_hdl hdl, string msg)
69 93
 void CWebSocketServer::run()
70 94
 {
71 95
 	// Start the Asio io_service run loop
72
-	m_endpoint.run(); 
96
+	if (CConfig::GetInstance()->isWss()) {
97
+		m_endpoint_tls.run();
98
+	}
99
+	else {
100
+		m_endpoint.run();
101
+	}
73 102
 }
74 103
 
75 104
 void CWebSocketServer::close(websocketpp::connection_hdl hdl)
76 105
 {
77
-	m_endpoint.close(hdl, websocketpp::close::status::normal, "123");
106
+	if (CConfig::GetInstance()->isWss()) {
107
+		m_endpoint_tls.close(hdl, websocketpp::close::status::normal, "Normal");
108
+	}
109
+	else {
110
+		m_endpoint.close(hdl, websocketpp::close::status::normal, "Normal");
111
+	}
78 112
 }
79 113
 
80 114
 void CWebSocketServer::stop()
81 115
 {
82
-	if (!m_endpoint.stopped()) {
83
-		m_endpoint.stop();
116
+	if (CConfig::GetInstance()->isWss()) {
117
+		if (!m_endpoint_tls.stopped()) {
118
+			m_endpoint_tls.stop();
119
+		}
120
+	}
121
+	else {
122
+		if (!m_endpoint.stopped()) {
123
+			m_endpoint.stop();
124
+		}
84 125
 	}
85 126
 }
86 127
 
87 128
 // Define a callback to handle incoming messages
88
-void CWebSocketServer::on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg)
129
+template <typename EndpointType>
130
+void CWebSocketServer::on_message(EndpointType* s, websocketpp::connection_hdl hdl, typename EndpointType::message_ptr msg)
89 131
 {
90 132
 	string msgInfo;
91 133
 	msgInfo = msg->get_payload();
@@ -98,14 +140,16 @@ void CWebSocketServer::on_message(server* s, websocketpp::connection_hdl hdl, me
98 140
 		this->pRecvFun(hdl, msgInfo);   // 收到消息回调函数
99 141
 }
100 142
 
101
-void CWebSocketServer::on_open(server* s, websocketpp::connection_hdl hdl) {
143
+template <typename EndpointType>
144
+void CWebSocketServer::on_open(EndpointType* s, websocketpp::connection_hdl hdl) {
102 145
 	stringstream str;
103 146
 	str << "on_open called with hdl: " << hdl.lock().get()
104 147
 		<< s->get_con_from_hdl(hdl)->get_remote_endpoint();
105 148
 	LOG_DEBUG_S(str.str());
106 149
 }
107 150
 
108
-void CWebSocketServer::on_close(server* s, websocketpp::connection_hdl hdl) {
151
+template <typename EndpointType>
152
+void CWebSocketServer::on_close(EndpointType* s, websocketpp::connection_hdl hdl) {
109 153
 	stringstream str;
110 154
 	str << "on_close called with hdl: " << hdl.lock().get()
111 155
 		<< s->get_con_from_hdl(hdl)->get_remote_endpoint();
@@ -114,7 +158,8 @@ void CWebSocketServer::on_close(server* s, websocketpp::connection_hdl hdl) {
114 158
 		this->pCloseFun(hdl);    // 连接断开回调函数
115 159
 }
116 160
 
117
-void CWebSocketServer::on_fail(server* s, websocketpp::connection_hdl hdl)
161
+template <typename EndpointType>
162
+void CWebSocketServer::on_fail(EndpointType* s, websocketpp::connection_hdl hdl)
118 163
 {
119 164
 	stringstream str;
120 165
 	str << "on_fail called with hdl: " << hdl.lock().get()

+ 33 - 16
FreeSWITCH-linux/WebSocketServer.h

@@ -1,6 +1,6 @@
1 1
 #pragma once
2 2
 
3
-#include <websocketpp/config/asio_no_tls.hpp>
3
+#include <websocketpp/config/asio.hpp>
4 4
 #include <websocketpp/server.hpp>
5 5
 #include <functional>
6 6
 #include <iostream>
@@ -10,24 +10,17 @@
10 10
 #include <mutex>
11 11
 #include <regex>
12 12
 #include <json/json.h>
13
+#include "Config.h"
13 14
 
14 15
 using namespace std;
15 16
 
16
-typedef enum MyDirect
17
-{
18
-	UNKNOWN = 0,
19
-	FS = 1,
20
-	CTI = 2,
21
-	ACD = 3,
22
-	IVR = 4,
23
-	WS = 5
24
-}Direct;
25
-
26 17
 class CWebSocketServer
27 18
 {
28 19
 private:
20
+	
29 21
 	typedef websocketpp::server<websocketpp::config::asio> server;
30
-	typedef server::message_ptr message_ptr;
22
+	typedef websocketpp::server<websocketpp::config::asio_tls> server_tls;
23
+	typedef websocketpp::lib::shared_ptr<boost::asio::ssl::context> context_ptr;
31 24
 
32 25
 public:
33 26
 	CWebSocketServer();
@@ -44,14 +37,38 @@ public:
44 37
 	void setCallbackClose(Callback_Close pCloseFun) { this->pCloseFun = pCloseFun; };
45 38
 
46 39
 private:
40
+	template <typename EndpointType>
41
+	void on_message(EndpointType* s, websocketpp::connection_hdl hdl, typename EndpointType::message_ptr msg);
42
+	template <typename EndpointType>
43
+	void on_open(EndpointType* s, websocketpp::connection_hdl hdl) ;
44
+	template <typename EndpointType>
45
+	void on_close(EndpointType* s, websocketpp::connection_hdl hdl);
46
+	template <typename EndpointType>
47
+	void on_fail(EndpointType* s, websocketpp::connection_hdl hdl);
47 48
 
48
-	void on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg);
49
-	void on_open(server* s, websocketpp::connection_hdl hdl);
50
-	void on_close(server* s, websocketpp::connection_hdl hdl);
51
-	void on_fail(server* s, websocketpp::connection_hdl hdl);
49
+	context_ptr on_tls_init(websocketpp::connection_hdl hdl) {
50
+		std::cout << "on_tls_init called with hdl: " << hdl.lock().get() << std::endl;
51
+		context_ptr ctx = websocketpp::lib::make_shared<boost::asio::ssl::context>(boost::asio::ssl::context::tlsv13_server);
52
+		try {
53
+			ctx->set_options(boost::asio::ssl::context::default_workarounds |
54
+				boost::asio::ssl::context::no_sslv2 |
55
+				boost::asio::ssl::context::no_sslv3 |
56
+				boost::asio::ssl::context::no_tlsv1 |
57
+				boost::asio::ssl::context::single_dh_use);
58
+			ctx->use_certificate_file("server.crt", boost::asio::ssl::context::pem); // "server.crt"
59
+			ctx->use_private_key_file("server.crt", boost::asio::ssl::context::pem);  // "server.key"
60
+		}
61
+		catch (std::exception& e) {
62
+			char str[1024];
63
+			snprintf(str, 1024, "[%s :%d][ %s]", __FUNCTION__, __LINE__, e.what());
64
+			std::cout << str << std::endl;
65
+		}
66
+		return ctx;
67
+	}
52 68
 
53 69
 private:
54 70
 	server m_endpoint;
71
+	server_tls m_endpoint_tls;
55 72
 	uint16_t m_port;      // 端口
56 73
 
57 74
 	Callback_RecvMsg pRecvFun;   // 接收消息回调函数

BIN
FreeSWITCH-linux/bin/x64/Release/middleware


Разница между файлами не показана из-за своего большого размера
+ 17 - 9
FreeSWITCH-linux/obj/x64/Release/1149391537.CompileUpToDateFile.tlog


+ 17 - 9
FreeSWITCH-linux/obj/x64/Release/1149391537.CopySourcesUpToDateFile.tlog

@@ -1,16 +1,17 @@
1
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.cpp|638382332410785639|~/projects/FreeSWITCH-linux|
1
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.cpp|638410849006740925|~/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|638381656275151342|~/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|638399591786298776|~/projects/FreeSWITCH-linux|
6
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.cpp|638411714408988430|~/projects/FreeSWITCH-linux|
7
+G:\git\Middlewares-Linux\FreeSWITCH-linux\DepttelextOffice.cpp|638412824704159927|~/projects/FreeSWITCH-linux|
7 8
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JsonStringMaker.cpp|637896099232215431|~/projects/FreeSWITCH-linux|
8 9
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpAutoCall.cpp|637896099232235381|~/projects/FreeSWITCH-linux|
9 10
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpForceAgentState.cpp|637896099232235381|~/projects/FreeSWITCH-linux|
10 11
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHangup.cpp|637896099232245354|~/projects/FreeSWITCH-linux|
11 12
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHoldon.cpp|637896099232255325|~/projects/FreeSWITCH-linux|
12 13
 G:\git\Middlewares-Linux\FreeSWITCH-linux\EslGateway.cpp|638218437376967127|~/projects/FreeSWITCH-linux|
13
-G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.cpp|638400449303370548|~/projects/FreeSWITCH-linux|
14
+G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.cpp|638411690436030254|~/projects/FreeSWITCH-linux|
14 15
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanTrunk.cpp|637896099232145619|~/projects/FreeSWITCH-linux|
15 16
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JdbcHelper.cpp|637896099232205458|~/projects/FreeSWITCH-linux|
16 17
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Log.cpp|637896099232215431|~/projects/FreeSWITCH-linux|
@@ -30,22 +31,26 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpMyd.cpp|637896099232285247|~/project
30 31
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpRecord.cpp|637920930843653676|~/projects/FreeSWITCH-linux|
31 32
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpSendDtmf.cpp|638223397880165293|~/projects/FreeSWITCH-linux|
32 33
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpTransfer.cpp|638381656307903616|~/projects/FreeSWITCH-linux|
33
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.cpp|638398979641674785|~/projects/FreeSWITCH-linux|
34
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Session.cpp|638411664847316761|~/projects/FreeSWITCH-linux|
34 35
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SoftAuth.cpp|637896160351710859|~/projects/FreeSWITCH-linux|
35 36
 G:\git\Middlewares-Linux\FreeSWITCH-linux\SqlWrite.cpp|637896099232335119|~/projects/FreeSWITCH-linux|
36 37
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TimeScheduler.cpp|637896099232335119|~/projects/FreeSWITCH-linux|
37 38
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TokenList.cpp|638400474677115478|~/projects/FreeSWITCH-linux|
38 39
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TtsBaidu.cpp|638382420351585953|~/projects/FreeSWITCH-linux|
39 40
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Util.cpp|637896099232345089|~/projects/FreeSWITCH-linux|
41
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExten.cpp|638409371328568295|~/projects/FreeSWITCH-linux|
42
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExtenHdl.cpp|638410989456407634|~/projects/FreeSWITCH-linux|
43
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoOffice.cpp|638412821590723920|~/projects/FreeSWITCH-linux|
40 44
 G:\git\Middlewares-Linux\FreeSWITCH-linux\VirtualChan.cpp|637920964767764556|~/projects/FreeSWITCH-linux|
41
-G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.cpp|638398762958484059|~/projects/FreeSWITCH-linux|
42
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.h|638215748197194972|~/projects/FreeSWITCH-linux|
45
+G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.cpp|638411794538810813|~/projects/FreeSWITCH-linux|
46
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.h|638410830352582766|~/projects/FreeSWITCH-linux|
43 47
 G:\git\Middlewares-Linux\FreeSWITCH-linux\AgentDetail.h|638205475044108214|~/projects/FreeSWITCH-linux|
44 48
 G:\git\Middlewares-Linux\FreeSWITCH-linux\AutoCall.h|637896099232125673|~/projects/FreeSWITCH-linux|
45 49
 G:\git\Middlewares-Linux\FreeSWITCH-linux\CalllDetaillnc.h|637896099232135650|~/projects/FreeSWITCH-linux|
46 50
 G:\git\Middlewares-Linux\FreeSWITCH-linux\CallStringMaker.h|637896099232135650|~/projects/FreeSWITCH-linux|
47 51
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanExten.h|637896099232145619|~/projects/FreeSWITCH-linux|
48
-G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.h|638399591585432459|~/projects/FreeSWITCH-linux|
52
+G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.h|638411714059473498|~/projects/FreeSWITCH-linux|
53
+G:\git\Middlewares-Linux\FreeSWITCH-linux\DepttelextOffice.h|638410227868797627|~/projects/FreeSWITCH-linux|
49 54
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ICdr.h|637896099232205458|~/projects/FreeSWITCH-linux|
50 55
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JsonStringMaker.h|637896099232215431|~/projects/FreeSWITCH-linux|
51 56
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpAutoCall.h|637896099232235381|~/projects/FreeSWITCH-linux|
@@ -55,7 +60,7 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\OpHoldon.h|637896099232255325|~/projec
55 60
 G:\git\Middlewares-Linux\FreeSWITCH-linux\DevInfoInc.h|638398966841084583|~/projects/FreeSWITCH-linux|
56 61
 G:\git\Middlewares-Linux\FreeSWITCH-linux\EslGateway.h|638192505089056425|~/projects/FreeSWITCH-linux|
57 62
 G:\git\Middlewares-Linux\FreeSWITCH-linux\FsLinkInc.h|637896099232185522|~/projects/FreeSWITCH-linux|
58
-G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.h|638399617411892117|~/projects/FreeSWITCH-linux|
63
+G:\git\Middlewares-Linux\FreeSWITCH-linux\FsProxy.h|638410242930221943|~/projects/FreeSWITCH-linux|
59 64
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanTrunk.h|637896099232155594|~/projects/FreeSWITCH-linux|
60 65
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ITimer.h|637896099232205458|~/projects/FreeSWITCH-linux|
61 66
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JdbcHelper.h|637896099232215431|~/projects/FreeSWITCH-linux|
@@ -94,7 +99,10 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\ocr.h|637896099233422205|~/proj
94 99
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\speech.h|637896099233422205|~/projects/FreeSWITCH-linux|
95 100
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TtsBaidu.h|637896099232345089|~/projects/FreeSWITCH-linux|
96 101
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Util.h|637896099232345089|~/projects/FreeSWITCH-linux|
102
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExten.h|638410846849221261|~/projects/FreeSWITCH-linux|
103
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExtenHdl.h|638410885286258034|~/projects/FreeSWITCH-linux|
104
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoOffice.h|638409372699760257|~/projects/FreeSWITCH-linux|
97 105
 G:\git\Middlewares-Linux\FreeSWITCH-linux\VirtualChan.h|637920937052225722|~/projects/FreeSWITCH-linux|
98
-G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.h|638398763100301030|~/projects/FreeSWITCH-linux|
106
+G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.h|638411794868715952|~/projects/FreeSWITCH-linux|
99 107
 G:\git\Middlewares-Linux\FreeSWITCH-linux\log4cpp.conf|637896204483512822|~/projects/FreeSWITCH-linux|
100 108
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\README.md|637896099233392290|~/projects/FreeSWITCH-linux|

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
FreeSWITCH-linux/obj/x64/Release/1149391537.LinkUpToDateFile.tlog


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

@@ -6,6 +6,7 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\AutoCall.cpp|/root/projects/FreeSWITCH
6 6
 G:\git\Middlewares-Linux\FreeSWITCH-linux\CallStringMaker.cpp|/root/projects/FreeSWITCH-linux/CallStringMaker.cpp
7 7
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanExten.cpp|/root/projects/FreeSWITCH-linux/ChanExten.cpp
8 8
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.cpp|/root/projects/FreeSWITCH-linux/Config.cpp
9
+G:\git\Middlewares-Linux\FreeSWITCH-linux\DepttelextOffice.cpp|/root/projects/FreeSWITCH-linux/DepttelextOffice.cpp
9 10
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JsonStringMaker.cpp|/root/projects/FreeSWITCH-linux/JsonStringMaker.cpp
10 11
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpAutoCall.cpp|/root/projects/FreeSWITCH-linux/OpAutoCall.cpp
11 12
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpForceAgentState.cpp|/root/projects/FreeSWITCH-linux/OpForceAgentState.cpp
@@ -39,6 +40,9 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\TimeScheduler.cpp|/root/projects/FreeS
39 40
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TokenList.cpp|/root/projects/FreeSWITCH-linux/TokenList.cpp
40 41
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TtsBaidu.cpp|/root/projects/FreeSWITCH-linux/TtsBaidu.cpp
41 42
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Util.cpp|/root/projects/FreeSWITCH-linux/Util.cpp
43
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExten.cpp|/root/projects/FreeSWITCH-linux/VideoExten.cpp
44
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExtenHdl.cpp|/root/projects/FreeSWITCH-linux/VideoExtenHdl.cpp
45
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoOffice.cpp|/root/projects/FreeSWITCH-linux/VideoOffice.cpp
42 46
 G:\git\Middlewares-Linux\FreeSWITCH-linux\VirtualChan.cpp|/root/projects/FreeSWITCH-linux/VirtualChan.cpp
43 47
 G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.cpp|/root/projects/FreeSWITCH-linux/WebSocketServer.cpp
44 48
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Agent.h|/root/projects/FreeSWITCH-linux/Agent.h
@@ -48,6 +52,7 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\CalllDetaillnc.h|/root/projects/FreeSW
48 52
 G:\git\Middlewares-Linux\FreeSWITCH-linux\CallStringMaker.h|/root/projects/FreeSWITCH-linux/CallStringMaker.h
49 53
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ChanExten.h|/root/projects/FreeSWITCH-linux/ChanExten.h
50 54
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Config.h|/root/projects/FreeSWITCH-linux/Config.h
55
+G:\git\Middlewares-Linux\FreeSWITCH-linux\DepttelextOffice.h|/root/projects/FreeSWITCH-linux/DepttelextOffice.h
51 56
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ICdr.h|/root/projects/FreeSWITCH-linux/ICdr.h
52 57
 G:\git\Middlewares-Linux\FreeSWITCH-linux\JsonStringMaker.h|/root/projects/FreeSWITCH-linux/JsonStringMaker.h
53 58
 G:\git\Middlewares-Linux\FreeSWITCH-linux\OpAutoCall.h|/root/projects/FreeSWITCH-linux/OpAutoCall.h
@@ -100,6 +105,9 @@ G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\ocr.h|/root/projects/FreeSWITCH
100 105
 G:\git\Middlewares-Linux\FreeSWITCH-linux\ttsapi\speech.h|/root/projects/FreeSWITCH-linux/ttsapi/speech.h
101 106
 G:\git\Middlewares-Linux\FreeSWITCH-linux\TtsBaidu.h|/root/projects/FreeSWITCH-linux/TtsBaidu.h
102 107
 G:\git\Middlewares-Linux\FreeSWITCH-linux\Util.h|/root/projects/FreeSWITCH-linux/Util.h
108
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExten.h|/root/projects/FreeSWITCH-linux/VideoExten.h
109
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoExtenHdl.h|/root/projects/FreeSWITCH-linux/VideoExtenHdl.h
110
+G:\git\Middlewares-Linux\FreeSWITCH-linux\VideoOffice.h|/root/projects/FreeSWITCH-linux/VideoOffice.h
103 111
 G:\git\Middlewares-Linux\FreeSWITCH-linux\VirtualChan.h|/root/projects/FreeSWITCH-linux/VirtualChan.h
104 112
 G:\git\Middlewares-Linux\FreeSWITCH-linux\WebSocketServer.h|/root/projects/FreeSWITCH-linux/WebSocketServer.h
105 113
 G:\git\Middlewares-Linux\FreeSWITCH-linux\log4cpp.conf|/root/projects/FreeSWITCH-linux/log4cpp.conf

+ 1 - 2
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.log

@@ -3,7 +3,6 @@
3 3
   Validating architecture
4 4
   Starting remote build
5 5
   Compiling sources:
6
-  TokenList.cpp
7
-G:\git\Middlewares-Linux\FreeSWITCH-linux\TokenList.cpp(72,82): warning : conversion to ‘int’ from ‘std::__cxx11::basic_string<char>::size_type {aka long unsigned int}’ may alter its value [-Wconversion]
6
+  DepttelextOffice.cpp
8 7
   Linking objects
9 8
   FreeSWITCH-linux.vcxproj -> G:\git\Middlewares-Linux\FreeSWITCH-linux\bin\x64\Release\middleware

BIN
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/compile.read.1.tlog


BIN
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/compile.write.1.tlog


BIN
FreeSWITCH-linux/obj/x64/Release/FreeSWITCH-linux.tlog/link.write.1.tlog