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

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.6",
700
+ version: "2.3.0-beta.8",
701
701
  description: "callkit",
702
702
  author: "koi",
703
703
  license: "ISC",
@@ -17018,7 +17018,7 @@ var Socket = class {
17018
17018
  return;
17019
17019
  }
17020
17020
  const { userInfo, version } = this.callKit.config.getConfig();
17021
- const { sessionId, extno, agentId, phoneType } = userInfo;
17021
+ const { sessionId, extno, agentId } = userInfo;
17022
17022
  if (!sessionId) {
17023
17023
  this.callKit.logger.error("sessionId is empty", {
17024
17024
  caller: "Socket.send",
@@ -17038,7 +17038,6 @@ var Socket = class {
17038
17038
  if (SocketSendEvent.CALL === event) {
17039
17039
  msg.phoneNum = extno;
17040
17040
  msg.agentId = agentId;
17041
- msg.phoneType = phoneType;
17042
17041
  if (message?.sourceType === CallSourceType.phoneNum) {
17043
17042
  delete msg.workOrderId;
17044
17043
  } else if (message?.sourceType === CallSourceType.workOrderId) {
@@ -17358,10 +17357,7 @@ var CallKit = class {
17358
17357
  caller: "CallKit.register",
17359
17358
  content: {}
17360
17359
  });
17361
- const { userInfo } = this.config.getConfig();
17362
- if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17363
- this.connect.register();
17364
- }
17360
+ this.connect.register();
17365
17361
  }
17366
17362
  async unregister() {
17367
17363
  if (!this.config.check())
@@ -17471,13 +17467,10 @@ var CallKit = class {
17471
17467
  force
17472
17468
  }
17473
17469
  });
17474
- const { userInfo } = this.config.getConfig();
17475
- if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17476
- if (this.connect.isCalling()) {
17477
- await this.hangup();
17478
- }
17479
- await this.connect.reset({ force });
17470
+ if (this.connect.isCalling()) {
17471
+ await this.hangup();
17480
17472
  }
17473
+ await this.connect.reset({ force });
17481
17474
  if (this.config.isLogin()) {
17482
17475
  await this.logout({ isReset: false });
17483
17476
  } else {