@vgroup/dialbox 0.3.88 → 0.3.89
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.
|
@@ -1807,7 +1807,7 @@ class CallProgressComponent {
|
|
|
1807
1807
|
// Check if there's an active ongoing call
|
|
1808
1808
|
this.conferenceId = this.newIncomingCallsList[0].conferenceId;
|
|
1809
1809
|
this.newIncomingCallsList.forEach((res) => __awaiter(this, void 0, void 0, function* () {
|
|
1810
|
-
var _d, _e, _f, _g, _h, _j, _k;
|
|
1810
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1811
1811
|
if (this.currentCallList.length > 0) {
|
|
1812
1812
|
let index = this.currentCallList.findIndex((item) => item.id == res.id);
|
|
1813
1813
|
if (index == -1 && !res.isLeft) {
|
|
@@ -1821,17 +1821,19 @@ class CallProgressComponent {
|
|
|
1821
1821
|
yield this.onholdOrUnholdParticipant({
|
|
1822
1822
|
participantId: [(_h = this.currentCall) === null || _h === void 0 ? void 0 : _h.participantId],
|
|
1823
1823
|
conferenceId: this.conferenceId,
|
|
1824
|
-
hold: false
|
|
1824
|
+
hold: false,
|
|
1825
|
+
isConference: (_j = this.currentCall) === null || _j === void 0 ? void 0 : _j.isConference
|
|
1825
1826
|
});
|
|
1826
1827
|
this.currentCallList[0].isHold = false;
|
|
1827
1828
|
}
|
|
1828
|
-
else if (((
|
|
1829
|
+
else if (((_k = this.currentCall) === null || _k === void 0 ? void 0 : _k.isHold) && ((_l = this.currentCall) === null || _l === void 0 ? void 0 : _l.isConference)) {
|
|
1829
1830
|
let conferenceCalllist = this.currentCallList.filter((item) => item.isConference);
|
|
1830
1831
|
if (conferenceCalllist.length > 0) {
|
|
1831
1832
|
yield this.onholdOrUnholdParticipant({
|
|
1832
1833
|
participantId: conferenceCalllist.map((item) => item.participantId),
|
|
1833
1834
|
conferenceId: this.conferenceId,
|
|
1834
|
-
hold: false
|
|
1835
|
+
hold: false,
|
|
1836
|
+
isConference: (_m = this.currentCall) === null || _m === void 0 ? void 0 : _m.isConference
|
|
1835
1837
|
});
|
|
1836
1838
|
this.currentCallList.forEach((item) => {
|
|
1837
1839
|
if (item.isConference) {
|
|
@@ -1877,21 +1879,9 @@ class CallProgressComponent {
|
|
|
1877
1879
|
}
|
|
1878
1880
|
}
|
|
1879
1881
|
getStatus(res) {
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
}
|
|
1884
|
-
else {
|
|
1885
|
-
return false;
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
else if (res.direction == "outgoing-call") {
|
|
1889
|
-
if (res.status == "answered" || res.status == "participant-hold" || res.status == "participant-mute" || res.status == "participant-join" || res.status == "queued" || res.status == "in-progress" || res.status == "ringing" || res.status == "initiated") {
|
|
1890
|
-
return true;
|
|
1891
|
-
}
|
|
1892
|
-
else {
|
|
1893
|
-
return false;
|
|
1894
|
-
}
|
|
1882
|
+
const statusList = ["answered", "participant-hold", "participant-mute", "participant-join", "queued", "in-progress", "ringing", "initiated"];
|
|
1883
|
+
if (statusList.includes(res.status)) {
|
|
1884
|
+
return true;
|
|
1895
1885
|
}
|
|
1896
1886
|
else {
|
|
1897
1887
|
return false;
|
|
@@ -1993,7 +1983,8 @@ class CallProgressComponent {
|
|
|
1993
1983
|
this.onholdOrUnholdParticipant({
|
|
1994
1984
|
participantId: [c.participantId],
|
|
1995
1985
|
conferenceId: this.conferenceId,
|
|
1996
|
-
hold: !c.hold
|
|
1986
|
+
hold: !c.hold,
|
|
1987
|
+
isConference: c === null || c === void 0 ? void 0 : c.isConference
|
|
1997
1988
|
});
|
|
1998
1989
|
c.hold = !c.hold;
|
|
1999
1990
|
this.cdr.detectChanges();
|
|
@@ -2192,7 +2183,7 @@ class CallProgressComponent {
|
|
|
2192
2183
|
// }
|
|
2193
2184
|
// }
|
|
2194
2185
|
endCall(isAllCallEnd) {
|
|
2195
|
-
var _a;
|
|
2186
|
+
var _a, _b;
|
|
2196
2187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2197
2188
|
console.log('endCall() called');
|
|
2198
2189
|
// console.log('Current call:', this.call?.parameters['From']);
|
|
@@ -2220,7 +2211,8 @@ class CallProgressComponent {
|
|
|
2220
2211
|
yield this.onholdOrUnholdParticipant({
|
|
2221
2212
|
participantId: [(_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.participantId],
|
|
2222
2213
|
conferenceId: this.conferenceId,
|
|
2223
|
-
hold: false
|
|
2214
|
+
hold: false,
|
|
2215
|
+
isConference: (_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.isConference
|
|
2224
2216
|
});
|
|
2225
2217
|
}
|
|
2226
2218
|
else {
|
|
@@ -2257,7 +2249,7 @@ class CallProgressComponent {
|
|
|
2257
2249
|
this.allParticipentList = this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
|
|
2258
2250
|
}
|
|
2259
2251
|
add(data) {
|
|
2260
|
-
var _a, _b, _c, _d;
|
|
2252
|
+
var _a, _b, _c, _d, _e;
|
|
2261
2253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2262
2254
|
// if(data?.status != 'ringing'){
|
|
2263
2255
|
this.conferenceId = this.twilioService.conferenceCallInfo.conferenceId;
|
|
@@ -2269,7 +2261,8 @@ class CallProgressComponent {
|
|
|
2269
2261
|
yield this.onholdOrUnholdParticipant({
|
|
2270
2262
|
participantId: ((_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.isIncomingCall) ? [(_c = this.currentCall) === null || _c === void 0 ? void 0 : _c.id] : [(_d = this.currentCall) === null || _d === void 0 ? void 0 : _d.participantId],
|
|
2271
2263
|
conferenceId: this.conferenceId,
|
|
2272
|
-
hold: true
|
|
2264
|
+
hold: true,
|
|
2265
|
+
isConference: (_e = this.currentCall) === null || _e === void 0 ? void 0 : _e.isConference
|
|
2273
2266
|
});
|
|
2274
2267
|
data.isHold = false;
|
|
2275
2268
|
}
|
|
@@ -2339,7 +2332,8 @@ class CallProgressComponent {
|
|
|
2339
2332
|
yield this.onholdOrUnholdParticipant({
|
|
2340
2333
|
participantId: [c === null || c === void 0 ? void 0 : c.participantId],
|
|
2341
2334
|
conferenceId: this.conferenceId,
|
|
2342
|
-
hold: c === null || c === void 0 ? void 0 : c.isHold
|
|
2335
|
+
hold: c === null || c === void 0 ? void 0 : c.isHold,
|
|
2336
|
+
isConference: c === null || c === void 0 ? void 0 : c.isConference
|
|
2343
2337
|
});
|
|
2344
2338
|
}
|
|
2345
2339
|
}));
|
|
@@ -2481,7 +2475,8 @@ class CallProgressComponent {
|
|
|
2481
2475
|
yield this.onholdOrUnholdParticipant({
|
|
2482
2476
|
participantId: [c === null || c === void 0 ? void 0 : c.participantId],
|
|
2483
2477
|
conferenceId: this.conferenceId,
|
|
2484
|
-
hold: c === null || c === void 0 ? void 0 : c.isHold
|
|
2478
|
+
hold: c === null || c === void 0 ? void 0 : c.isHold,
|
|
2479
|
+
isConference: c === null || c === void 0 ? void 0 : c.isConference
|
|
2485
2480
|
});
|
|
2486
2481
|
}
|
|
2487
2482
|
else if ((callInfo === null || callInfo === void 0 ? void 0 : callInfo.isHold) && (c === null || c === void 0 ? void 0 : c.participantId) === (callInfo === null || callInfo === void 0 ? void 0 : callInfo.participantId)) {
|
|
@@ -2489,7 +2484,8 @@ class CallProgressComponent {
|
|
|
2489
2484
|
yield this.onholdOrUnholdParticipant({
|
|
2490
2485
|
participantId: [c === null || c === void 0 ? void 0 : c.participantId],
|
|
2491
2486
|
conferenceId: this.conferenceId,
|
|
2492
|
-
hold: c === null || c === void 0 ? void 0 : c.isHold
|
|
2487
|
+
hold: c === null || c === void 0 ? void 0 : c.isHold,
|
|
2488
|
+
isConference: c === null || c === void 0 ? void 0 : c.isConference
|
|
2493
2489
|
});
|
|
2494
2490
|
this.currentCall = c;
|
|
2495
2491
|
}
|
|
@@ -2543,7 +2539,8 @@ class CallProgressComponent {
|
|
|
2543
2539
|
yield this.onholdOrUnholdParticipant({
|
|
2544
2540
|
participantId: [c === null || c === void 0 ? void 0 : c.participantId],
|
|
2545
2541
|
conferenceId: this.conferenceId,
|
|
2546
|
-
hold: false
|
|
2542
|
+
hold: false,
|
|
2543
|
+
isConference: true
|
|
2547
2544
|
});
|
|
2548
2545
|
}
|
|
2549
2546
|
c.isConference = true;
|