@koi-design/callkit 2.3.0-beta.8 → 2.3.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -697,7 +697,7 @@ var Call = class {
697
697
  // package.json
698
698
  var package_default = {
699
699
  name: "@koi-design/callkit",
700
- version: "2.3.0-beta.8",
700
+ version: "2.3.0-beta.9",
701
701
  description: "callkit",
702
702
  author: "koi",
703
703
  license: "ISC",
@@ -17357,7 +17357,10 @@ var CallKit = class {
17357
17357
  caller: "CallKit.register",
17358
17358
  content: {}
17359
17359
  });
17360
- this.connect.register();
17360
+ const { userInfo } = this.config.getConfig();
17361
+ if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17362
+ this.connect.register();
17363
+ }
17361
17364
  }
17362
17365
  async unregister() {
17363
17366
  if (!this.config.check())
@@ -17467,10 +17470,13 @@ var CallKit = class {
17467
17470
  force
17468
17471
  }
17469
17472
  });
17470
- if (this.connect.isCalling()) {
17471
- await this.hangup();
17473
+ const { userInfo } = this.config.getConfig();
17474
+ if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17475
+ if (this.connect.isCalling()) {
17476
+ await this.hangup();
17477
+ }
17478
+ await this.connect.reset({ force });
17472
17479
  }
17473
- await this.connect.reset({ force });
17474
17480
  if (this.config.isLogin()) {
17475
17481
  await this.logout({ isReset: false });
17476
17482
  } else {