@vgroup/dialbox 0.5.44 → 0.5.46
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 +4 -4
- package/esm2020/lib/dialbox.component.mjs +2 -52
- package/fesm2015/vgroup-dialbox.mjs +7 -57
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +4 -54
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1842,7 +1842,7 @@ class CallProgressComponent {
|
|
|
1842
1842
|
if (index == -1 && !res.isLeft) {
|
|
1843
1843
|
this.currentCallList.push({
|
|
1844
1844
|
...res,
|
|
1845
|
-
img: res?.
|
|
1845
|
+
img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1846
1846
|
isIncomingCall: res.direction == "incoming-call",
|
|
1847
1847
|
isHold: res.isHold,
|
|
1848
1848
|
isMute: false,
|
|
@@ -1898,7 +1898,7 @@ class CallProgressComponent {
|
|
|
1898
1898
|
else if (index != -1) {
|
|
1899
1899
|
this.currentCallList[index] = {
|
|
1900
1900
|
...res,
|
|
1901
|
-
img: res?.
|
|
1901
|
+
img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1902
1902
|
isIncomingCall: res.direction == "incoming-call",
|
|
1903
1903
|
isHold: res.isHold,
|
|
1904
1904
|
isMute: false,
|
|
@@ -1916,7 +1916,7 @@ class CallProgressComponent {
|
|
|
1916
1916
|
else if (!res.isLeft) {
|
|
1917
1917
|
this.currentCallList.push({
|
|
1918
1918
|
...res,
|
|
1919
|
-
img: res?.
|
|
1919
|
+
img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
|
|
1920
1920
|
isIncomingCall: res.direction == "incoming-call",
|
|
1921
1921
|
isHold: res.isHold,
|
|
1922
1922
|
isMute: false,
|
|
@@ -3584,9 +3584,6 @@ class DialboxComponent {
|
|
|
3584
3584
|
this.incomeingCallSocketService.connect(this.deviceId);
|
|
3585
3585
|
try {
|
|
3586
3586
|
this.incomeingCallSocketService.listen().subscribe(async (incomingCallData) => {
|
|
3587
|
-
// const data = JSON.parse(incomingCallData.data);
|
|
3588
|
-
// console.log("WS Event Received:", incomingCallData);
|
|
3589
|
-
// console.log("WS Event Received:", incomingCallData.data);
|
|
3590
3587
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3591
3588
|
incomingCallData = incomingCallData?.length > 0 ? incomingCallData.filter((item) => item.participants?.length > 0) : [];
|
|
3592
3589
|
if (!!incomingCallData?.length) {
|
|
@@ -3625,45 +3622,6 @@ class DialboxComponent {
|
|
|
3625
3622
|
this.twilioService.device?.disconnectAll();
|
|
3626
3623
|
}
|
|
3627
3624
|
}
|
|
3628
|
-
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3629
|
-
// this.initializeTwilio();
|
|
3630
|
-
// if (incomingCallData.type === "/incoming/call") {
|
|
3631
|
-
// if (incomingCallData) {
|
|
3632
|
-
// if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3633
|
-
// this._isDialpadHidden = false;
|
|
3634
|
-
// }
|
|
3635
|
-
// if (this.isCallInProgress) {
|
|
3636
|
-
// this.newIncomingCalls.push(incomingCallData);
|
|
3637
|
-
// console.log('325', incomingCallData)
|
|
3638
|
-
// this.getUserInformation(incomingCallData);
|
|
3639
|
-
// } else {
|
|
3640
|
-
// incomingCallData['isFirstCall'] = true;
|
|
3641
|
-
// console.log('dd1')
|
|
3642
|
-
// this.isCallInProgress = true;
|
|
3643
|
-
// this.isDialpadHidden = false;
|
|
3644
|
-
// this.callData.phone = incomingCallData.parameters['From'];
|
|
3645
|
-
// console.log('dd2')
|
|
3646
|
-
// this.getUserInformation(incomingCallData);
|
|
3647
|
-
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3648
|
-
// this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3649
|
-
// this.callData.isIncomingCall = true;
|
|
3650
|
-
// }
|
|
3651
|
-
// incomingCallData.on('cancel', () => {
|
|
3652
|
-
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3653
|
-
// // if(this.incomingCallsList.length == 0){
|
|
3654
|
-
// // console.log('dd3')
|
|
3655
|
-
// // this.isCallInProgress = false;
|
|
3656
|
-
// // }
|
|
3657
|
-
// });
|
|
3658
|
-
// incomingCallData.on('disconnect', () => {
|
|
3659
|
-
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3660
|
-
// // if(this.incomingCallsList.length == 0){
|
|
3661
|
-
// // console.log('dd4')
|
|
3662
|
-
// // this.isCallInProgress = false;
|
|
3663
|
-
// // }
|
|
3664
|
-
// });
|
|
3665
|
-
// }
|
|
3666
|
-
// }
|
|
3667
3625
|
});
|
|
3668
3626
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3669
3627
|
//this.isCallInProgress = true;
|
|
@@ -3726,14 +3684,6 @@ class DialboxComponent {
|
|
|
3726
3684
|
});
|
|
3727
3685
|
// handle incoming call (managed internally; host need not pass incomingCallData)
|
|
3728
3686
|
const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
|
|
3729
|
-
// if (incomingCallData) {
|
|
3730
|
-
// this.isCallInProgress = true;
|
|
3731
|
-
// this.isDialpadHidden = false;
|
|
3732
|
-
// this.callData.phone = incomingCallData.parameters.From;
|
|
3733
|
-
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3734
|
-
// this.callData.img = incomingCallData.customParameters.get('image');
|
|
3735
|
-
// this.callData.isIncomingCall = true;
|
|
3736
|
-
// }
|
|
3737
3687
|
if (incomingCallData) {
|
|
3738
3688
|
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3739
3689
|
this._isDialpadHidden = false;
|
|
@@ -4007,7 +3957,7 @@ class DialboxComponent {
|
|
|
4007
3957
|
isIncomingCall: true,
|
|
4008
3958
|
participantId: this.incomingCallnotification.data.data?.participantId,
|
|
4009
3959
|
participants: [
|
|
4010
|
-
{ direction: "incoming-call", img: this.incomingCallnotification.data.data?.image || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: this.incomingCallnotification.data.data?.fromNumber, to: this.incomingCallnotification.data.data?.toNumber,
|
|
3960
|
+
{ direction: "incoming-call", img: this.incomingCallnotification.data.data?.toImage || this.incomingCallnotification.data.data?.image || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: this.incomingCallnotification.data.data?.fromNumber, to: this.incomingCallnotification.data.data?.toNumber,
|
|
4011
3961
|
from: this.incomingCallnotification.data.data?.fromNumber, fromName: this.incomingCallnotification.data.data?.fromName, participantId: this.incomingCallnotification.data.data?.participantId, name: this.incomingCallnotification.data.data?.fromName, time: '', id: this.incomingCallnotification.data.data?.participantId }
|
|
4012
3962
|
],
|
|
4013
3963
|
};
|