@vgroup/dialbox 0.3.27 → 0.3.28
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.
|
@@ -2533,7 +2533,7 @@ class CallProgressComponent {
|
|
|
2533
2533
|
this.allParticipentList = this.getAllParticipants(conferenceSId);
|
|
2534
2534
|
}
|
|
2535
2535
|
callContact(contact) {
|
|
2536
|
-
var _a, _b, _c, _d, _e;
|
|
2536
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2537
2537
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2538
2538
|
console.log('Adding participant:', contact);
|
|
2539
2539
|
console.log('this.call', this.call);
|
|
@@ -2551,79 +2551,109 @@ class CallProgressComponent {
|
|
|
2551
2551
|
return;
|
|
2552
2552
|
}
|
|
2553
2553
|
try {
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2554
|
+
if (this.isConference) {
|
|
2555
|
+
let data = yield this.addParticipantToCall({
|
|
2556
|
+
from: ((_c = this.callData) === null || _c === void 0 ? void 0 : _c.from) || ((_d = this.selectedCallerId) === null || _d === void 0 ? void 0 : _d.number),
|
|
2557
|
+
route: "OUTGOING",
|
|
2558
|
+
participantNumber: phoneNumber,
|
|
2559
|
+
conferenceId: this.conferenceId
|
|
2560
|
+
});
|
|
2561
|
+
this.callData = {
|
|
2562
|
+
// ...this.callData,
|
|
2563
|
+
phone: phoneNumber,
|
|
2564
|
+
displayNum: phoneNumber,
|
|
2565
|
+
name: (contact === null || contact === void 0 ? void 0 : contact.name) || `${contact === null || contact === void 0 ? void 0 : contact.firstName} ${contact === null || contact === void 0 ? void 0 : contact.lastName}` || phoneNumber,
|
|
2566
|
+
img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg',
|
|
2567
|
+
participantId: data === null || data === void 0 ? void 0 : data.participantId,
|
|
2568
|
+
from: (_e = this.selectedCallerId) === null || _e === void 0 ? void 0 : _e.number,
|
|
2569
|
+
isIncomingCall: false,
|
|
2570
|
+
isHold: false,
|
|
2571
|
+
isLeft: false,
|
|
2572
|
+
isConference: false
|
|
2573
|
+
};
|
|
2574
|
+
this.cdr.detectChanges();
|
|
2575
|
+
console.log(this.callData, 'this.callData5656');
|
|
2576
|
+
console.log('test1111115555555555');
|
|
2577
|
+
this.currentCall = this.callData;
|
|
2578
|
+
this.currentCallList.push(Object.assign({}, this.callData));
|
|
2579
|
+
console.log("Participant added to conference:", phoneNumber);
|
|
2580
|
+
this.showRingAnimation = false;
|
|
2581
|
+
}
|
|
2582
|
+
else {
|
|
2583
|
+
this.currentCallList.forEach((c) => __awaiter(this, void 0, void 0, function* () {
|
|
2584
|
+
if ((c === null || c === void 0 ? void 0 : c.participantId) && !(c === null || c === void 0 ? void 0 : c.isHold)) {
|
|
2585
|
+
c.isHold = true;
|
|
2586
|
+
yield this.onholdOrUnholdParticipant({
|
|
2587
|
+
participantId: c === null || c === void 0 ? void 0 : c.participantId,
|
|
2588
|
+
conferenceId: this.conferenceId,
|
|
2589
|
+
hold: c === null || c === void 0 ? void 0 : c.isHold
|
|
2590
|
+
});
|
|
2591
|
+
}
|
|
2592
|
+
}));
|
|
2593
|
+
// Put current call on hold
|
|
2594
|
+
// this.heldCall = this.call;
|
|
2595
|
+
// this.isCallOnHold = true;
|
|
2596
|
+
// this.heldCall.mute(true);
|
|
2597
|
+
// this.heldCall['parameters']['caller_name'] = { ...this.callData }
|
|
2598
|
+
// this.call=null
|
|
2599
|
+
// Close contacts panel and show ring animation
|
|
2600
|
+
this.showContactsPanel = false;
|
|
2601
|
+
this.showRingAnimation = true;
|
|
2602
|
+
// Update UI to reflect the new outbound leg being dialed
|
|
2603
|
+
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]
|
|
2604
|
+
.filter(Boolean)
|
|
2605
|
+
.join(' ');
|
|
2606
|
+
// this.call['callInfo'] = JSON.parse(JSON.stringify(this.callData));
|
|
2607
|
+
// Get the conference ID from the current call or use the stored one
|
|
2608
|
+
// const conferenceId = this.conferenceId;
|
|
2609
|
+
if (this.conferenceId) {
|
|
2610
|
+
console.error("No conferenceId found for active call");
|
|
2611
|
+
swal("Error", "Cannot add participant: conference not found", "error");
|
|
2612
|
+
this.showRingAnimation = false;
|
|
2613
|
+
return;
|
|
2562
2614
|
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2615
|
+
// Add participant to the conference
|
|
2616
|
+
let data = yield this.addParticipantToCall({
|
|
2617
|
+
from: ((_f = this.callData) === null || _f === void 0 ? void 0 : _f.from) || ((_g = this.selectedCallerId) === null || _g === void 0 ? void 0 : _g.number),
|
|
2618
|
+
route: "OUTGOING",
|
|
2619
|
+
participantNumber: phoneNumber,
|
|
2620
|
+
conferenceId: this.conferenceId
|
|
2621
|
+
});
|
|
2622
|
+
// this.callData = {
|
|
2623
|
+
// ...this.callData,
|
|
2624
|
+
// participantId: ,
|
|
2625
|
+
// }
|
|
2626
|
+
this.callData = {
|
|
2627
|
+
// ...this.callData,
|
|
2628
|
+
phone: phoneNumber,
|
|
2629
|
+
displayNum: phoneNumber,
|
|
2630
|
+
name: (contact === null || contact === void 0 ? void 0 : contact.name) || `${contact === null || contact === void 0 ? void 0 : contact.firstName} ${contact === null || contact === void 0 ? void 0 : contact.lastName}` || phoneNumber,
|
|
2631
|
+
img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg',
|
|
2632
|
+
participantId: data === null || data === void 0 ? void 0 : data.participantId,
|
|
2633
|
+
from: (_h = this.selectedCallerId) === null || _h === void 0 ? void 0 : _h.number,
|
|
2634
|
+
isIncomingCall: false,
|
|
2635
|
+
isHold: false,
|
|
2636
|
+
isLeft: false,
|
|
2637
|
+
isConference: false
|
|
2638
|
+
};
|
|
2639
|
+
this.cdr.detectChanges();
|
|
2640
|
+
console.log(this.callData, 'this.callData');
|
|
2641
|
+
console.log('test111111');
|
|
2642
|
+
this.currentCall = this.callData;
|
|
2643
|
+
this.currentCallList.push(Object.assign({}, this.callData));
|
|
2644
|
+
console.log("Participant added to conference:", phoneNumber);
|
|
2583
2645
|
this.showRingAnimation = false;
|
|
2584
|
-
return;
|
|
2585
2646
|
}
|
|
2586
|
-
// Add participant to the conference
|
|
2587
|
-
let data = yield this.addParticipantToCall({
|
|
2588
|
-
from: ((_c = this.callData) === null || _c === void 0 ? void 0 : _c.from) || ((_d = this.selectedCallerId) === null || _d === void 0 ? void 0 : _d.number),
|
|
2589
|
-
route: "OUTGOING",
|
|
2590
|
-
participantNumber: phoneNumber,
|
|
2591
|
-
conferenceId: conferenceId
|
|
2592
|
-
});
|
|
2593
|
-
// this.callData = {
|
|
2594
|
-
// ...this.callData,
|
|
2595
|
-
// participantId: ,
|
|
2596
|
-
// }
|
|
2597
|
-
this.callData = {
|
|
2598
|
-
// ...this.callData,
|
|
2599
|
-
phone: phoneNumber,
|
|
2600
|
-
displayNum: phoneNumber,
|
|
2601
|
-
name: (contact === null || contact === void 0 ? void 0 : contact.name) || `${contact === null || contact === void 0 ? void 0 : contact.firstName} ${contact === null || contact === void 0 ? void 0 : contact.lastName}` || phoneNumber,
|
|
2602
|
-
img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg',
|
|
2603
|
-
participantId: data === null || data === void 0 ? void 0 : data.participantId,
|
|
2604
|
-
from: (_e = this.selectedCallerId) === null || _e === void 0 ? void 0 : _e.number,
|
|
2605
|
-
isIncomingCall: false,
|
|
2606
|
-
isHold: false,
|
|
2607
|
-
isLeft: false,
|
|
2608
|
-
isConference: false
|
|
2609
|
-
};
|
|
2610
|
-
this.cdr.detectChanges();
|
|
2611
|
-
console.log(this.callData, 'this.callData');
|
|
2612
|
-
console.log('test111111');
|
|
2613
|
-
this.currentCall = this.callData;
|
|
2614
|
-
this.currentCallList.push(Object.assign({}, this.callData));
|
|
2615
|
-
console.log("Participant added to conference:", phoneNumber);
|
|
2616
|
-
this.showRingAnimation = false;
|
|
2617
2647
|
}
|
|
2618
2648
|
catch (error) {
|
|
2619
2649
|
console.error('Error adding participant:', error);
|
|
2620
2650
|
this.showRingAnimation = false;
|
|
2621
2651
|
// Restore held call on error
|
|
2622
2652
|
if (this.heldCall) {
|
|
2623
|
-
this.call = this.heldCall;
|
|
2624
|
-
this.heldCall = undefined;
|
|
2625
|
-
this.isCallOnHold = false;
|
|
2626
|
-
this.call.mute(false);
|
|
2653
|
+
// this.call = this.heldCall;
|
|
2654
|
+
// this.heldCall = undefined;
|
|
2655
|
+
// this.isCallOnHold = false;
|
|
2656
|
+
// this.call.mute(false);
|
|
2627
2657
|
}
|
|
2628
2658
|
this.handleError(error);
|
|
2629
2659
|
}
|