@koi-design/callkit 2.3.0-beta.3 → 2.3.0-beta.5

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.3",
700
+ version: "2.3.0-beta.5",
701
701
  description: "callkit",
702
702
  author: "koi",
703
703
  license: "ISC",
@@ -842,6 +842,8 @@ var Config = class {
842
842
  return true;
843
843
  };
844
844
  isLogin = () => this.validate();
845
+ /** 判断当前坐席类型是否为 SIP */
846
+ isPhoneTypeSIP = () => this.config.userInfo.phoneType === PhoneTypeEnum.SIP;
845
847
  check() {
846
848
  if (!this.isLogin()) {
847
849
  this.callKit.logger.warn("User not logged in", {
@@ -17358,7 +17360,9 @@ var CallKit = class {
17358
17360
  caller: "CallKit.register",
17359
17361
  content: {}
17360
17362
  });
17361
- this.connect.register();
17363
+ if (!this.config.isPhoneTypeSIP()) {
17364
+ this.connect.register();
17365
+ }
17362
17366
  }
17363
17367
  async unregister() {
17364
17368
  if (!this.config.check())
@@ -17468,8 +17472,10 @@ var CallKit = class {
17468
17472
  force
17469
17473
  }
17470
17474
  });
17471
- if (this.connect.isCalling()) {
17472
- await this.hangup();
17475
+ if (this.config.isPhoneTypeSIP()) {
17476
+ if (this.connect.isCalling()) {
17477
+ await this.hangup();
17478
+ }
17473
17479
  }
17474
17480
  await this.connect.reset({ force });
17475
17481
  if (this.config.isLogin()) {