@voicenter-team/opensips-js 1.0.86 → 1.0.88
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/README.md +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/opensips-js.cjs.js +10 -10
- package/dist/opensips-js.es.js +83 -53
- package/dist/opensips-js.iife.js +18 -18
- package/dist/opensips-js.umd.js +18 -18
- package/package.json +1 -1
- package/src/types/listeners.d.ts +4 -0
package/dist/opensips-js.es.js
CHANGED
@@ -10009,7 +10009,7 @@ var Gc = {
|
|
10009
10009
|
}
|
10010
10010
|
};
|
10011
10011
|
const rr = dr, ir = "JsSIP";
|
10012
|
-
var
|
10012
|
+
var at = class {
|
10013
10013
|
constructor(s) {
|
10014
10014
|
s ? (this._debug = rr.default(`${ir}:${s}`), this._warn = rr.default(`${ir}:WARN:${s}`), this._error = rr.default(`${ir}:ERROR:${s}`)) : (this._debug = rr.default(ir), this._warn = rr.default(`${ir}:WARN`), this._error = rr.default(`${ir}:ERROR`)), this._debug.log = console.info.bind(console), this._warn.log = console.warn.bind(console), this._error.log = console.error.bind(console);
|
10015
10015
|
}
|
@@ -10023,7 +10023,7 @@ var ut = class {
|
|
10023
10023
|
return this._error;
|
10024
10024
|
}
|
10025
10025
|
};
|
10026
|
-
const n_ = /* @__PURE__ */ Xe(
|
10026
|
+
const n_ = /* @__PURE__ */ Xe(at), Wc = xo;
|
10027
10027
|
var De = {
|
10028
10028
|
USER_AGENT: `${Wc.title} ${Wc.version}`,
|
10029
10029
|
// SIP scheme.
|
@@ -12475,7 +12475,7 @@ function yt() {
|
|
12475
12475
|
}
|
12476
12476
|
}, et.cloneArray = (n) => n && n.slice() || [], et.cloneObject = (n, p = {}) => n && Object.assign({}, n) || p, et;
|
12477
12477
|
}
|
12478
|
-
const l_ = Ut, xm =
|
12478
|
+
const l_ = Ut, xm = at, St = De, rt = yt(), Xc = Du(), Mm = ls(), Da = new xm("SIPMessage");
|
12479
12479
|
class Fo {
|
12480
12480
|
constructor(s, r, o, a, t, n) {
|
12481
12481
|
if (!s || !r || !o)
|
@@ -12833,7 +12833,7 @@ var Pt = {
|
|
12833
12833
|
IncomingRequest: km,
|
12834
12834
|
IncomingResponse: Lm
|
12835
12835
|
};
|
12836
|
-
const Gl = /* @__PURE__ */ Xe(Pt), $m =
|
12836
|
+
const Gl = /* @__PURE__ */ Xe(Pt), $m = at, hs = yt(), Yt = new $m("DigestAuthentication");
|
12837
12837
|
var a_ = class {
|
12838
12838
|
constructor(s) {
|
12839
12839
|
this._credentials = s, this._cnonce = null, this._nc = 0, this._ncHex = "00000000", this._algorithm = null, this._realm = null, this._nonce = null, this._opaque = null, this._stale = null, this._qop = null, this._method = null, this._uri = null, this._ha1 = null, this._response = null;
|
@@ -12912,7 +12912,7 @@ var Uu = {
|
|
12912
12912
|
PROVISIONAL_RESPONSE_INTERVAL: 6e4
|
12913
12913
|
// See RFC 3261 Section 13.3.1.1
|
12914
12914
|
};
|
12915
|
-
const Mi = /* @__PURE__ */ Xe(Uu), ul = ft.EventEmitter, cl =
|
12915
|
+
const Mi = /* @__PURE__ */ Xe(Uu), ul = ft.EventEmitter, cl = at, Ki = De, Zc = Pt, rs = Uu, ef = new cl("NonInviteClientTransaction"), Wl = new cl("InviteClientTransaction"), jm = new cl("AckClientTransaction"), tf = new cl("NonInviteServerTransaction"), Kl = new cl("InviteServerTransaction"), he = {
|
12916
12916
|
// Transaction states.
|
12917
12917
|
STATUS_TRYING: 1,
|
12918
12918
|
STATUS_PROCEEDING: 2,
|
@@ -13236,7 +13236,7 @@ var pr = {
|
|
13236
13236
|
InviteServerTransaction: Wm,
|
13237
13237
|
checkTransaction: Km
|
13238
13238
|
};
|
13239
|
-
const Bt = /* @__PURE__ */ Xe(pr), Ym =
|
13239
|
+
const Bt = /* @__PURE__ */ Xe(pr), Ym = at, sf = De, zm = a_, Na = pr, Jm = new Ym("RequestSender"), Ua = {
|
13240
13240
|
onRequestTimeout: () => {
|
13241
13241
|
},
|
13242
13242
|
onTransportError: () => {
|
@@ -13324,7 +13324,7 @@ var mr = class {
|
|
13324
13324
|
this._eventHandlers.onReceiveResponse(s);
|
13325
13325
|
}
|
13326
13326
|
};
|
13327
|
-
const u_ = /* @__PURE__ */ Xe(mr), Xm =
|
13327
|
+
const u_ = /* @__PURE__ */ Xe(mr), Xm = at, Pa = yt(), pn = De, nf = Pt, rf = mr, ki = new Xm("Registrator"), Yl = 10;
|
13328
13328
|
var Qm = class {
|
13329
13329
|
constructor(s, r) {
|
13330
13330
|
this._reg_id = 1, this._ua = s, this._transport = r, this._registrar = s.configuration.registrar_server, this._expires = s.configuration.register_expires, this._call_id = Pa.createRandomToken(22), this._cseq = 0, this._to_uri = s.configuration.uri, this._registrationTimer = null, this._registering = !1, this._registered = !1, this._contact = this._ua.contact.toString(), this._contact += ";+sip.ice", this._extraHeaders = [], this._extraContactParams = "", this._sipInstance = `"<urn:uuid:${this._ua.configuration.instance_id}>"`, this._contact += `;reg-id=${this._reg_id}`, this._contact += `;+sip.instance=${this._sipInstance}`;
|
@@ -13553,7 +13553,7 @@ var c_ = class {
|
|
13553
13553
|
}, 1e3)) : s.status_code >= 200 && s.status_code < 300 ? this._eventHandlers.onSuccessResponse(s) : s.status_code >= 300 && this._eventHandlers.onErrorResponse(s);
|
13554
13554
|
}
|
13555
13555
|
};
|
13556
|
-
const rg = /* @__PURE__ */ Xe(c_), ig =
|
13556
|
+
const rg = /* @__PURE__ */ Xe(c_), ig = at, lf = Pt, Ms = De, Li = pr, lg = c_, ka = yt(), La = new ig("Dialog"), ks = {
|
13557
13557
|
// Dialog states.
|
13558
13558
|
STATUS_EARLY: 1,
|
13559
13559
|
STATUS_CONFIRMED: 2,
|
@@ -13684,7 +13684,7 @@ var f_ = class {
|
|
13684
13684
|
};
|
13685
13685
|
const Jl = /* @__PURE__ */ Xe(f_);
|
13686
13686
|
var Pu = { exports: {} };
|
13687
|
-
const og = ft.EventEmitter, ag =
|
13687
|
+
const og = ft.EventEmitter, ag = at, ug = De, cg = Es, of = yt(), fg = new ag("RTCSession:DTMF"), __ = {
|
13688
13688
|
MIN_DURATION: 70,
|
13689
13689
|
MAX_DURATION: 6e3,
|
13690
13690
|
DEFAULT_DURATION: 100,
|
@@ -13826,7 +13826,7 @@ var d_ = class extends hg {
|
|
13826
13826
|
});
|
13827
13827
|
}
|
13828
13828
|
};
|
13829
|
-
const pu = /* @__PURE__ */ Xe(d_), gg =
|
13829
|
+
const pu = /* @__PURE__ */ Xe(d_), gg = at, af = De, Tg = new gg("RTCSession:ReferNotifier"), $a = {
|
13830
13830
|
event_type: "refer",
|
13831
13831
|
body_type: "message/sipfrag;version=2.0",
|
13832
13832
|
expires: 300
|
@@ -13856,7 +13856,7 @@ var p_ = class {
|
|
13856
13856
|
});
|
13857
13857
|
}
|
13858
13858
|
};
|
13859
|
-
const vg = /* @__PURE__ */ Xe(p_), Eg = ft.EventEmitter, Sg =
|
13859
|
+
const vg = /* @__PURE__ */ Xe(p_), Eg = ft.EventEmitter, Sg = at, $i = De, yg = ls(), uf = yt(), mn = new Sg("RTCSession:ReferSubscriber");
|
13860
13860
|
var m_ = class extends Eg {
|
13861
13861
|
constructor(s) {
|
13862
13862
|
super(), this._id = null, this._session = s;
|
@@ -13947,7 +13947,7 @@ var m_ = class extends Eg {
|
|
13947
13947
|
});
|
13948
13948
|
}
|
13949
13949
|
};
|
13950
|
-
const Ag = /* @__PURE__ */ Xe(m_), Cg = ft.EventEmitter, cf = Ut, Rg =
|
13950
|
+
const Ag = /* @__PURE__ */ Xe(m_), Cg = ft.EventEmitter, cf = Ut, Rg = at, fe = De, gn = Es, ff = pr, Be = yt(), Hi = Uu, Ig = Pt, Xl = f_, bg = mr, Mt = h_, _f = d_, wg = p_, Og = m_, hf = vs(), Y = new Rg("RTCSession"), Z = {
|
13951
13951
|
// RTCSession states.
|
13952
13952
|
STATUS_NULL: 0,
|
13953
13953
|
STATUS_INVITE_SENT: 1,
|
@@ -15274,7 +15274,7 @@ var g_ = class mu extends Cg {
|
|
15274
15274
|
});
|
15275
15275
|
}
|
15276
15276
|
};
|
15277
|
-
const Dg = /* @__PURE__ */ Xe(g_), Ng = ft.EventEmitter, Ug =
|
15277
|
+
const Dg = /* @__PURE__ */ Xe(g_), Ng = ft.EventEmitter, Ug = at, Ha = De, Pg = Pt, Fi = yt(), xg = mr, df = Es, Mg = vs(), Zl = new Ug("Message");
|
15278
15278
|
var kg = class extends Ng {
|
15279
15279
|
constructor(s) {
|
15280
15280
|
super(), this._ua = s, this._request = null, this._closed = !1, this._direction = null, this._local_identity = null, this._remote_identity = null, this._is_replied = !1, this._data = {};
|
@@ -15395,7 +15395,7 @@ var kg = class extends Ng {
|
|
15395
15395
|
});
|
15396
15396
|
}
|
15397
15397
|
};
|
15398
|
-
const Lg = ft.EventEmitter, $g =
|
15398
|
+
const Lg = ft.EventEmitter, $g = at, Fa = De, Hg = Pt, ji = yt(), Fg = mr, pf = Es, eo = new $g("Options");
|
15399
15399
|
var jg = class extends Lg {
|
15400
15400
|
constructor(s) {
|
15401
15401
|
super(), this._ua = s, this._request = null, this._closed = !1, this._direction = null, this._local_identity = null, this._remote_identity = null, this._is_replied = !1, this._data = {};
|
@@ -15515,7 +15515,7 @@ var jg = class extends Lg {
|
|
15515
15515
|
});
|
15516
15516
|
}
|
15517
15517
|
}, xu = {};
|
15518
|
-
const Vg =
|
15518
|
+
const Vg = at, ja = yt(), qg = ls(), Vi = new Vg("Socket");
|
15519
15519
|
xu.isSocket = (c) => {
|
15520
15520
|
if (Array.isArray(c))
|
15521
15521
|
return !1;
|
@@ -15541,7 +15541,7 @@ xu.isSocket = (c) => {
|
|
15541
15541
|
}
|
15542
15542
|
return !0;
|
15543
15543
|
};
|
15544
|
-
const Bg =
|
15544
|
+
const Bg = at, Gg = xu, mf = De, Nt = new Bg("Transport"), Vt = {
|
15545
15545
|
// Transport status.
|
15546
15546
|
STATUS_CONNECTED: 0,
|
15547
15547
|
STATUS_CONNECTING: 1,
|
@@ -15693,7 +15693,7 @@ ${s}
|
|
15693
15693
|
};
|
15694
15694
|
const Wg = /* @__PURE__ */ Xe(T_);
|
15695
15695
|
var Mu = {};
|
15696
|
-
const Kg =
|
15696
|
+
const Kg = at, gu = ls(), Tu = Pt, to = new Kg("Parser");
|
15697
15697
|
Mu.parseMessage = (c, s) => {
|
15698
15698
|
let r, o, a = c.indexOf(`\r
|
15699
15699
|
`);
|
@@ -15820,7 +15820,7 @@ function zg(c, s, r, o) {
|
|
15820
15820
|
error: `error parsing header "${n}"`
|
15821
15821
|
} : !0;
|
15822
15822
|
}
|
15823
|
-
const Jg =
|
15823
|
+
const Jg = at, v_ = De, gf = Pt, ku = yt(), Lu = new Jg("sanityCheck"), Xg = [lT], Qg = [
|
15824
15824
|
eT,
|
15825
15825
|
tT,
|
15826
15826
|
sT,
|
@@ -16088,7 +16088,7 @@ Zi.load = (c, s) => {
|
|
16088
16088
|
throw new Ba.ConfigurationError(r, o);
|
16089
16089
|
}
|
16090
16090
|
};
|
16091
|
-
const aT = ft.EventEmitter, uT =
|
16091
|
+
const aT = ft.EventEmitter, uT = at, mt = De, cT = Qm, vf = g_, Ef = kg, Sf = jg, Ga = pr, fT = T_, no = yt(), _T = Es, hT = vs(), dT = Mu, Wa = Pt, pT = S_, Ka = Zi, Ve = new uT("UA"), vt = {
|
16092
16092
|
// UA status codes.
|
16093
16093
|
STATUS_INIT: 0,
|
16094
16094
|
STATUS_READY: 1,
|
@@ -17918,7 +17918,7 @@ class Po extends ft.EventEmitter {
|
|
17918
17918
|
return sender.dtmf
|
17919
17919
|
}*/
|
17920
17920
|
requestAudioAndVideoPermissions() {
|
17921
|
-
return this.loadStream();
|
17921
|
+
return console.log("MMM requestAudioAndVideoPermissions"), this.loadStream();
|
17922
17922
|
}
|
17923
17923
|
async loadStream() {
|
17924
17924
|
const s = {
|
@@ -17926,7 +17926,7 @@ class Po extends ft.EventEmitter {
|
|
17926
17926
|
video: !0
|
17927
17927
|
};
|
17928
17928
|
try {
|
17929
|
-
this.stream = await navigator.mediaDevices.getUserMedia(s)
|
17929
|
+
this.stream = await navigator.mediaDevices.getUserMedia(s);
|
17930
17930
|
} catch {
|
17931
17931
|
try {
|
17932
17932
|
s.video = !1, this.stream = await navigator.mediaDevices.getUserMedia(s);
|
@@ -18049,7 +18049,7 @@ class Po extends ft.EventEmitter {
|
|
18049
18049
|
const d = _.streams[0].getAudioTracks(), g = _.streams[0].getVideoTracks(), T = [];
|
18050
18050
|
d[0] && T.push(d[0]), g[0] && T.push(g[0]);
|
18051
18051
|
const E = new MediaStream(T);
|
18052
|
-
s.stream = E;
|
18052
|
+
s.stream = E, this._ua.emit("memberJoin", s.memberInfo);
|
18053
18053
|
};
|
18054
18054
|
let t, n = [];
|
18055
18055
|
const p = (_) => {
|
@@ -18152,14 +18152,17 @@ class Po extends ft.EventEmitter {
|
|
18152
18152
|
body: JSON.stringify(o),
|
18153
18153
|
eventHandlers: {
|
18154
18154
|
onSuccessResponse: async (t) => {
|
18155
|
-
t.status_code === 200 && (this.subscribeSent = !0, this.lastTrickleReceived && !this.isConfigureSent && this.
|
18155
|
+
t.status_code === 200 && (this.subscribeSent = !0, this.lastTrickleReceived && !this.isConfigureSent && (this.addTracks(this.stream.getTracks()), this._ua.emit("changeMainVideoStream", {
|
18156
|
+
name: this.display_name,
|
18157
|
+
stream: this.stream
|
18158
|
+
}), this._sendConfigureMessage({
|
18156
18159
|
audio: !0,
|
18157
18160
|
video: !0
|
18158
18161
|
}).then(() => {
|
18159
|
-
}));
|
18162
|
+
})));
|
18160
18163
|
}
|
18161
18164
|
}
|
18162
|
-
}), this.publisherSubscribeSent = !0
|
18165
|
+
}), this.publisherSubscribeSent = !0;
|
18163
18166
|
});
|
18164
18167
|
}
|
18165
18168
|
if (this._is_canceled) {
|
@@ -19077,7 +19080,7 @@ a=path:${s.getHeader("Use-Path")} msrp://${this._ua._configuration.authorization
|
|
19077
19080
|
});
|
19078
19081
|
}
|
19079
19082
|
}
|
19080
|
-
const
|
19083
|
+
const ut = console, Fs = {
|
19081
19084
|
// UA status codes.
|
19082
19085
|
STATUS_INIT: 0,
|
19083
19086
|
STATUS_READY: 1,
|
@@ -19101,7 +19104,7 @@ class OT extends wT {
|
|
19101
19104
|
return super.call(s, r);
|
19102
19105
|
}
|
19103
19106
|
joinVideoCall(s, r, o) {
|
19104
|
-
|
19107
|
+
ut.debug("call()");
|
19105
19108
|
const a = new Po(this);
|
19106
19109
|
return a.connect(s, r, o), a;
|
19107
19110
|
}
|
@@ -19121,7 +19124,7 @@ class OT extends wT {
|
|
19121
19124
|
min_interval: this._configuration.connection_recovery_min_interval
|
19122
19125
|
}), this._transport.onconnecting = DT.bind(this), this._transport.onconnect = NT.bind(this), this._transport.ondisconnect = UT.bind(this), this._transport.ondata = PT.bind(this);
|
19123
19126
|
} catch (a) {
|
19124
|
-
throw
|
19127
|
+
throw ut.warn(a), new Hs.ConfigurationError("sockets", this._configuration.sockets);
|
19125
19128
|
}
|
19126
19129
|
if (delete this._configuration.sockets, this._configuration.authorization_user || (this._configuration.authorization_user = this._configuration.uri.user), !this._configuration.registrar_server) {
|
19127
19130
|
const a = this._configuration.uri.clone();
|
@@ -19154,21 +19157,21 @@ class OT extends wT {
|
|
19154
19157
|
writable: !1,
|
19155
19158
|
configurable: !1
|
19156
19159
|
}));
|
19157
|
-
|
19160
|
+
ut.debug("configuration parameters after validation:");
|
19158
19161
|
for (const a in this._configuration)
|
19159
19162
|
if (Object.prototype.hasOwnProperty.call(Zi.settings, a))
|
19160
19163
|
switch (a) {
|
19161
19164
|
case "uri":
|
19162
19165
|
case "registrar_server":
|
19163
|
-
|
19166
|
+
ut.debug(`- ${a}: ${this._configuration[a]}`);
|
19164
19167
|
break;
|
19165
19168
|
case "password":
|
19166
19169
|
case "ha1":
|
19167
19170
|
case "authorization_jwt":
|
19168
|
-
|
19171
|
+
ut.debug(`- ${a}: NOT SHOWN`);
|
19169
19172
|
break;
|
19170
19173
|
default:
|
19171
|
-
|
19174
|
+
ut.debug(`- ${a}: ${JSON.stringify(this._configuration[a])}`);
|
19172
19175
|
}
|
19173
19176
|
}
|
19174
19177
|
/*call (target, options) {
|
@@ -19201,10 +19204,10 @@ class OT extends wT {
|
|
19201
19204
|
delete this._janus_sessions[s.id];
|
19202
19205
|
}
|
19203
19206
|
receiveRequest(s) {
|
19204
|
-
var
|
19207
|
+
var t, n;
|
19205
19208
|
const r = s.method;
|
19206
19209
|
if (console.log("-----------"), s.ruri.user !== this._configuration.uri.user && s.ruri.user !== this._contact.uri.user) {
|
19207
|
-
|
19210
|
+
ut.debug("Request-URI does not point to us"), s.method !== De.ACK && s.reply_sl(404);
|
19208
19211
|
return;
|
19209
19212
|
}
|
19210
19213
|
if (s.ruri.scheme === De.SIPS) {
|
@@ -19230,30 +19233,42 @@ class OT extends wT {
|
|
19230
19233
|
return;
|
19231
19234
|
}
|
19232
19235
|
let o, a;
|
19233
|
-
|
19234
|
-
|
19235
|
-
|
19236
|
+
if (s.to_tag)
|
19237
|
+
if (o = this._findDialog(s.call_id, s.from_tag, s.to_tag), o)
|
19238
|
+
o.receiveRequest(s);
|
19239
|
+
else if (r === De.NOTIFY)
|
19240
|
+
if (a = this._findSession(s), a)
|
19241
|
+
a.receiveRequest(s);
|
19242
|
+
else {
|
19243
|
+
if (s.body) {
|
19244
|
+
const p = JSON.parse(s.body) || {};
|
19245
|
+
(n = (t = p.plugindata) == null ? void 0 : t.data) != null && n.publishers && Object.values(this._janus_sessions)[0].receivePublishers(p);
|
19246
|
+
}
|
19247
|
+
s.reply(200);
|
19248
|
+
}
|
19249
|
+
else
|
19250
|
+
r !== De.ACK && s.reply(481);
|
19236
19251
|
else
|
19237
19252
|
switch (r) {
|
19238
19253
|
case De.INVITE:
|
19239
19254
|
if (window.RTCPeerConnection)
|
19240
19255
|
if (s.hasHeader("replaces")) {
|
19241
|
-
const
|
19256
|
+
const p = s.replaces;
|
19242
19257
|
o = this._findDialog(
|
19243
|
-
|
19244
|
-
|
19245
|
-
|
19258
|
+
p.call_id,
|
19259
|
+
p.from_tag,
|
19260
|
+
p.to_tag
|
19246
19261
|
), o ? (a = o.owner, a.isEnded() ? s.reply(603) : a.receiveRequest(s)) : s.reply(481);
|
19247
19262
|
} else
|
19248
19263
|
s.body.search(/MSRP/ig) > -1 ? (a = new Ja(this), a.init_incoming(s)) : s.body.search(/JANUS/ig) > -1 || (a = new Dg(this), a.init_incoming(s));
|
19249
19264
|
else
|
19250
|
-
|
19265
|
+
ut.warn("INVITE received but WebRTC is not supported"), s.reply(488);
|
19251
19266
|
break;
|
19252
19267
|
case De.BYE:
|
19253
19268
|
s.reply(481);
|
19254
19269
|
break;
|
19255
19270
|
case De.CANCEL:
|
19256
|
-
a = this._findSession(s), a ? a.receiveRequest(s) :
|
19271
|
+
a = this._findSession(s), a ? a.receiveRequest(s) : ut.debug("received CANCEL request for a non existent session");
|
19257
19272
|
break;
|
19258
19273
|
case De.ACK:
|
19259
19274
|
break;
|
@@ -19269,35 +19284,35 @@ class OT extends wT {
|
|
19269
19284
|
}
|
19270
19285
|
}
|
19271
19286
|
startMSRP(s, r) {
|
19272
|
-
|
19287
|
+
ut.debug("startMSRP()", r);
|
19273
19288
|
const o = new Ja(this);
|
19274
19289
|
return o.connect(s), o;
|
19275
19290
|
}
|
19276
19291
|
startJanus(s, r) {
|
19277
|
-
|
19292
|
+
ut.debug("startJanus()", r);
|
19278
19293
|
const o = new Ja(this);
|
19279
19294
|
return o.connect(s), o;
|
19280
19295
|
}
|
19281
19296
|
terminateMSRPSessions(s) {
|
19282
|
-
|
19297
|
+
ut.debug("terminateSessions()");
|
19283
19298
|
for (const r in this._msrp_sessions)
|
19284
19299
|
this._msrp_sessions[r].isEnded() || this._msrp_sessions[r].terminate(s);
|
19285
19300
|
}
|
19286
19301
|
terminateJanusSessions(s) {
|
19287
|
-
|
19302
|
+
ut.debug("terminateSessions()");
|
19288
19303
|
for (const r in this._janus_sessions)
|
19289
19304
|
this._janus_sessions[r].isEnded() || this._janus_sessions[r].terminate(s);
|
19290
19305
|
}
|
19291
19306
|
stop() {
|
19292
|
-
if (
|
19293
|
-
|
19307
|
+
if (ut.debug("stop()"), this._dynConfiguration = {}, this._status === Fs.STATUS_USER_CLOSED) {
|
19308
|
+
ut.debug("UA already closed");
|
19294
19309
|
return;
|
19295
19310
|
}
|
19296
19311
|
this._registrator.close();
|
19297
19312
|
const s = Object.keys(this._sessions).length;
|
19298
19313
|
for (const o in this._sessions)
|
19299
19314
|
if (Object.prototype.hasOwnProperty.call(this._sessions, o)) {
|
19300
|
-
|
19315
|
+
ut.debug(`closing session ${o}`);
|
19301
19316
|
try {
|
19302
19317
|
this._sessions[o].terminate();
|
19303
19318
|
} catch (a) {
|
@@ -19306,7 +19321,7 @@ class OT extends wT {
|
|
19306
19321
|
}
|
19307
19322
|
for (const o in this._msrp_sessions)
|
19308
19323
|
if (Object.prototype.hasOwnProperty.call(this._msrp_sessions, o)) {
|
19309
|
-
|
19324
|
+
ut.debug(`closing session ${o}`);
|
19310
19325
|
try {
|
19311
19326
|
this._msrp_sessions[o].terminate();
|
19312
19327
|
} catch (a) {
|
@@ -19315,7 +19330,7 @@ class OT extends wT {
|
|
19315
19330
|
}
|
19316
19331
|
for (const o in this._janus_sessions)
|
19317
19332
|
if (Object.prototype.hasOwnProperty.call(this._janus_sessions, o)) {
|
19318
|
-
|
19333
|
+
ut.debug(`closing session ${o}`);
|
19319
19334
|
try {
|
19320
19335
|
this._janus_sessions[o].terminate();
|
19321
19336
|
} catch (a) {
|
@@ -19457,7 +19472,7 @@ function LT(c) {
|
|
19457
19472
|
function A_() {
|
19458
19473
|
return /Mobi|Android|iPhone/i.test(navigator.userAgent);
|
19459
19474
|
}
|
19460
|
-
const $T =
|
19475
|
+
const $T = at, HT = ls(), Ot = new $T("WebSocketInterface");
|
19461
19476
|
var FT = class {
|
19462
19477
|
constructor(s) {
|
19463
19478
|
Ot.debug('new() [url:"%s"]', s), this._url = s, this._sip_uri = null, this._via_transport = null, this._ws = null;
|
@@ -23201,6 +23216,18 @@ class zv {
|
|
23201
23216
|
isMerging: !0
|
23202
23217
|
}), o.refer(a.remote_identity.uri.toString(), { replaces: a }), this.updateCall(o));
|
23203
23218
|
}
|
23219
|
+
mergeCallByIds(s, r) {
|
23220
|
+
const o = Object.values(this.extendedCalls).find((t) => t._id === s), a = Object.values(this.extendedCalls).find((t) => t._id === r);
|
23221
|
+
if (!o || !a)
|
23222
|
+
throw new Error("Call ID is not provided");
|
23223
|
+
this.updateCallStatus({
|
23224
|
+
callId: s,
|
23225
|
+
isMerging: !0
|
23226
|
+
}), this.updateCallStatus({
|
23227
|
+
callId: r,
|
23228
|
+
isMerging: !0
|
23229
|
+
}), o.refer(a.remote_identity.uri.toString(), { replaces: a }), this.updateCall(o);
|
23230
|
+
}
|
23204
23231
|
// TODO: Use this method in demo
|
23205
23232
|
setDND(s) {
|
23206
23233
|
this.isDNDEnabled = s, this.context.emit("changeIsDND", s);
|
@@ -23443,6 +23470,9 @@ class Jv {
|
|
23443
23470
|
this.sipOptions
|
23444
23471
|
), console.log("video call");
|
23445
23472
|
}
|
23473
|
+
stop(s = {}) {
|
23474
|
+
this.context.terminateJanusSessions(s);
|
23475
|
+
}
|
23446
23476
|
/*public invite1 (roomId: string) {
|
23447
23477
|
const inviteData = {
|
23448
23478
|
janus: 'invite',
|