@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.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.6",
727
+ version: "2.3.0-beta.8",
728
728
  description: "callkit",
729
729
  author: "koi",
730
730
  license: "ISC",
@@ -17045,7 +17045,7 @@ var Socket = class {
17045
17045
  return;
17046
17046
  }
17047
17047
  const { userInfo, version } = this.callKit.config.getConfig();
17048
- const { sessionId, extno, agentId, phoneType } = userInfo;
17048
+ const { sessionId, extno, agentId } = userInfo;
17049
17049
  if (!sessionId) {
17050
17050
  this.callKit.logger.error("sessionId is empty", {
17051
17051
  caller: "Socket.send",
@@ -17065,7 +17065,6 @@ var Socket = class {
17065
17065
  if (SocketSendEvent.CALL === event) {
17066
17066
  msg.phoneNum = extno;
17067
17067
  msg.agentId = agentId;
17068
- msg.phoneType = phoneType;
17069
17068
  if (message?.sourceType === CallSourceType.phoneNum) {
17070
17069
  delete msg.workOrderId;
17071
17070
  } else if (message?.sourceType === CallSourceType.workOrderId) {
@@ -17385,10 +17384,7 @@ var CallKit = class {
17385
17384
  caller: "CallKit.register",
17386
17385
  content: {}
17387
17386
  });
17388
- const { userInfo } = this.config.getConfig();
17389
- if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17390
- this.connect.register();
17391
- }
17387
+ this.connect.register();
17392
17388
  }
17393
17389
  async unregister() {
17394
17390
  if (!this.config.check())
@@ -17498,13 +17494,10 @@ var CallKit = class {
17498
17494
  force
17499
17495
  }
17500
17496
  });
17501
- const { userInfo } = this.config.getConfig();
17502
- if (userInfo.phoneType === PhoneTypeEnum.SIP) {
17503
- if (this.connect.isCalling()) {
17504
- await this.hangup();
17505
- }
17506
- await this.connect.reset({ force });
17497
+ if (this.connect.isCalling()) {
17498
+ await this.hangup();
17507
17499
  }
17500
+ await this.connect.reset({ force });
17508
17501
  if (this.config.isLogin()) {
17509
17502
  await this.logout({ isReset: false });
17510
17503
  } else {