Ver Código Fonte

软电话修改

miaofuhao 6 anos atrás
pai
commit
24cba43c6f

+ 1 - 0
CallCenterWeb.UI/callScreen/callScreen.html

988
 		<script src="../js/comboSelect/jquery.combo.select.js"></script>
988
 		<script src="../js/comboSelect/jquery.combo.select.js"></script>
989
 		<script src="./../js/main.js?v=1.5"></script>
989
 		<script src="./../js/main.js?v=1.5"></script>
990
 		<script src="call.js"></script>
990
 		<script src="call.js"></script>
991
+		
991
 	</body>
992
 	</body>
992
 
993
 
993
 </html>
994
 </html>

+ 6 - 4
CallCenterWeb.UI/index.html

545
                         <button class="btnn" id="rotateLeft" type="button">左旋转</button>
545
                         <button class="btnn" id="rotateLeft" type="button">左旋转</button>
546
                         <button class="btnn" id="rotateRight" type="button">右旋转</button>
546
                         <button class="btnn" id="rotateRight" type="button">右旋转</button>
547
                         <button class="btnn" id="setDrag" type="button">确定保存</button>
547
                         <button class="btnn" id="setDrag" type="button">确定保存</button>
548
-
549
                     </div>
548
                     </div>
550
                 </div>
549
                 </div>
551
             </div>
550
             </div>
594
         </div>
593
         </div>
595
         <div class="phone_btn_bot">
594
         <div class="phone_btn_bot">
596
     		<div class="posbtn1 testCall" onclick="testCall()"><img src="img/call_out-icon.png"/></div>
595
     		<div class="posbtn1 testCall" onclick="testCall()"><img src="img/call_out-icon.png"/></div>
597
-    		<div class="posbtn2 phoneNum_clear">清除</div>
598
-    		<div class="posbtn3 hangup" onclick="hangup()"><img src="img/hangu-iconp.png"/></div>
596
+    		
597
+    		<div class="posbtn2 phoneNum_clear" style="left: 45%;">清除</div>
598
+    		<div class="posbtn3 testCall" style="right: 24%;" onclick="inCall()"><img src="img/call_out-icon.png"/></div>
599
+    		<div class="posbtn3 hangup" style="right: 7%;" onclick="hangup()"><img src="img/hangu-iconp.png"/></div>
599
     	</div>
600
     	</div>
600
     </div>
601
     </div>
602
+    <video id="videoView" hidden="hidden" width="420px" height="320px" autoplay></video>
601
     <div class="stringData"></div>
603
     <div class="stringData"></div>
602
     <div class="stringData1"></div>
604
     <div class="stringData1"></div>
603
-     <div class="stringData2"></div>
605
+    <div class="stringData2"></div>
604
     <script src="./js/plugins/pace/pace.min.js"></script>
606
     <script src="./js/plugins/pace/pace.min.js"></script>
605
     <script src="./js/plugins/iCheck/icheck.min.js"></script>
607
     <script src="./js/plugins/iCheck/icheck.min.js"></script>
606
     <script src="./css/laydate/laydate.js"></script>
608
     <script src="./css/laydate/laydate.js"></script>

+ 4 - 4
CallCenterWeb.UI/js/index.js

977
     	$(".softphone-box").css("display","none");
977
     	$(".softphone-box").css("display","none");
978
     	$(".softphone-box").removeClass("active fadeInRight animated");
978
     	$(".softphone-box").removeClass("active fadeInRight animated");
979
     }else{
979
     }else{
980
-    	testStart();
981
-		setTimeout(function () {
982
-			reg();
983
-		}, 2000)
980
+//  	testStart();
981
+//		setTimeout(function () {
982
+//			reg();
983
+//		}, 2000)
984
     	$(".td-call").hide();
984
     	$(".td-call").hide();
985
     	$(".tooltip_text").text("分机号:"+$.cookie("extno"))
985
     	$(".tooltip_text").text("分机号:"+$.cookie("extno"))
986
 		$(".softphone-box").css("display","block");
986
 		$(".softphone-box").css("display","block");

+ 7 - 1
CallCenterWeb.UI/js/main.js

282
 	if(window.frames['iframe'+ hidCallID +'']){
282
 	if(window.frames['iframe'+ hidCallID +'']){
283
 		 window.frames['iframe'+ hidCallID +''].$(".td-call").hide();
283
 		 window.frames['iframe'+ hidCallID +''].$(".td-call").hide();
284
 	}
284
 	}
285
-
285
+	$(".tooltip_text").text("通话结束...");
286
+//	timeStrart=true;
287
+//	timeReg=true;
288
+//	testStart();
289
+//	setTimeout(function () {
290
+//		reg();
291
+//	}, 2000)
286
 
292
 
287
 }
293
 }
288
 //线路状态通知
294
 //线路状态通知

+ 42 - 32
CallCenterWeb.UI/js/softphone.js

98
  		});
98
  		});
99
  		data.session.on('confirmed', function(data) {
99
  		data.session.on('confirmed', function(data) {
100
  			$(".tooltip_text").text("通话中...") //呼入建立
100
  			$(".tooltip_text").text("通话中...") //呼入建立
101
+ 			$(".hwzt").text('通话中');
101
  			thjsTel=true;
102
  			thjsTel=true;
102
  			calling();
103
  			calling();
103
 // 			if(stringHr_1){
104
 // 			if(stringHr_1){
159
  		debugger
160
  		debugger
160
  		$(".tooltip_text").text("通话结束...");
161
  		$(".tooltip_text").text("通话结束...");
161
  		clearInter();
162
  		clearInter();
162
- 		//layer.msg('呼叫结束', e); //对方挂机,通话结束
163
+// 		timeStrart=true;
164
+// 		timeReg=true;
165
+// 		testStart();
166
+//		setTimeout(function () {
167
+//			reg();
168
+//		}, 2000)
169
+ 		
163
  	},
170
  	},
164
  	'confirmed': function(e) {
171
  	'confirmed': function(e) {
165
  		$(".tooltip_text").text("呼叫建立...");
172
  		$(".tooltip_text").text("呼叫建立...");
166
  		//layer.msg('呼叫建立');
173
  		//layer.msg('呼叫建立');
167
  	}
174
  	}
168
  };
175
  };
