@vgroup/dialbox 0.2.70 → 0.2.72
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/esm2020/lib/components/call-progress/call-progress.component.mjs +20 -7
- package/esm2020/lib/service/extension.service.mjs +3 -3
- package/fesm2015/vgroup-dialbox.mjs +17 -8
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +21 -8
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +2 -1
- package/lib/service/extension.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -612,13 +612,13 @@ class ExtensionService {
|
|
|
612
612
|
const httpOptions = { headers: headers };
|
|
613
613
|
return this.http.post(environment.apiUrl + '/utilities/ext/ur/hold/participant', payload, httpOptions);
|
|
614
614
|
}
|
|
615
|
-
getAllParticipants(
|
|
615
|
+
getAllParticipants(conferenceSid) {
|
|
616
616
|
const headers = new HttpHeaders({
|
|
617
617
|
'Content-Type': 'application/json',
|
|
618
618
|
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
619
619
|
});
|
|
620
620
|
const httpOptions = { headers: headers };
|
|
621
|
-
return this.http.get(environment.apiUrl + `/utilities/ext/ur/all/participent/${
|
|
621
|
+
return this.http.get(environment.apiUrl + `/utilities/ext/ur/all/participent/${conferenceSid}`, httpOptions);
|
|
622
622
|
}
|
|
623
623
|
updateHoldUnhold(payload) {
|
|
624
624
|
const params = {
|
|
@@ -2125,15 +2125,16 @@ class CallProgressComponent {
|
|
|
2125
2125
|
yield this.connectToDevice(tokenData.token, callData);
|
|
2126
2126
|
yield this.pollCallStatus(callAuthId);
|
|
2127
2127
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
2128
|
+
var _b, _c;
|
|
2128
2129
|
try {
|
|
2129
|
-
|
|
2130
|
+
this.addRes = yield this.addParticipantToCall({
|
|
2130
2131
|
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2131
2132
|
route: "OUTGOING",
|
|
2132
2133
|
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
2133
2134
|
conferenceId: this.conferenceId
|
|
2134
2135
|
});
|
|
2135
|
-
this.callData = Object.assign(Object.assign({}, this.callData), { participantId: addRes === null ||
|
|
2136
|
-
console.log('Initial participantId:', addRes === null ||
|
|
2136
|
+
this.callData = Object.assign(Object.assign({}, this.callData), { participantId: (_b = this.addRes) === null || _b === void 0 ? void 0 : _b.participantId });
|
|
2137
|
+
console.log('Initial participantId:', (_c = this.addRes) === null || _c === void 0 ? void 0 : _c.participantId);
|
|
2137
2138
|
}
|
|
2138
2139
|
catch (e) {
|
|
2139
2140
|
console.error('Error adding initial participant:', e);
|
|
@@ -2369,8 +2370,10 @@ class CallProgressComponent {
|
|
|
2369
2370
|
this.GetContactsList();
|
|
2370
2371
|
}
|
|
2371
2372
|
addRemoveParticipant() {
|
|
2373
|
+
var _a;
|
|
2374
|
+
const conferenceSId = (_a = this.addRes) === null || _a === void 0 ? void 0 : _a.conferenceSid;
|
|
2372
2375
|
this.isAddRemoveParticipant = !this.isAddRemoveParticipant;
|
|
2373
|
-
this.getAllParticipants();
|
|
2376
|
+
this.getAllParticipants(conferenceSId);
|
|
2374
2377
|
}
|
|
2375
2378
|
callContact(contact) {
|
|
2376
2379
|
var _a, _b, _c, _d;
|
|
@@ -2400,6 +2403,12 @@ class CallProgressComponent {
|
|
|
2400
2403
|
// Close contacts panel and show ring animation
|
|
2401
2404
|
this.showContactsPanel = false;
|
|
2402
2405
|
this.showRingAnimation = true;
|
|
2406
|
+
// Update UI to reflect the new outbound leg being dialed
|
|
2407
|
+
const contactName = [contact === null || contact === void 0 ? void 0 : contact.firstName, contact === null || contact === void 0 ? void 0 : contact.middleName, contact === null || contact === void 0 ? void 0 : contact.lastName]
|
|
2408
|
+
.filter(Boolean)
|
|
2409
|
+
.join(' ');
|
|
2410
|
+
this.callData = Object.assign(Object.assign({}, this.callData), { phone: phoneNumber, displayNum: phoneNumber, name: contactName || phoneNumber, img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg' });
|
|
2411
|
+
this.cdr.detectChanges();
|
|
2403
2412
|
// Get the conference ID from the current call or use the stored one
|
|
2404
2413
|
const conferenceId = this.conferenceId;
|
|
2405
2414
|
if (!conferenceId) {
|
|
@@ -2432,8 +2441,8 @@ class CallProgressComponent {
|
|
|
2432
2441
|
}
|
|
2433
2442
|
});
|
|
2434
2443
|
}
|
|
2435
|
-
getAllParticipants() {
|
|
2436
|
-
this.extensionService.getAllParticipants(
|
|
2444
|
+
getAllParticipants(conferenceSid) {
|
|
2445
|
+
this.extensionService.getAllParticipants(conferenceSid).subscribe((res) => {
|
|
2437
2446
|
console.log(res);
|
|
2438
2447
|
});
|
|
2439
2448
|
}
|