WXL (wul)
2 天以前 f08b755cd2db76f99b96355e8e1f60dda50fffdb
src/components/CallButton/index.vue
@@ -92,7 +92,10 @@
    sipService.onStatusChange = (status) => {
      this.sipStatus = status.text;
      this.sipStatusClass = `status-${status.type}`;
      // 注册成功
      if (status.type === "registered") {
        this.startCallsetState();
      }
      // 处理注册失败和断开连接情况
      if (status.type === "failed" || status.type === "disconnected") {
        this.overCallsetState(); // 释放分机号
@@ -160,10 +163,9 @@
        this.randomID = res.data[0].id;
        // 正确设置 sipUri
        this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`;
        this.startCallsetState();
      } catch (error) {
        console.error("获取分机号失败:", error);
        this.updateStatus("failed", "获取分机号失败");
        // this.updateStatus("failed", "获取分机号失败");
      }
    },
    async startCallsetState() {