@koi-design/callkit 1.0.24-beta.23 → 1.0.24-beta.25

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.
@@ -18486,13 +18486,18 @@ var WebCall = (() => {
18486
18486
  if (that.isRegistered() && !(that.sipConnected || that.isRinging() || that.isCalling() || that.isHolding())) {
18487
18487
  that.reconnect();
18488
18488
  } else {
18489
- const data = {
18489
+ that.callKit.logger.debug("SIP WebSocket closed with error", {
18490
18490
  event: ConnectEvent.SIP_CONNECT_ERROR,
18491
18491
  err: error
18492
- };
18493
- that.callKit.logger.debug("SIP WebSocket closed with error", data);
18494
- that.callKit.trigger(KitEvent.CONNECT_EVENT, data);
18495
- that.callKit.user.sendHangUpReason(data);
18492
+ });
18493
+ that.callKit.trigger(KitEvent.CONNECT_EVENT, {
18494
+ event: ConnectEvent.SIP_CONNECT_ERROR,
18495
+ err: error
18496
+ });
18497
+ that.callKit.user.sendHangUpReason({
18498
+ eventType: ConnectEvent.SIP_CONNECT_ERROR,
18499
+ err: error
18500
+ });
18496
18501
  that.callKit.callCenter.callEnd();
18497
18502
  }
18498
18503
  } else {
@@ -18505,13 +18510,16 @@ var WebCall = (() => {
18505
18510
  const now = (/* @__PURE__ */ new Date()).getTime();
18506
18511
  const diff = now - that.lastOptionsUpdateTime;
18507
18512
  if (diff > 6e4) {
18508
- const data = {
18513
+ that.callKit.trigger(KitEvent.CONNECT_EVENT, {
18509
18514
  event: ConnectEvent.OPTIONS_HEARTBEAT_EXPIRED,
18510
18515
  lastOptionsUpdateTime: that.lastOptionsUpdateTime,
18511
18516
  now
18512
- };
18513
- that.callKit.trigger(KitEvent.CONNECT_EVENT, data);
18514
- that.callKit.user.sendHangUpReason(data);
18517
+ });
18518
+ that.callKit.user.sendHangUpReason({
18519
+ eventType: ConnectEvent.OPTIONS_HEARTBEAT_EXPIRED,
18520
+ lastOptionsUpdateTime: that.lastOptionsUpdateTime,
18521
+ now
18522
+ });
18515
18523
  that.clearObserveOptionsHeartbeatInterval();
18516
18524
  }
18517
18525
  }
@@ -18913,7 +18921,7 @@ var WebCall = (() => {
18913
18921
  var RECONNECT_CONFIG = {
18914
18922
  enabled: true,
18915
18923
  maxAttempts: 1,
18916
- delay: 1e3,
18924
+ delay: 500,
18917
18925
  backoffMultiplier: 1.5,
18918
18926
  pingInterval: 3e4,
18919
18927
  pingTimeout: 5e3