@voicenter-team/opensips-js 1.0.147 → 1.0.148

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.
@@ -19613,7 +19613,7 @@ class HT {
19613
19613
  this._cseq += 1;
19614
19614
  },
19615
19615
  onReceiveResponse: (o) => {
19616
- if (o.cseq === this._cseq)
19616
+ if (console.log("on register response"), o.cseq === this._cseq)
19617
19617
  switch (this._registrationTimer !== null && (clearTimeout(this._registrationTimer), this._registrationTimer = null), !0) {
19618
19618
  case /^1[0-9]{2}$/.test(o.status_code):
19619
19619
  break;
@@ -19628,7 +19628,7 @@ class HT {
19628
19628
  Wi.debug("no Contact header pointing to us, response ignored");
19629
19629
  break;
19630
19630
  }
19631
- this._ua.clearKeepAliveInterval(), this._ua.setLastRegisterTimestamp();
19631
+ console.log("on register response 200"), this._ua.clearKeepAliveInterval(), this._ua.setLastRegisterTimestamp();
19632
19632
  let d = r.getParam("expires");
19633
19633
  !d && o.hasHeader("expires") && (d = o.getHeader("expires")), d || (d = this._expires), d = Number(d), d < ha && (d = ha);
19634
19634
  const h = d > 64 ? d * 1e3 / 2 + Math.floor((d / 2 - 32) * 1e3 * Math.random()) : d * 1e3 - 5e3;
@@ -19888,9 +19888,11 @@ class jT extends FT {
19888
19888
  if (Gt.checkTransaction(this, t))
19889
19889
  return;
19890
19890
  if (n === De.INVITE ? new Gt.InviteServerTransaction(this, this._transport, t) : n !== De.ACK && n !== De.CANCEL && new Gt.NonInviteServerTransaction(this, this._transport, t), n === De.OPTIONS) {
19891
- if (this.lastOptionsTimestamp = Date.now(), this.optionsInterval || (this.emit("initKeepAliveInterval"), this.optionsInterval = setInterval(() => {
19892
- const g = Date.now();
19893
- this.lastOptionsTimestamp > g - 35e3 && this.lastRegisterTimestamp + this._configuration.register_expires * 1e3 > g && this.emit("keepAliveInterval");
19891
+ if (this.lastOptionsTimestamp = Date.now(), console.log("on options, interval:", this.optionsInterval), this.optionsInterval || (this.emit("initKeepAliveInterval"), console.log("initKeepAliveInterval"), this.optionsInterval = setInterval(() => {
19892
+ const g = Date.now(), T = this.lastOptionsTimestamp > g - 35e3;
19893
+ console.log("this.lastOptionsTimestamp", this.lastOptionsTimestamp), console.log("currentTimestamp", g);
19894
+ const E = this.lastRegisterTimestamp + this._configuration.register_expires * 1e3 > g;
19895
+ console.log("this.lastRegisterTimestamp", this.lastRegisterTimestamp), console.log("this._configuration.register_expires * 1000", this._configuration.register_expires * 1e3), console.log("currentTimestamp", g), console.log("optionsTimeoutCondition", T), console.log("registerTimeoutCondition", E), T && E && (this.emit("keepAliveInterval"), console.log("keepAliveInterval"));
19894
19896
  }, 35e3)), this.listeners("newOptions").length === 0) {
19895
19897
  t.reply(200);
19896
19898
  return;