From f4609c62152cab3bd9b7f8efd3f967f82650ee40 Mon Sep 17 00:00:00 2001 From: WXL (wul) <wl_5969728@163.com> Date: 星期三, 27 八月 2025 09:28:06 +0800 Subject: [PATCH] 测试完成 --- src/components/CallButton/index.vue | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/components/CallButton/index.vue b/src/components/CallButton/index.vue index 47931a4..ef5dbf4 100644 --- a/src/components/CallButton/index.vue +++ b/src/components/CallButton/index.vue @@ -37,7 +37,7 @@ }, }, data() { - const randomNum = Math.floor(Math.random() * 11) + 1000; // 鍐呴儴瀹氫箟 + const randomNum = Math.floor(Math.random() * 20) + 1000; // 鍐呴儴瀹氫箟 return { isCalling: false, callStatus: "idle", // idle, calling, connected, ended @@ -48,6 +48,7 @@ sipUri: `${randomNum}` + "@192.168.10.124", password: "Smartor@2023", displayName: "Web 灏忛緳", + // realm: "9.208.5.18:8090", }, }; }, @@ -69,6 +70,14 @@ }, }, mounted() { + // 娴嬭瘯 + const ws = new WebSocket("wss://9.208.5.18:7443"); + ws.onopen = () => console.log("WebSocket 杩炴帴鎴愬姛"); + ws.onerror = (e) => console.error("WebSocket 閿欒:", e); + + + // 鍒濆鍖朣IP杩炴帴 + sipService.init(this.sipConfig); sipService.onStatusChange = (status) => { this.sipStatus = status.text; -- Gitblit v1.9.3