@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.js CHANGED
@@ -724,7 +724,7 @@ var Call = class {
724
724
  // package.json
725
725
  var package_default = {
726
726
  name: "@koi-design/callkit",
727
- version: "2.3.0-beta.3",
727
+ version: "2.3.0-beta.5",
728
728
  description: "callkit",
729
729
  author: "koi",
730
730
  license: "ISC",
@@ -869,6 +869,8 @@ var Config = class {
869
869
  return true;
870
870
  };
871
871
  isLogin = () => this.validate();
872
+ /** 判断当前坐席类型是否为 SIP */
873
+ isPhoneTypeSIP = () => this.config.userInfo.phoneType === PhoneTypeEnum.SIP;
872
874
  check() {
873
875
  if (!this.isLogin()) {
874
876
  this.callKit.logger.warn("User not logged in", {
@@ -17385,7 +17387,9 @@ var CallKit = class {
17385
17387
  caller: "CallKit.register",
17386
17388
  content: {}
17387
17389
  });
17388
- this.connect.register();
17390
+ if (!this.config.isPhoneTypeSIP()) {
17391
+ this.connect.register();
17392
+ }
17389
17393
  }
17390
17394
  async unregister() {
17391
17395
  if (!this.config.check())
@@ -17495,8 +17499,10 @@ var CallKit = class {
17495
17499
  force
17496
17500
  }
17497
17501
  });
17498
- if (this.connect.isCalling()) {
17499
- await this.hangup();
17502
+ if (this.config.isPhoneTypeSIP()) {
17503
+ if (this.connect.isCalling()) {
17504
+ await this.hangup();
17505
+ }
17500
17506
  }
17501
17507
  await this.connect.reset({ force });
17502
17508
  if (this.config.isLogin()) {