@vgroup/dialbox 0.8.6 → 0.8.7
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 +19 -9
- package/esm2020/lib/dialbox.component.mjs +11 -9
- package/fesm2015/vgroup-dialbox.mjs +29 -18
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +28 -16
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2293,6 +2293,7 @@ class CallProgressComponent {
|
|
|
2293
2293
|
this.isParticipantPanelLoading = false;
|
|
2294
2294
|
this.pendingNewCallHeldParticipant = null;
|
|
2295
2295
|
this.isCallCancelled = false;
|
|
2296
|
+
this.isNewCallLoader = false;
|
|
2296
2297
|
this.isMinimised = false;
|
|
2297
2298
|
this.showDisconnectModal = false;
|
|
2298
2299
|
this.call = this.twilioService.call;
|
|
@@ -2338,6 +2339,7 @@ class CallProgressComponent {
|
|
|
2338
2339
|
name: changes['callData'].currentValue?.name || changes['callData'].currentValue?.fromName || changes['callData'].currentValue?.toName || '',
|
|
2339
2340
|
time: this.timer,
|
|
2340
2341
|
};
|
|
2342
|
+
this.isNewCallLoader = true;
|
|
2341
2343
|
this.onAddNewCall(changes['callData'].currentValue);
|
|
2342
2344
|
}
|
|
2343
2345
|
}
|
|
@@ -2704,6 +2706,7 @@ class CallProgressComponent {
|
|
|
2704
2706
|
this.isRinging = false;
|
|
2705
2707
|
this.isConcurrentIncoming = false;
|
|
2706
2708
|
if (this.call) {
|
|
2709
|
+
console.log('call disconnect 566');
|
|
2707
2710
|
this.call.disconnect();
|
|
2708
2711
|
}
|
|
2709
2712
|
this.currentCallList = [];
|
|
@@ -2734,6 +2737,7 @@ class CallProgressComponent {
|
|
|
2734
2737
|
this.deviceNumberList = this.callerIdList.map((res) => res.number);
|
|
2735
2738
|
let data = this.newIncomingCallsList.find((item) => item?.conferenceId == this.callAction?.conferenceId)?.participants.find((resData) => resData?.host);
|
|
2736
2739
|
if (data?.isLeft || !data) {
|
|
2740
|
+
this.isNewCallLoader = true;
|
|
2737
2741
|
this.rejoinHost(this.callAction);
|
|
2738
2742
|
}
|
|
2739
2743
|
}
|
|
@@ -2803,9 +2807,11 @@ class CallProgressComponent {
|
|
|
2803
2807
|
clientSid: this.call?.parameters?.['CallSid'],
|
|
2804
2808
|
recordId: rejoinParticipentInfo?.id
|
|
2805
2809
|
});
|
|
2810
|
+
this.isNewCallLoader = false;
|
|
2806
2811
|
this.conferenceCallIDForParticipantList = rejoinParticipentInfo?.conferenceId;
|
|
2807
2812
|
}
|
|
2808
2813
|
catch (error) {
|
|
2814
|
+
this.isNewCallLoader = false;
|
|
2809
2815
|
console.error('Error in addClientParticipant:', error);
|
|
2810
2816
|
}
|
|
2811
2817
|
};
|
|
@@ -3002,12 +3008,13 @@ class CallProgressComponent {
|
|
|
3002
3008
|
}
|
|
3003
3009
|
this.conferenceId = response?.callauth?.id;
|
|
3004
3010
|
this.isCallCancelled = false;
|
|
3005
|
-
if (response
|
|
3011
|
+
if (response?.status == 200) {
|
|
3006
3012
|
this.pendingNewCallHeldParticipant = null;
|
|
3007
3013
|
const { id: callAuthId, recordCall, tokenData } = await this.getCallAuthId(response);
|
|
3008
3014
|
this.recordCall = recordCall; // Store the recordCall value
|
|
3009
3015
|
await this.connectToDevice(callAuthId, callData, tokenData);
|
|
3010
3016
|
await this.pollCallStatus(callAuthId);
|
|
3017
|
+
console.log('Call initiated successfully:', response);
|
|
3011
3018
|
setTimeout(async () => {
|
|
3012
3019
|
try {
|
|
3013
3020
|
let addClientParticipantRes = this.addClientParticipant({
|
|
@@ -3034,6 +3041,7 @@ class CallProgressComponent {
|
|
|
3034
3041
|
countrycode: '',
|
|
3035
3042
|
deviceId: this.deviceId,
|
|
3036
3043
|
});
|
|
3044
|
+
this.isNewCallLoader = false;
|
|
3037
3045
|
if (isNewConference) {
|
|
3038
3046
|
this.conferenceCallIDForParticipantList = response?.callauth?.id;
|
|
3039
3047
|
}
|
|
@@ -3042,6 +3050,7 @@ class CallProgressComponent {
|
|
|
3042
3050
|
this.extensionService.isLoadershow.next(false);
|
|
3043
3051
|
this.isLoadershown.emit(false);
|
|
3044
3052
|
}
|
|
3053
|
+
this.showRingAnimation = false;
|
|
3045
3054
|
// this.conferenceCallIDForParticipantList = response?.callauth?.id;
|
|
3046
3055
|
// await this.getAllParticipants(response?.callauth?.id);
|
|
3047
3056
|
}
|
|
@@ -4586,13 +4595,14 @@ class CallProgressComponent {
|
|
|
4586
4595
|
}
|
|
4587
4596
|
ngOnDestroy() {
|
|
4588
4597
|
this.callData.dial = false;
|
|
4589
|
-
setTimeout(() => {
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
}
|
|
4598
|
+
// setTimeout(() => {
|
|
4599
|
+
if (!this.newIncomingCallsList?.length && !this.isNewCallLoader) {
|
|
4600
|
+
console.log('Destroying device and disconnecting all calls 2572');
|
|
4601
|
+
this.twilioService.device?.disconnectAll();
|
|
4602
|
+
this.call.disconnect();
|
|
4603
|
+
this.device?.destroy();
|
|
4604
|
+
}
|
|
4605
|
+
// }, 1500);
|
|
4596
4606
|
if (this.timerSubscription) {
|
|
4597
4607
|
this.timerSubscription.unsubscribe();
|
|
4598
4608
|
}
|
|
@@ -4998,6 +5008,7 @@ class DialboxComponent {
|
|
|
4998
5008
|
this.incomingCallsList = [];
|
|
4999
5009
|
this.isCallInProgress = false;
|
|
5000
5010
|
setTimeout(() => {
|
|
5011
|
+
console.log('344');
|
|
5001
5012
|
if (!this.twilioService.acceptedCallList?.length) {
|
|
5002
5013
|
this.twilioService.device?.disconnectAll();
|
|
5003
5014
|
this.twilioService.spareDevice?.disconnectAll();
|
|
@@ -5007,14 +5018,14 @@ class DialboxComponent {
|
|
|
5007
5018
|
}
|
|
5008
5019
|
}
|
|
5009
5020
|
if (!this.incomingCallsList?.length) {
|
|
5010
|
-
setTimeout(() => {
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
},
|
|
5021
|
+
// setTimeout(() => {
|
|
5022
|
+
// if(!this.incomingCallsList?.length) {
|
|
5023
|
+
// this.isCallInProgress = false;
|
|
5024
|
+
// this.twilioService.device?.disconnectAll();
|
|
5025
|
+
// this.twilioService.spareDevice?.disconnectAll();
|
|
5026
|
+
// this.twilioService.acceptedCallList = [];
|
|
5027
|
+
// }
|
|
5028
|
+
// }, 5000);
|
|
5018
5029
|
}
|
|
5019
5030
|
});
|
|
5020
5031
|
this.token = localStorage.getItem('ext_token') || '';
|
|
@@ -6003,6 +6014,7 @@ class DialboxComponent {
|
|
|
6003
6014
|
this.incomingCallsList = [];
|
|
6004
6015
|
// Clean up Twilio device when component is destroyed
|
|
6005
6016
|
if (this.twilioService['device']) {
|
|
6017
|
+
console.log('1402');
|
|
6006
6018
|
this.twilioService['device'].disconnectAll();
|
|
6007
6019
|
this.twilioService['device'].destroy();
|
|
6008
6020
|
}
|