@voicenter-team/opensips-js 1.0.84 → 1.0.85

Sign up to get free protection for your applications and to get access to all the features.
@@ -530,7 +530,7 @@ function rs() {
530
530
  user: yn,
531
531
  user_unreserved: An,
532
532
  password: js,
533
- hostport: zt,
533
+ hostport: Jt,
534
534
  host: ls,
535
535
  hostname: qs,
536
536
  domainlabel: Cn,
@@ -602,8 +602,8 @@ function rs() {
602
602
  display_name: ws,
603
603
  contact_params: Pn,
604
604
  c_p_q: jr,
605
- c_p_expires: Jt,
606
- delta_seconds: Xt,
605
+ c_p_expires: Xt,
606
+ delta_seconds: Qt,
607
607
  qvalue: Ge,
608
608
  generic_param: We,
609
609
  gen_value: cl,
@@ -637,7 +637,7 @@ function rs() {
637
637
  Proxy_Authenticate: zr,
638
638
  challenge: $n,
639
639
  other_challenge: Os,
640
- auth_param: Qt,
640
+ auth_param: Zt,
641
641
  digest_cln: rn,
642
642
  realm: Jr,
643
643
  realm_value: Xr,
@@ -1004,7 +1004,7 @@ function rs() {
1004
1004
  }
1005
1005
  function we() {
1006
1006
  var e, l, u, f, h, m;
1007
- return h = n, m = n, e = Xe(), e !== null ? (o.charCodeAt(n) === 58 ? (l = ":", n++) : (l = null, d('":"')), l !== null ? (u = _t(), u = u !== null ? u : "", u !== null ? (f = zt(), f !== null ? e = [e, l, u, f] : (e = null, n = m)) : (e = null, n = m)) : (e = null, n = m)) : (e = null, n = m), e !== null && (e = function(v) {
1007
+ return h = n, m = n, e = Xe(), e !== null ? (o.charCodeAt(n) === 58 ? (l = ":", n++) : (l = null, d('":"')), l !== null ? (u = _t(), u = u !== null ? u : "", u !== null ? (f = Jt(), f !== null ? e = [e, l, u, f] : (e = null, n = m)) : (e = null, n = m)) : (e = null, n = m)) : (e = null, n = m), e !== null && (e = function(v) {
1008
1008
  try {
1009
1009
  w.uri = new as(w.scheme, w.user, w.host, w.port), delete w.scheme, delete w.user, delete w.host, delete w.host_type, delete w.port;
1010
1010
  } catch {
@@ -1014,7 +1014,7 @@ function rs() {
1014
1014
  }
1015
1015
  function De() {
1016
1016
  var e, l, u, f, h, m, v, S;
1017
- return v = n, S = n, e = Xe(), e !== null ? (o.charCodeAt(n) === 58 ? (l = ":", n++) : (l = null, d('":"')), l !== null ? (u = _t(), u = u !== null ? u : "", u !== null ? (f = zt(), f !== null ? (h = In(), h !== null ? (m = Gs(), m = m !== null ? m : "", m !== null ? e = [e, l, u, f, h, m] : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S), e !== null && (e = function(O) {
1017
+ return v = n, S = n, e = Xe(), e !== null ? (o.charCodeAt(n) === 58 ? (l = ":", n++) : (l = null, d('":"')), l !== null ? (u = _t(), u = u !== null ? u : "", u !== null ? (f = Jt(), f !== null ? (h = In(), h !== null ? (m = Gs(), m = m !== null ? m : "", m !== null ? e = [e, l, u, f, h, m] : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S)) : (e = null, n = S), e !== null && (e = function(O) {
1018
1018
  try {
1019
1019
  w.uri = new as(w.scheme, w.user, w.host, w.port, w.uri_params, w.uri_headers), delete w.scheme, delete w.user, delete w.host, delete w.host_type, delete w.port, delete w.uri_params, a === "SIP_URI" && (w = w.uri);
1020
1020
  } catch {
@@ -1065,7 +1065,7 @@ function rs() {
1065
1065
  w.password = o.substring(n, f);
1066
1066
  }(u)), e === null && (n = u), e;
1067
1067
  }
1068
- function zt() {
1068
+ function Jt() {
1069
1069
  var e, l, u, f, h;
1070
1070
  return f = n, e = ls(), e !== null ? (h = n, o.charCodeAt(n) === 58 ? (l = ":", n++) : (l = null, d('":"')), l !== null ? (u = hr(), u !== null ? l = [l, u] : (l = null, n = h)) : (l = null, n = h), l = l !== null ? l : "", l !== null ? e = [e, l] : (e = null, n = f)) : (e = null, n = f), e;
1071
1071
  }
@@ -1355,7 +1355,7 @@ function rs() {
1355
1355
  }
1356
1356
  function Or() {
1357
1357
  var e, l, u, f;
1358
- return u = n, f = n, e = _t(), e !== null ? (o.charCodeAt(n) === 64 ? (l = "@", n++) : (l = null, d('"@"')), l !== null ? e = [e, l] : (e = null, n = f)) : (e = null, n = f), e = e !== null ? e : "", e !== null ? (l = zt(), l !== null ? e = [e, l] : (e = null, n = u)) : (e = null, n = u), e = e !== null ? e : "", e;
1358
+ return u = n, f = n, e = _t(), e !== null ? (o.charCodeAt(n) === 64 ? (l = "@", n++) : (l = null, d('"@"')), l !== null ? e = [e, l] : (e = null, n = f)) : (e = null, n = f), e = e !== null ? e : "", e !== null ? (l = Jt(), l !== null ? e = [e, l] : (e = null, n = u)) : (e = null, n = u), e = e !== null ? e : "", e;
1359
1359
  }
1360
1360
  function Dr() {
1361
1361
  var e, l;
@@ -1543,7 +1543,7 @@ function rs() {
1543
1543
  }
1544
1544
  function Pn() {
1545
1545
  var e;
1546
- return e = jr(), e === null && (e = Jt(), e === null && (e = We())), e;
1546
+ return e = jr(), e === null && (e = Xt(), e === null && (e = We())), e;
1547
1547
  }
1548
1548
  function jr() {
1549
1549
  var e, l, u, f, h;
@@ -1551,13 +1551,13 @@ function rs() {
1551
1551
  w.params || (w.params = {}), w.params.q = v;
1552
1552
  }(f, e[2])), e === null && (n = f), e;
1553
1553
  }
1554
- function Jt() {
1554
+ function Xt() {
1555
1555
  var e, l, u, f, h;
1556
- return f = n, h = n, o.substr(n, 7).toLowerCase() === "expires" ? (e = o.substr(n, 7), n += 7) : (e = null, d('"expires"')), e !== null ? (l = re(), l !== null ? (u = Xt(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
1556
+ return f = n, h = n, o.substr(n, 7).toLowerCase() === "expires" ? (e = o.substr(n, 7), n += 7) : (e = null, d('"expires"')), e !== null ? (l = re(), l !== null ? (u = Qt(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
1557
1557
  w.params || (w.params = {}), w.params.expires = v;
1558
1558
  }(f, e[2])), e === null && (n = f), e;
1559
1559
  }
1560
- function Xt() {
1560
+ function Qt() {
1561
1561
  var e, l, u;
1562
1562
  if (u = n, l = T(), l !== null)
1563
1563
  for (e = []; l !== null; )
@@ -1698,7 +1698,7 @@ function rs() {
1698
1698
  }
1699
1699
  function Vo() {
1700
1700
  var e, l;
1701
- return l = n, e = Xt(), e !== null && (e = function(u, f) {
1701
+ return l = n, e = Qt(), e !== null && (e = function(u, f) {
1702
1702
  w = f;
1703
1703
  }(l, e)), e === null && (n = l), e;
1704
1704
  }
@@ -1764,7 +1764,7 @@ function rs() {
1764
1764
  }
1765
1765
  function qo() {
1766
1766
  var e, l;
1767
- return l = n, e = Xt(), e !== null && (e = function(u, f) {
1767
+ return l = n, e = Qt(), e !== null && (e = function(u, f) {
1768
1768
  w = f;
1769
1769
  }(l, e)), e === null && (n = l), e;
1770
1770
  }
@@ -1819,9 +1819,9 @@ function rs() {
1819
1819
  var e, l, u, f, h, m, v, S;
1820
1820
  if (v = n, e = P(), e !== null)
1821
1821
  if (l = M(), l !== null)
1822
- if (u = Qt(), u !== null) {
1823
- for (f = [], S = n, h = le(), h !== null ? (m = Qt(), m !== null ? h = [h, m] : (h = null, n = S)) : (h = null, n = S); h !== null; )
1824
- f.push(h), S = n, h = le(), h !== null ? (m = Qt(), m !== null ? h = [h, m] : (h = null, n = S)) : (h = null, n = S);
1822
+ if (u = Zt(), u !== null) {
1823
+ for (f = [], S = n, h = le(), h !== null ? (m = Zt(), m !== null ? h = [h, m] : (h = null, n = S)) : (h = null, n = S); h !== null; )
1824
+ f.push(h), S = n, h = le(), h !== null ? (m = Zt(), m !== null ? h = [h, m] : (h = null, n = S)) : (h = null, n = S);
1825
1825
  f !== null ? e = [e, l, u, f] : (e = null, n = v);
1826
1826
  } else
1827
1827
  e = null, n = v;
@@ -1831,13 +1831,13 @@ function rs() {
1831
1831
  e = null, n = v;
1832
1832
  return e;
1833
1833
  }
1834
- function Qt() {
1834
+ function Zt() {
1835
1835
  var e, l, u, f;
1836
1836
  return f = n, e = P(), e !== null ? (l = re(), l !== null ? (u = P(), u === null && (u = Oe()), u !== null ? e = [e, l, u] : (e = null, n = f)) : (e = null, n = f)) : (e = null, n = f), e;
1837
1837
  }
1838
1838
  function rn() {
1839
1839
  var e;
1840
- return e = Jr(), e === null && (e = ln(), e === null && (e = Qr(), e === null && (e = ei(), e === null && (e = ti(), e === null && (e = si(), e === null && (e = an(), e === null && (e = Qt()))))))), e;
1840
+ return e = Jr(), e === null && (e = ln(), e === null && (e = Qr(), e === null && (e = ei(), e === null && (e = ti(), e === null && (e = si(), e === null && (e = an(), e === null && (e = Zt()))))))), e;
1841
1841
  }
1842
1842
  function Jr() {
1843
1843
  var e, l, u, f;
@@ -2077,9 +2077,9 @@ function rs() {
2077
2077
  var e, l, u, f, h;
2078
2078
  return f = n, h = n, o.substr(n, 6).toLowerCase() === "reason" ? (e = o.substr(n, 6), n += 6) : (e = null, d('"reason"')), e !== null ? (l = re(), l !== null ? (u = vl(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
2079
2079
  typeof v < "u" && (w.reason = v);
2080
- }(f, e[2])), e === null && (n = f), e === null && (f = n, h = n, o.substr(n, 7).toLowerCase() === "expires" ? (e = o.substr(n, 7), n += 7) : (e = null, d('"expires"')), e !== null ? (l = re(), l !== null ? (u = Xt(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
2080
+ }(f, e[2])), e === null && (n = f), e === null && (f = n, h = n, o.substr(n, 7).toLowerCase() === "expires" ? (e = o.substr(n, 7), n += 7) : (e = null, d('"expires"')), e !== null ? (l = re(), l !== null ? (u = Qt(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
2081
2081
  typeof v < "u" && (w.expires = v);
2082
- }(f, e[2])), e === null && (n = f), e === null && (f = n, h = n, o.substr(n, 11).toLowerCase() === "retry_after" ? (e = o.substr(n, 11), n += 11) : (e = null, d('"retry_after"')), e !== null ? (l = re(), l !== null ? (u = Xt(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
2082
+ }(f, e[2])), e === null && (n = f), e === null && (f = n, h = n, o.substr(n, 11).toLowerCase() === "retry_after" ? (e = o.substr(n, 11), n += 11) : (e = null, d('"retry_after"')), e !== null ? (l = re(), l !== null ? (u = Qt(), u !== null ? e = [e, l, u] : (e = null, n = h)) : (e = null, n = h)) : (e = null, n = h), e !== null && (e = function(m, v) {
2083
2083
  typeof v < "u" && (w.retry_after = v);
2084
2084
  }(f, e[2])), e === null && (n = f), e === null && (e = We()))), e;
2085
2085
  }
@@ -2240,7 +2240,7 @@ function rs() {
2240
2240
  }
2241
2241
  function Jn() {
2242
2242
  var e, l;
2243
- return l = n, e = Xt(), e !== null && (e = function(u, f) {
2243
+ return l = n, e = Qt(), e !== null && (e = function(u, f) {
2244
2244
  w.expires = f;
2245
2245
  }(l, e)), e === null && (n = l), e;
2246
2246
  }
@@ -8878,8 +8878,8 @@ function Dc(c, s) {
8878
8878
  o[r] = c[r];
8879
8879
  return o;
8880
8880
  }
8881
- var Lp = ft, Xf = rt, Nc = gs, Au = Rt(), Cu = new Lp("sanityCheck"), $p = [Yp], Hp = [jp, qp, Bp, Gp], Fp = [Wp, Kp], He, Zt, Qf, Vp = function(c, s, r) {
8882
- He = c, Zt = s, Qf = r;
8881
+ var Lp = ft, Xf = rt, Nc = gs, Au = Rt(), Cu = new Lp("sanityCheck"), $p = [Yp], Hp = [jp, qp, Bp, Gp], Fp = [Wp, Kp], He, es, Qf, Vp = function(c, s, r) {
8882
+ He = c, es = s, Qf = r;
8883
8883
  var o = mo($p), a;
8884
8884
  try {
8885
8885
  for (o.s(); !(a = o.n()).done; ) {
@@ -8926,7 +8926,7 @@ function jp() {
8926
8926
  return Yi(416), !1;
8927
8927
  }
8928
8928
  function qp() {
8929
- if (!He.to_tag && He.call_id.substr(0, 5) === Zt.configuration.jssip_id)
8929
+ if (!He.to_tag && He.call_id.substr(0, 5) === es.configuration.jssip_id)
8930
8930
  return Yi(482), !1;
8931
8931
  }
8932
8932
  function Bp() {
@@ -8938,16 +8938,16 @@ function Gp() {
8938
8938
  var c = He.from_tag, s = He.call_id, r = He.cseq, o;
8939
8939
  if (!He.to_tag)
8940
8940
  if (He.method === Xf.INVITE) {
8941
- if (Zt._transactions.ist[He.via_branch])
8941
+ if (es._transactions.ist[He.via_branch])
8942
8942
  return !1;
8943
- for (var a in Zt._transactions.ist)
8944
- if (Object.prototype.hasOwnProperty.call(Zt._transactions.ist, a) && (o = Zt._transactions.ist[a], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
8943
+ for (var a in es._transactions.ist)
8944
+ if (Object.prototype.hasOwnProperty.call(es._transactions.ist, a) && (o = es._transactions.ist[a], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
8945
8945
  return Yi(482), !1;
8946
8946
  } else {
8947
- if (Zt._transactions.nist[He.via_branch])
8947
+ if (es._transactions.nist[He.via_branch])
8948
8948
  return !1;
8949
- for (var t in Zt._transactions.nist)
8950
- if (Object.prototype.hasOwnProperty.call(Zt._transactions.nist, t) && (o = Zt._transactions.nist[t], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
8949
+ for (var t in es._transactions.nist)
8950
+ if (Object.prototype.hasOwnProperty.call(es._transactions.nist, t) && (o = es._transactions.nist[t], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
8951
8951
  return Yi(482), !1;
8952
8952
  }
8953
8953
  }
@@ -10331,7 +10331,7 @@ function is() {
10331
10331
  user_unreserved: yn,
10332
10332
  password: An,
10333
10333
  hostport: js,
10334
- host: zt,
10334
+ host: Jt,
10335
10335
  hostname: ls,
10336
10336
  domainlabel: qs,
10337
10337
  toplabel: Cn,
@@ -10403,8 +10403,8 @@ function is() {
10403
10403
  contact_params: ws,
10404
10404
  c_p_q: Pn,
10405
10405
  c_p_expires: jr,
10406
- delta_seconds: Jt,
10407
- qvalue: Xt,
10406
+ delta_seconds: Xt,
10407
+ qvalue: Qt,
10408
10408
  generic_param: Ge,
10409
10409
  gen_value: We,
10410
10410
  Content_Disposition: cl,
@@ -10438,7 +10438,7 @@ function is() {
10438
10438
  challenge: zr,
10439
10439
  other_challenge: $n,
10440
10440
  auth_param: Os,
10441
- digest_cln: Qt,
10441
+ digest_cln: Zt,
10442
10442
  realm: rn,
10443
10443
  realm_value: Jr,
10444
10444
  domain: Xr,
@@ -10867,9 +10867,9 @@ function is() {
10867
10867
  }
10868
10868
  function js() {
10869
10869
  var i, e, l, u, f;
10870
- return u = t, i = zt(), i !== null ? (f = t, r.charCodeAt(t) === 58 ? (e = ":", t++) : (e = null, _('":"')), e !== null ? (l = Es(), l !== null ? e = [e, l] : (e = null, t = f)) : (e = null, t = f), e = e !== null ? e : "", e !== null ? i = [i, e] : (i = null, t = u)) : (i = null, t = u), i;
10870
+ return u = t, i = Jt(), i !== null ? (f = t, r.charCodeAt(t) === 58 ? (e = ":", t++) : (e = null, _('":"')), e !== null ? (l = Es(), l !== null ? e = [e, l] : (e = null, t = f)) : (e = null, t = f), e = e !== null ? e : "", e !== null ? i = [i, e] : (i = null, t = u)) : (i = null, t = u), i;
10871
10871
  }
10872
- function zt() {
10872
+ function Jt() {
10873
10873
  var i, e;
10874
10874
  return e = t, i = ls(), i === null && (i = lt(), i === null && (i = Rn())), i !== null && (i = function(l) {
10875
10875
  return b.host = r.substring(t, l).toLowerCase(), b.host;
@@ -10975,7 +10975,7 @@ function is() {
10975
10975
  }
10976
10976
  function gr() {
10977
10977
  var i, e, l, u;
10978
- return l = t, u = t, r.substr(t, 6).toLowerCase() === "maddr=" ? (i = r.substr(t, 6), t += 6) : (i = null, _('"maddr="')), i !== null ? (e = zt(), e !== null ? i = [i, e] : (i = null, t = u)) : (i = null, t = u), i !== null && (i = function(f, h) {
10978
+ return l = t, u = t, r.substr(t, 6).toLowerCase() === "maddr=" ? (i = r.substr(t, 6), t += 6) : (i = null, _('"maddr="')), i !== null ? (e = Jt(), e !== null ? i = [i, e] : (i = null, t = u)) : (i = null, t = u), i !== null && (i = function(f, h) {
10979
10979
  b.uri_params || (b.uri_params = {}), b.uri_params.maddr = h;
10980
10980
  }(l, i[1])), i === null && (t = l), i;
10981
10981
  }
@@ -11347,17 +11347,17 @@ function is() {
11347
11347
  }
11348
11348
  function Pn() {
11349
11349
  var i, e, l, u, f;
11350
- return u = t, f = t, r.substr(t, 1).toLowerCase() === "q" ? (i = r.substr(t, 1), t++) : (i = null, _('"q"')), i !== null ? (e = G(), e !== null ? (l = Xt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11350
+ return u = t, f = t, r.substr(t, 1).toLowerCase() === "q" ? (i = r.substr(t, 1), t++) : (i = null, _('"q"')), i !== null ? (e = G(), e !== null ? (l = Qt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11351
11351
  b.params || (b.params = {}), b.params.q = m;
11352
11352
  }(u, i[2])), i === null && (t = u), i;
11353
11353
  }
11354
11354
  function jr() {
11355
11355
  var i, e, l, u, f;
11356
- return u = t, f = t, r.substr(t, 7).toLowerCase() === "expires" ? (i = r.substr(t, 7), t += 7) : (i = null, _('"expires"')), i !== null ? (e = G(), e !== null ? (l = Jt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11356
+ return u = t, f = t, r.substr(t, 7).toLowerCase() === "expires" ? (i = r.substr(t, 7), t += 7) : (i = null, _('"expires"')), i !== null ? (e = G(), e !== null ? (l = Xt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11357
11357
  b.params || (b.params = {}), b.params.expires = m;
11358
11358
  }(u, i[2])), i === null && (t = u), i;
11359
11359
  }
11360
- function Jt() {
11360
+ function Xt() {
11361
11361
  var i, e, l;
11362
11362
  if (l = t, e = g(), e !== null)
11363
11363
  for (i = []; e !== null; )
@@ -11368,7 +11368,7 @@ function is() {
11368
11368
  return parseInt(f.join(""));
11369
11369
  }(l, i)), i === null && (t = l), i;
11370
11370
  }
11371
- function Xt() {
11371
+ function Qt() {
11372
11372
  var i, e, l, u, f, h, m, v;
11373
11373
  return h = t, m = t, r.charCodeAt(t) === 48 ? (i = "0", t++) : (i = null, _('"0"')), i !== null ? (v = t, r.charCodeAt(t) === 46 ? (e = ".", t++) : (e = null, _('"."')), e !== null ? (l = g(), l = l !== null ? l : "", l !== null ? (u = g(), u = u !== null ? u : "", u !== null ? (f = g(), f = f !== null ? f : "", f !== null ? e = [e, l, u, f] : (e = null, t = v)) : (e = null, t = v)) : (e = null, t = v)) : (e = null, t = v), e = e !== null ? e : "", e !== null ? i = [i, e] : (i = null, t = m)) : (i = null, t = m), i !== null && (i = function(S) {
11374
11374
  return parseFloat(r.substring(t, S));
@@ -11382,7 +11382,7 @@ function is() {
11382
11382
  }
11383
11383
  function We() {
11384
11384
  var i;
11385
- return i = U(), i === null && (i = zt(), i === null && (i = Ie())), i;
11385
+ return i = U(), i === null && (i = Jt(), i === null && (i = Ie())), i;
11386
11386
  }
11387
11387
  function cl() {
11388
11388
  var i, e, l, u, f, h;
@@ -11498,7 +11498,7 @@ function is() {
11498
11498
  }
11499
11499
  function ml() {
11500
11500
  var i, e;
11501
- return e = t, i = Jt(), i !== null && (i = function(l, u) {
11501
+ return e = t, i = Xt(), i !== null && (i = function(l, u) {
11502
11502
  b = u;
11503
11503
  }(e, i)), i === null && (t = e), i;
11504
11504
  }
@@ -11564,7 +11564,7 @@ function is() {
11564
11564
  }
11565
11565
  function jo() {
11566
11566
  var i, e;
11567
- return e = t, i = Jt(), i !== null && (i = function(l, u) {
11567
+ return e = t, i = Xt(), i !== null && (i = function(l, u) {
11568
11568
  b = u;
11569
11569
  }(e, i)), i === null && (t = e), i;
11570
11570
  }
@@ -11603,9 +11603,9 @@ function is() {
11603
11603
  var i, e, l, u, f, h, m, v;
11604
11604
  if (m = t, r.substr(t, 6).toLowerCase() === "digest" ? (i = r.substr(t, 6), t += 6) : (i = null, _('"Digest"')), i !== null)
11605
11605
  if (e = ve(), e !== null)
11606
- if (l = Qt(), l !== null) {
11607
- for (u = [], v = t, f = Ce(), f !== null ? (h = Qt(), h !== null ? f = [f, h] : (f = null, t = v)) : (f = null, t = v); f !== null; )
11608
- u.push(f), v = t, f = Ce(), f !== null ? (h = Qt(), h !== null ? f = [f, h] : (f = null, t = v)) : (f = null, t = v);
11606
+ if (l = Zt(), l !== null) {
11607
+ for (u = [], v = t, f = Ce(), f !== null ? (h = Zt(), h !== null ? f = [f, h] : (f = null, t = v)) : (f = null, t = v); f !== null; )
11608
+ u.push(f), v = t, f = Ce(), f !== null ? (h = Zt(), h !== null ? f = [f, h] : (f = null, t = v)) : (f = null, t = v);
11609
11609
  u !== null ? i = [i, e, l, u] : (i = null, t = m);
11610
11610
  } else
11611
11611
  i = null, t = m;
@@ -11635,7 +11635,7 @@ function is() {
11635
11635
  var i, e, l, u;
11636
11636
  return u = t, i = U(), i !== null ? (e = G(), e !== null ? (l = U(), l === null && (l = Ie()), l !== null ? i = [i, e, l] : (i = null, t = u)) : (i = null, t = u)) : (i = null, t = u), i;
11637
11637
  }
11638
- function Qt() {
11638
+ function Zt() {
11639
11639
  var i;
11640
11640
  return i = rn(), i === null && (i = Xr(), i === null && (i = on(), i === null && (i = Zr(), i === null && (i = ei(), i === null && (i = ti(), i === null && (i = si(), i === null && (i = Os()))))))), i;
11641
11641
  }
@@ -11877,9 +11877,9 @@ function is() {
11877
11877
  var i, e, l, u, f;
11878
11878
  return u = t, f = t, r.substr(t, 6).toLowerCase() === "reason" ? (i = r.substr(t, 6), t += 6) : (i = null, _('"reason"')), i !== null ? (e = G(), e !== null ? (l = Wn(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11879
11879
  typeof m < "u" && (b.reason = m);
11880
- }(u, i[2])), i === null && (t = u), i === null && (u = t, f = t, r.substr(t, 7).toLowerCase() === "expires" ? (i = r.substr(t, 7), t += 7) : (i = null, _('"expires"')), i !== null ? (e = G(), e !== null ? (l = Jt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11880
+ }(u, i[2])), i === null && (t = u), i === null && (u = t, f = t, r.substr(t, 7).toLowerCase() === "expires" ? (i = r.substr(t, 7), t += 7) : (i = null, _('"expires"')), i !== null ? (e = G(), e !== null ? (l = Xt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11881
11881
  typeof m < "u" && (b.expires = m);
11882
- }(u, i[2])), i === null && (t = u), i === null && (u = t, f = t, r.substr(t, 11).toLowerCase() === "retry_after" ? (i = r.substr(t, 11), t += 11) : (i = null, _('"retry_after"')), i !== null ? (e = G(), e !== null ? (l = Jt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11882
+ }(u, i[2])), i === null && (t = u), i === null && (u = t, f = t, r.substr(t, 11).toLowerCase() === "retry_after" ? (i = r.substr(t, 11), t += 11) : (i = null, _('"retry_after"')), i !== null ? (e = G(), e !== null ? (l = Xt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11883
11883
  typeof m < "u" && (b.retry_after = m);
11884
11884
  }(u, i[2])), i === null && (t = u), i === null && (i = Ge()))), i;
11885
11885
  }
@@ -11960,7 +11960,7 @@ function is() {
11960
11960
  }
11961
11961
  function li() {
11962
11962
  var i, e, l, u, f;
11963
- return u = t, f = t, r.substr(t, 5).toLowerCase() === "maddr" ? (i = r.substr(t, 5), t += 5) : (i = null, _('"maddr"')), i !== null ? (e = G(), e !== null ? (l = zt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11963
+ return u = t, f = t, r.substr(t, 5).toLowerCase() === "maddr" ? (i = r.substr(t, 5), t += 5) : (i = null, _('"maddr"')), i !== null ? (e = G(), e !== null ? (l = Jt(), l !== null ? i = [i, e, l] : (i = null, t = f)) : (i = null, t = f)) : (i = null, t = f), i !== null && (i = function(h, m) {
11964
11964
  b.maddr = m;
11965
11965
  }(u, i[2])), i === null && (t = u), i;
11966
11966
  }
@@ -12040,7 +12040,7 @@ function is() {
12040
12040
  }
12041
12041
  function El() {
12042
12042
  var i, e;
12043
- return e = t, i = Jt(), i !== null && (i = function(l, u) {
12043
+ return e = t, i = Xt(), i !== null && (i = function(l, u) {
12044
12044
  b.expires = u;
12045
12045
  }(e, i)), i === null && (t = e), i;
12046
12046
  }
@@ -15824,9 +15824,9 @@ const Bg = at, m_ = Ue, hf = Mt, Nu = St(), Uu = new Bg("sanityCheck"), Gg = [tT
15824
15824
  Zg,
15825
15825
  eT
15826
15826
  ];
15827
- let Fe, es, g_;
15827
+ let Fe, ts, g_;
15828
15828
  var Yg = (c, s, r) => {
15829
- Fe = c, es = s, g_ = r;
15829
+ Fe = c, ts = s, g_ = r;
15830
15830
  for (const o of Gg)
15831
15831
  if (o() === !1)
15832
15832
  return !1;
@@ -15846,7 +15846,7 @@ function zg() {
15846
15846
  return zi(416), !1;
15847
15847
  }
15848
15848
  function Jg() {
15849
- if (!Fe.to_tag && Fe.call_id.substr(0, 5) === es.configuration.jssip_id)
15849
+ if (!Fe.to_tag && Fe.call_id.substr(0, 5) === ts.configuration.jssip_id)
15850
15850
  return zi(482), !1;
15851
15851
  }
15852
15852
  function Xg() {
@@ -15859,16 +15859,16 @@ function Qg() {
15859
15859
  let o;
15860
15860
  if (!Fe.to_tag)
15861
15861
  if (Fe.method === m_.INVITE) {
15862
- if (es._transactions.ist[Fe.via_branch])
15862
+ if (ts._transactions.ist[Fe.via_branch])
15863
15863
  return !1;
15864
- for (const a in es._transactions.ist)
15865
- if (Object.prototype.hasOwnProperty.call(es._transactions.ist, a) && (o = es._transactions.ist[a], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
15864
+ for (const a in ts._transactions.ist)
15865
+ if (Object.prototype.hasOwnProperty.call(ts._transactions.ist, a) && (o = ts._transactions.ist[a], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
15866
15866
  return zi(482), !1;
15867
15867
  } else {
15868
- if (es._transactions.nist[Fe.via_branch])
15868
+ if (ts._transactions.nist[Fe.via_branch])
15869
15869
  return !1;
15870
- for (const a in es._transactions.nist)
15871
- if (Object.prototype.hasOwnProperty.call(es._transactions.nist, a) && (o = es._transactions.nist[a], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
15870
+ for (const a in ts._transactions.nist)
15871
+ if (Object.prototype.hasOwnProperty.call(ts._transactions.nist, a) && (o = ts._transactions.nist[a], o.request.from_tag === c && o.request.call_id === s && o.request.cseq === r))
15872
15872
  return zi(482), !1;
15873
15873
  }
15874
15874
  }
@@ -16779,7 +16779,7 @@ class wo extends ct.EventEmitter {
16779
16779
  refresher: !1,
16780
16780
  timer: null
16781
16781
  // A setTimeout.
16782
- }, this._referSubscribers = {}, this._data = {};
16782
+ }, this._referSubscribers = {}, this._candidates = [], this._data = {};
16783
16783
  }
16784
16784
  /**
16785
16785
  * User API
@@ -17474,16 +17474,6 @@ class wo extends ct.EventEmitter {
17474
17474
  this._status === te.STATUS_WAITING_FOR_ACK && (J.debug("no ACK received, terminating the session"), clearTimeout(this._timers.invite2xxTimer), this.sendRequest(q.BYE), this._ended("remote", null, q.causes.NO_ACK));
17475
17475
  }, Ni.TIMER_H);
17476
17476
  }
17477
- _sendTrickle(s) {
17478
- const r = {
17479
- janus: "trickle",
17480
- candidate: s,
17481
- handle_id: this.handle_id,
17482
- //transaction:'6',
17483
- session_id: this.session_id
17484
- };
17485
- console.log("candidate body", r);
17486
- }
17487
17477
  _createRTCConnection(s, r) {
17488
17478
  this._connection = new RTCPeerConnection(s, r), this._connection.addEventListener("iceconnectionstatechange", () => {
17489
17479
  this._connection.iceConnectionState === "failed" && this.terminate({
@@ -17491,15 +17481,18 @@ class wo extends ct.EventEmitter {
17491
17481
  status_code: 408,
17492
17482
  reason_phrase: q.causes.RTP_TIMEOUT
17493
17483
  });
17494
- }), this._connection.onicecandidate = (o) => {
17495
- if (this._connection.signalingState !== "stable" && this._connection.signalingState !== "have-local-offer") {
17496
- console.log("skipining icecandidate event", this._connection.signalingState, o);
17497
- return;
17498
- }
17499
- o.candidate && (console.log("onicecandidate sendTrickle", o.candidate), this._sendTrickle(o.candidate).catch((a) => {
17500
- J.warn(a);
17501
- }));
17502
- }, J.debug('emit "peerconnection"'), this.emit("peerconnection", {
17484
+ });
17485
+ let o;
17486
+ const a = (t) => {
17487
+ this._connection.signalingState !== "stable" && this._connection.signalingState !== "have-local-offer" || t.candidate && (this._candidates.push(t.candidate), clearTimeout(o), o = setTimeout(() => {
17488
+ this.lastTrickleReceived = !0, this.subscribeSent && !this.isConfigureSent && this.sendConfigureMessage({
17489
+ audio: !0,
17490
+ video: !0
17491
+ }).then(() => {
17492
+ });
17493
+ }, 500));
17494
+ };
17495
+ this._connection.onicecandidate = a, J.debug('emit "peerconnection"'), this.emit("peerconnection", {
17503
17496
  peerconnection: this._connection
17504
17497
  });
17505
17498
  }
@@ -17904,29 +17897,35 @@ class wo extends ct.EventEmitter {
17904
17897
  offerToReceiveVideo: !1
17905
17898
  }, o = await this._connection.createOffer(r);
17906
17899
  await this._connection.setLocalDescription(o);
17907
- const a = {
17908
- janus: "message",
17909
- body: {
17910
- request: "configure",
17911
- record: !0,
17912
- filename: this.getRecordFileName(),
17913
- ...s
17914
- },
17915
- /*jsep: {
17916
- sdp: 'test',
17917
- type: 'offer'
17918
- }*/
17919
- jsep: o,
17900
+ const a = this._candidates.map((_) => ({
17901
+ janus: "trickle",
17902
+ candidate: _,
17920
17903
  handle_id: this.handle_id,
17921
- //transaction: '5',
17922
17904
  session_id: this.session_id
17923
- };
17924
- console.log("SDP: SEND SDP REQUEST", a), this.sendRequest(q.INFO, {
17925
- //extraHeaders: registerExtraHeaders,
17926
- body: JSON.stringify(a),
17905
+ })), n = {
17906
+ configure: {
17907
+ janus: "message",
17908
+ body: {
17909
+ request: "configure",
17910
+ record: !0,
17911
+ filename: this.getRecordFileName(),
17912
+ ...s
17913
+ },
17914
+ jsep: o,
17915
+ handle_id: this.handle_id,
17916
+ session_id: this.session_id
17917
+ },
17918
+ trickles: [...a]
17919
+ }, p = ["Content-Type: application/json"];
17920
+ this.sendRequest(q.INFO, {
17921
+ extraHeaders: p,
17922
+ body: JSON.stringify(n),
17927
17923
  eventHandlers: {
17928
- onSuccessResponse: async (t) => {
17929
- console.log("SDP: RESPONSE FOR SDP", t), await this._connection.setRemoteDescription(t.jsep), await this.processIceCandidates();
17924
+ onSuccessResponse: async (_) => {
17925
+ this.isConfigureSent = !0;
17926
+ const g = _.data.split(`\r
17927
+ `), T = g[g.length - 1], E = JSON.parse(T);
17928
+ await this._connection.setRemoteDescription(E.jsep), this._candidates = [];
17930
17929
  }
17931
17930
  }
17932
17931
  });
@@ -17966,12 +17965,17 @@ class wo extends ct.EventEmitter {
17966
17965
  }, n = ["PTYPE: Publisher"];
17967
17966
  this.sendRequest(q.SUBSCRIBE, {
17968
17967
  extraHeaders: n,
17969
- body: JSON.stringify(t)
17970
- }), this.publisherSubscribeSent = !0, this.addTracks(this.stream.getTracks()), this.sendConfigureMessage({
17971
- audio: !0,
17972
- video: !0
17973
- }).then(() => {
17974
- });
17968
+ body: JSON.stringify(t),
17969
+ eventHandlers: {
17970
+ onSuccessResponse: async (p) => {
17971
+ p.status_code === 200 && (this.subscribeSent = !0, this.lastTrickleReceived && !this.isConfigureSent && this.sendConfigureMessage({
17972
+ audio: !0,
17973
+ video: !0
17974
+ }).then(() => {
17975
+ }));
17976
+ }
17977
+ }
17978
+ }), this.publisherSubscribeSent = !0, this.addTracks(this.stream.getTracks());
17975
17979
  });
17976
17980
  }
17977
17981
  if (this._is_canceled) {
@@ -19402,7 +19406,7 @@ var E_ = {};
19402
19406
  })(E_);
19403
19407
  const jT = yt, qT = E_;
19404
19408
  var Cf = Object.assign(jT, { instanceMethods: qT });
19405
- const vn = new AudioContext(), ts = {
19409
+ const vn = new AudioContext(), zt = {
19406
19410
  NEW_CALL: "new_call",
19407
19411
  CALL_CONFIRMED: "confirmed",
19408
19412
  CALL_FAILED: "failed",
@@ -22947,12 +22951,12 @@ class $v {
22947
22951
  incomingInProgress: !1,
22948
22952
  roomId: a
22949
22953
  };
22950
- r.direction === "incoming" ? (this.context.logger.log("New incoming call from", (g = (d = r._remote_identity) == null ? void 0 : d._uri) == null ? void 0 : g._user), t.incomingInProgress = !0, this.context.subscribe(ts.CALL_CONFIRMED, (T) => {
22954
+ r.direction === "incoming" ? (this.context.logger.log("New incoming call from", (g = (d = r._remote_identity) == null ? void 0 : d._uri) == null ? void 0 : g._user), t.incomingInProgress = !0, this.context.subscribe(zt.CALL_CONFIRMED, (T) => {
22951
22955
  r.id === T.id && (this.updateRoom({
22952
22956
  incomingInProgress: !1,
22953
22957
  roomId: a
22954
22958
  }), this.startCallTimer(r.id));
22955
- }), this.context.subscribe(ts.CALL_FAILED, (T) => {
22959
+ }), this.context.subscribe(zt.CALL_FAILED, (T) => {
22956
22960
  r.id === T.id && (this.updateRoom({
22957
22961
  incomingInProgress: !1,
22958
22962
  roomId: a
@@ -22991,10 +22995,14 @@ class $v {
22991
22995
  });
22992
22996
  return;
22993
22997
  }
22994
- if (r.on("ended", (o) => {
22998
+ if (this.context.triggerListener({
22999
+ listenerType: zt.NEW_CALL,
23000
+ session: r,
23001
+ event: s
23002
+ }), r.on("ended", (o) => {
22995
23003
  var t, n, p;
22996
23004
  this.stopVUMeter(r.id), this.context.logger.log("Session ended for", (n = (t = r._remote_identity) == null ? void 0 : t._uri) == null ? void 0 : n._user), this.context.triggerListener({
22997
- listenerType: ts.CALL_ENDED,
23005
+ listenerType: zt.CALL_ENDED,
22998
23006
  session: r,
22999
23007
  event: o
23000
23008
  });
@@ -23003,14 +23011,14 @@ class $v {
23003
23011
  }), r.on("progress", (o) => {
23004
23012
  var a, t;
23005
23013
  this.context.logger.log("Session in progress for", (t = (a = r._remote_identity) == null ? void 0 : a._uri) == null ? void 0 : t._user), this.context.triggerListener({
23006
- listenerType: ts.CALL_PROGRESS,
23014
+ listenerType: zt.CALL_PROGRESS,
23007
23015
  session: r,
23008
23016
  event: o
23009
23017
  });
23010
23018
  }), r.on("failed", (o) => {
23011
23019
  var t, n, p;
23012
23020
  this.stopVUMeter(r.id), this.context.logger.log("Session failed for", (n = (t = r._remote_identity) == null ? void 0 : t._uri) == null ? void 0 : n._user), this.context.triggerListener({
23013
- listenerType: ts.CALL_FAILED,
23021
+ listenerType: zt.CALL_FAILED,
23014
23022
  session: r,
23015
23023
  event: o
23016
23024
  }), r.id === this.callAddingInProgress && (this.callAddingInProgress = void 0);
@@ -23019,7 +23027,7 @@ class $v {
23019
23027
  }), r.on("confirmed", (o) => {
23020
23028
  var a, t;
23021
23029
  this.context.logger.log("Session confirmed for", (t = (a = r._remote_identity) == null ? void 0 : a._uri) == null ? void 0 : t._user), this.context.triggerListener({
23022
- listenerType: ts.CALL_CONFIRMED,
23030
+ listenerType: zt.CALL_CONFIRMED,
23023
23031
  session: r,
23024
23032
  event: o
23025
23033
  }), this.updateCall(r), r.id === this.callAddingInProgress && (this.callAddingInProgress = void 0);
@@ -23074,7 +23082,7 @@ class $v {
23074
23082
  });
23075
23083
  const p = n.audio[t], _ = xv(p, Mv);
23076
23084
  _.callId = s._id, this.setCallMetrics(r);
23077
- }, this.context.subscribe(ts.CALL_ENDED, (n) => {
23085
+ }, this.context.subscribe(zt.CALL_ENDED, (n) => {
23078
23086
  n._id === s._id && r.stopAllProbes();
23079
23087
  }), r.startAllProbes();
23080
23088
  }
@@ -23277,7 +23285,7 @@ class Fv {
23277
23285
  const r = s.session;
23278
23286
  r.on("ended", (o) => {
23279
23287
  this.triggerMSRPListener({
23280
- listenerType: ts.CALL_ENDED,
23288
+ listenerType: zt.CALL_ENDED,
23281
23289
  session: r,
23282
23290
  event: o
23283
23291
  });
@@ -23285,7 +23293,7 @@ class Fv {
23285
23293
  this.activeMessageListRemove(a);
23286
23294
  }), r.on("failed", (o) => {
23287
23295
  this.triggerMSRPListener({
23288
- listenerType: ts.CALL_FAILED,
23296
+ listenerType: zt.CALL_FAILED,
23289
23297
  session: r,
23290
23298
  event: o
23291
23299
  });
@@ -23293,7 +23301,7 @@ class Fv {
23293
23301
  this.activeMessageListRemove(a);
23294
23302
  }), r.on("confirmed", (o) => {
23295
23303
  this.triggerMSRPListener({
23296
- listenerType: ts.CALL_CONFIRMED,
23304
+ listenerType: zt.CALL_CONFIRMED,
23297
23305
  session: r,
23298
23306
  event: o
23299
23307
  }), this.updateMSRPSession(r);