@voicenter-team/opensips-js 1.0.141 → 1.0.143

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.
@@ -19772,7 +19772,7 @@ class jT extends FT {
19772
19772
  }
19773
19773
  this._configuration.display_name === 0 && (this._configuration.display_name = "0"), this._configuration.instance_id || (this._configuration.instance_id = Ts.newUUID());
19774
19774
  let n;
19775
- typeof window < "u" && typeof window.document < "u" ? n = window == null ? void 0 : window.navigator.userAgent : typeof self < "u" && self.navigator && (n = self.navigator.userAgent), n += " " + De.USER_AGENT, this._configuration.user_agent = t.overrideUserAgent && typeof t.overrideUserAgent == "function" ? t.overrideUserAgent(n) : n, this._configuration.jssip_id = Ts.createRandomToken(5);
19775
+ typeof window < "u" && typeof window.document < "u" ? n = window == null ? void 0 : window.navigator.userAgent : typeof self < "u" && self.navigator && (n = self.navigator.userAgent), n += " " + De.USER_AGENT, this._configuration.user_agent = t.overrideUserAgent && typeof t.overrideUserAgent == "function" ? t.overrideUserAgent(n) : n, t.onTransportCallback && typeof t.onTransportCallback == "function" && (this.onTransportCallback = t.onTransportCallback), this._configuration.jssip_id = Ts.createRandomToken(5);
19776
19776
  const a = this._configuration.uri.clone();
19777
19777
  a.user = null, this._configuration.hostport_params = a.toString().replace(/^sip:/i, "");
19778
19778
  try {
@@ -20055,19 +20055,20 @@ function BT(c) {
20055
20055
  function GT(c) {
20056
20056
  const t = c.transport;
20057
20057
  let n = c.message;
20058
- if (n = $T.parseMessage(n, this), !!n && !(this._status === Vs.STATUS_USER_CLOSED && n instanceof pr.IncomingRequest) && dT(n, this, t)) {
20058
+ const a = n;
20059
+ if (n = $T.parseMessage(n, this), this.onTransportCallback && typeof this.onTransportCallback == "function" && this.onTransportCallback(n, a), !!n && !(this._status === Vs.STATUS_USER_CLOSED && n instanceof pr.IncomingRequest) && dT(n, this, t)) {
20059
20060
  if (n instanceof pr.IncomingRequest)
20060
20061
  n.transport = t, this.receiveRequest(n);
20061
20062
  else if (n instanceof pr.IncomingResponse) {
20062
- let a;
20063
+ let o;
20063
20064
  switch (n.method) {
20064
20065
  case De.INVITE:
20065
- a = this._transactions.ict[n.via_branch], a && a.receiveResponse(n);
20066
+ o = this._transactions.ict[n.via_branch], o && o.receiveResponse(n);
20066
20067
  break;
20067
20068
  case De.ACK:
20068
20069
  break;
20069
20070
  default:
20070
- a = this._transactions.nict[n.via_branch], a && a.receiveResponse(n);
20071
+ o = this._transactions.nict[n.via_branch], o && o.receiveResponse(n);
20071
20072
  break;
20072
20073
  }
20073
20074
  }
@@ -23733,7 +23734,8 @@ class oE {
23733
23734
  [t]: {
23734
23735
  isMoving: !1,
23735
23736
  isTransferring: !1,
23736
- isMerging: !1
23737
+ isMerging: !1,
23738
+ isTransferred: !1
23737
23739
  }
23738
23740
  }, this.context.emit("changeCallStatus", this.callStatus);
23739
23741
  }
@@ -23741,7 +23743,7 @@ class oE {
23741
23743
  const a = {
23742
23744
  ...{ ...this.callStatus[t.callId] }
23743
23745
  };
23744
- t.isMoving !== void 0 && (a.isMoving = t.isMoving), t.isTransferring !== void 0 && (a.isTransferring = t.isTransferring), t.isMerging !== void 0 && (a.isMerging = t.isMerging), this.callStatus = {
23746
+ t.isMoving !== void 0 && (a.isMoving = t.isMoving), t.isTransferring !== void 0 && (a.isTransferring = t.isTransferring), t.isMerging !== void 0 && (a.isMerging = t.isMerging), t.isTransferred !== void 0 && (a.isTransferred = t.isTransferred), this.callStatus = {
23745
23747
  ...this.callStatus,
23746
23748
  [t.callId]: {
23747
23749
  ...a
@@ -23889,8 +23891,26 @@ class oE {
23889
23891
  }
23890
23892
  this.updateCallStatus({
23891
23893
  callId: t,
23892
- isTransferring: !0
23893
- }), a.refer(`sip:${n}@${this.context.sipDomain}`), this.updateCall(a);
23894
+ isTransferring: !0,
23895
+ isTransferred: !1
23896
+ }), a.refer(`sip:${n}@${this.context.sipDomain}`, {
23897
+ eventHandlers: {
23898
+ requestSucceeded: () => {
23899
+ this.updateCallStatus({
23900
+ callId: t,
23901
+ isTransferring: !1,
23902
+ isTransferred: !0
23903
+ });
23904
+ },
23905
+ requestFailed: () => {
23906
+ this.updateCallStatus({
23907
+ callId: t,
23908
+ isTransferring: !1,
23909
+ isTransferred: !1
23910
+ });
23911
+ }
23912
+ }
23913
+ }), this.updateCall(a);
23894
23914
  }
23895
23915
  mergeCall(t) {
23896
23916
  const n = Object.values(this.extendedCalls).filter((s) => s.roomId === t);