169
-
170
- function testCall() {
171
- 	//呼入接听
176
+function inCall () {
172
 	if (incomingSession) {
177
 	if (incomingSession) {
173
 		incomingSession.answer({
178
 		incomingSession.answer({
174
 			'mediaConstraints': {
179
 			'mediaConstraints': {
182
 			'mediaStream': localStream
187
 			'mediaStream': localStream
183
 		});
188
 		});
184
 		incomingSession = null;
189
 		incomingSession = null;
185
-	}else{
186
-//		外呼拨打
187
-		var sip_phone_number_ = document.getElementById("sip_phone_number").value.toString();
188
-	 	var options = {
189
-	 		'eventHandlers': eventHandlers,
190
-	 		'mediaConstraints': {
191
-	 			'audio': true,
192
-	 			'video': false,
193
-	 			mandatory: {
194
-	 				maxWidth: 640,
195
-	 				maxHeight: 360
196
-	 			}
197
-	 		},
198
-	 		'mediaStream': localStream
199
-	 	};
200
-	 	outgoingSession = userAgent.call(sip_phone_number_, options);
201
-	 	
202
-	 	var p = '<a  style="background: #24c792; color: #FFFFFF;" href="javascript:;" class="active J_menuTab" data-id="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'">外呼弹屏<i class="fa fa-times-circle"></i></a>';
203
-		$(".J_menuTab").removeClass("active");
204
-		var nif = '<iframe class="J_iframe J_iframeNew" name="iframe"  width="100%" height="100%" src="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'"></iframe>';
205
-		$(".J_mainContent").find("iframe.J_iframe").hide().parents(".J_mainContent").append(nif);
206
-		$(".J_menuTabs .page-tabs-content").append(p);
207
 	}
190
 	}
208
 	
191
 	
192
+}	
193
+ function testCall() {
194
+//		外呼拨打
195
+	var sip_phone_number_ = document.getElementById("sip_phone_number").value.toString();
196
+ 	var options = {
197
+ 		'eventHandlers': eventHandlers,
198
+ 		'mediaConstraints': {
199
+ 			'audio': true,
200
+ 			'video': false,
201
+ 			mandatory: {
202
+ 				maxWidth: 640,
203
+ 				maxHeight: 360
204
+ 			}
205
+ 		},
206
+ 		'mediaStream': localStream
207
+ 	};
208
+ 	outgoingSession = userAgent.call(sip_phone_number_, options);
209
+ 	
210
+ 	var p = '<a  style="background: #24c792; color: #FFFFFF;" href="javascript:;" class="active J_menuTab" data-id="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'">外呼弹屏<i class="fa fa-times-circle"></i></a>';
211
+	$(".J_menuTab").removeClass("active");
212
+	var nif = '<iframe class="J_iframe J_iframeNew" name="iframe"  width="100%" height="100%" src="./callScreen/OutCallScreen.html?Number=' + sip_phone_number_+'"></iframe>';
213
+	$(".J_mainContent").find("iframe.J_iframe").hide().parents(".J_mainContent").append(nif);
214
+	$(".J_menuTabs .page-tabs-content").append(p);
215
+	
209
  }
216
  }
210
 
217
 
211
  function reg() {
218
  function reg() {
222
  	setInterval(function() {
229
  	setInterval(function() {
223
  		timeStrart=true;
230
  		timeStrart=true;
224
  		timeReg=true;
231
  		timeReg=true;
225
- 		testStart();
226
-		setTimeout(function () {
227
-			reg();
228
-		}, 2000)
229
-	}, 1000*30);
232
+ 		//testStart();
233
+ 		reg();
234
+//		setTimeout(function () {
235
+//			reg();
236
+//		}, 2000)
237
+	}, 1000*60);
230
  }
238
  }
231
 	
239
 	
232
 
240
 
239
 
247
 
240
  function hangup() {
248
  function hangup() {
241
  	debugger
249
  	debugger
242
- 	clearInter();
250
+ 	//clearInter();
243
  	//window.frames[1].clearInter();
251
  	//window.frames[1].clearInter();
244
  	$(".tooltip_text").text("挂断...");
252
  	$(".tooltip_text").text("挂断...");
245
  	//console.log('hangup----------->');
253
  	//console.log('hangup----------->');
254
+ 	obj.Type = "DropCall";
255
+ 	Send();
246
  	userAgent.terminateSessions();
256
  	userAgent.terminateSessions();
247
  }
257
  }
248
  
258
  

+ 1 - 0
CallCenterWeb.UI/login.html

7
     <meta name="keywords">
7
     <meta name="keywords">
8
     <meta name="description">
8
     <meta name="description">
9
     <meta name="renderer" content="webkit|ie-comp|ie-stand" />
9
     <meta name="renderer" content="webkit|ie-comp|ie-stand" />
10
+    <meta name="format-detection" content="telephone=no">
10
     <link rel="shortcut icon" href="img/32.ico" />
11
     <link rel="shortcut icon" href="img/32.ico" />
11
     <script src="Script/Common/huayi.load.js"></script>
12
     <script src="Script/Common/huayi.load.js"></script>
12
     <script src="Script/Common/huayi.config.js"></script>
13
     <script src="Script/Common/huayi.config.js"></script>