| | |
| | | sipStatus: "未连接", |
| | | sipStatusClass: "status-disconnected", |
| | | sipConfig: { |
| | | wsUrl: "wss://192.168.10.124:7443", |
| | | sipUri: "", |
| | | // 移除硬编码的wsUrl和domain |
| | | wsUrl:'', |
| | | sipUri:'', |
| | | password: "Smartor@2023", |
| | | displayName: "Web 小龙", |
| | | // realm: "9.208.5.18:8090", |
| | |
| | | }, |
| | | |
| | | async mounted() { |
| | | const orgName = localStorage.getItem("orgname"); |
| | | if (orgName == "景宁畲族自治县人民医院") { |
| | | return; |
| | | } |
| | | await this.CallgetList(); |
| | | this.isRegistering = true; // 开始注册 |
| | | sipService.init(this.sipConfig); |
| | |
| | | const res = await CallgetList(); |
| | | this.randomNum = res.data[0].tel; |
| | | this.randomID = res.data[0].id; |
| | | // 正确设置 sipUri |
| | | this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`; |
| | | // 动态设置sipUri,域名部分会在sipService中动态处理 |
| | | const orgName = localStorage.getItem("orgname"); |
| | | if (orgName == "丽水市中医院") { |
| | | this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`; |
| | | } else if (orgName == "龙泉市人民医院") { |
| | | this.sipConfig.sipUri = `${this.randomNum}@10.10.0.220`; |
| | | } |
| | | } catch (error) { |
| | | console.error("获取分机号失败:", error); |
| | | // this.updateStatus("failed", "获取分机号失败"); |