| | |
| | | sipStatus: "未连接", |
| | | sipStatusClass: "status-disconnected", |
| | | sipConfig: { |
| | | wsUrl: "wss://192.168.100.6:7443", |
| | | wsUrl: "wss://192.169.129.198:7443", |
| | | sipUri: "", |
| | | password: "Smartor@2023", |
| | | password: "heskj@1234", |
| | | displayName: "Web 小龙", |
| | | // realm: "9.208.5.18:8090", |
| | | }, |
| | |
| | | this.isCalling = true; |
| | | console.log("开始呼叫:", sipService); |
| | | |
| | | await sipService.makeCall("0" + this.phoneNumber); |
| | | await sipService.makeCall(this.phoneNumber); |
| | | } catch (error) { |
| | | let registrationTime = Date.now(); // 记录注销成功时间 |
| | | console.log(registrationTime, "呼叫失败时间"); |
| | | console.error("呼叫失败1:", error); |
| | | // this.callStatus = "ended"; |
| | | // this.isCalling = false; |
| | | this.callStatus = "ended"; |
| | | this.isCalling = false; |
| | | //this.$message.error(`呼叫失败: ${error.message}`); |
| | | try { |
| | | // 先检查是否可以呼叫 |
| | |
| | | this.isCalling = true; |
| | | console.log("开始呼叫:", sipService); |
| | | |
| | | await sipService.makeCall("0" + this.phoneNumber); |
| | | await sipService.makeCall(this.phoneNumber); |
| | | } catch (error) { |
| | | this.callStatus = "ended"; |
| | | this.isCalling = false; |
| | |
| | | this.randomNum = res.data[0].tel; |
| | | this.randomID = res.data[0].id; |
| | | // 正确设置 sipUri |
| | | this.sipConfig.sipUri = `${this.randomNum}@192.168.100.6`; |
| | | this.sipConfig.sipUri = `${this.randomNum}@192.169.129.198`; |
| | | this.startCallsetState(); |
| | | } catch (error) { |
| | | console.error("获取分机号失败:", error); |