| | |
| | | sipStatus: "未连接", |
| | | sipStatusClass: "status-disconnected", |
| | | sipConfig: { |
| | | wsUrl: "wss://1192.170.66.107:7443", |
| | | sipUri: `${randomNum}` + "@1192.170.66.107", |
| | | password: "Smartor@2023", |
| | | wsUrl: "wss://192.170.66.107:7443", |
| | | sipUri: `${randomNum}` + "@192.170.66.107", |
| | | password: "heskj@1234", |
| | | displayName: "Web 小龙", |
| | | }, |
| | | }; |
| | |
| | | ended: "通话结束", |
| | | }; |
| | | return statusMap[this.callStatus]; |
| | | }, |
| | | countdownText() { |
| | | if (this.sipStatus !== "已注册") return ""; |
| | | |
| | | const { canCall, reason } = sipService.canMakeCall(); |
| | | if (!canCall && reason.includes("等待")) { |
| | | return reason; |
| | | } |
| | | return ""; |
| | | }, |
| | | callStatusClass() { |
| | | return `status-${this.callStatus}`; |
| | |
| | | } |
| | | |
| | | try { |
| | | // 先检查是否可以呼叫 |
| | | const { canCall, reason } = sipService.canMakeCall(); |
| | | if (!canCall) { |
| | | this.$message.warning(reason); |
| | | return; |
| | | } |
| | | this.callStatus = "calling"; |
| | | this.isCalling = true; |
| | | |