From d3c60e18b95b50751f8088fa2d23cd8ff7f173bc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 01 七月 2026 11:05:17 +0800
Subject: [PATCH] 测试完成
---
src/utils/sipService.js | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/src/utils/sipService.js b/src/utils/sipService.js
index 5641a20..7d952c6 100644
--- a/src/utils/sipService.js
+++ b/src/utils/sipService.js
@@ -11,7 +11,7 @@
wsUrl: "wss://10.10.0.220:7443",
domain: "10.10.0.220",
},
- 绗竴浜烘皯鍖婚櫌婀栨花闄㈠尯: {
+ 绗竴浜烘皯鍖婚櫌婀栨花闄㈠尯: {
wsUrl: "wss://192.169.129.198:7443",
domain: "192.169.129.198",
},
@@ -35,6 +35,7 @@
this.isRegistered = false; // 鏂板娉ㄥ唽鐘舵�佹爣蹇�
this.registrationTime = null; // 鏂板娉ㄥ唽鎴愬姛鏃堕棿鎴�
this.currentConfig = null; // 瀛樺偍褰撳墠閰嶇疆
+ this.isManualEnd = false;
}
// 鑾峰彇鍖婚櫌閰嶇疆鏂规硶
getHospitalConfig() {
@@ -136,7 +137,7 @@
makeCall(targetNumber) {
const { canCall, reason } = this.canMakeCall();
if (!canCall) {
- Message.error(reason);
+ Message.info(reason);
return Promise.reject(new Error(reason));
}
return new Promise((resolve, reject) => {
@@ -162,6 +163,10 @@
eventHandlers: {
progress: () => this.updateCallStatus("calling", "鍛煎彨涓�..."),
failed: (e) => {
+ if (this.isManualEnd) {
+ console.log("涓诲姩鎸傛柇锛屽拷鐣ュけ璐ヤ簨浠�");
+ return;
+ }
this.handleCallFailure(e, reject);
},
ended: () => this.updateCallStatus("ended", "閫氳瘽缁撴潫"),
@@ -417,13 +422,16 @@
});
}
- endCall() {
- if (this.currentSession) {
- this.currentSession.terminate();
- this.updateCallStatus("ended", "閫氳瘽宸茬粨鏉�");
- this.currentSession = null;
- }
+endCall() {
+ if (this.currentSession) {
+ this.isManualEnd = true;
+ this.currentSession.terminate();
+ this.updateCallStatus('ended', '閫氳瘽宸茬粨鏉�');
+ this.currentSession = null;
+ // 寤惰繜閲嶇疆鏍囧織锛岄伩鍏嶅奖鍝嶅悗缁簨浠�
+ setTimeout(() => { this.isManualEnd = false; }, 100);
}
+}
updateStatus(type, text) {
console.log(`SIP鐘舵�佹洿鏂�: ${type} - ${text}`);
--
Gitblit v1.9.3