@vgroup/dialbox 0.7.67 → 0.7.69

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.
@@ -1568,6 +1568,7 @@ class TwilioService {
1568
1568
  }
1569
1569
  }
1570
1570
  catch (_) { }
1571
+ console.log('153 call end');
1571
1572
  this.device.destroy();
1572
1573
  }
1573
1574
  if (!this.incomingCallToken) {
@@ -3500,7 +3501,7 @@ class CallProgressComponent {
3500
3501
  console.log('1096');
3501
3502
  this.endCallEvent.emit(data);
3502
3503
  this.cdr.detectChanges();
3503
- // swal("Error", res?.message?.join?.("<br/>") || 'Internal Server Error', "error");
3504
+ swal("Error", res?.message?.join?.("<br/>") || 'Internal Server Error', "error");
3504
3505
  }
3505
3506
  setTimeout(() => {
3506
3507
  this.isUnholdConferenceCall = false;
@@ -4790,14 +4791,18 @@ class DialboxComponent {
4790
4791
  this.isCallInProgress = false;
4791
4792
  setTimeout(() => {
4792
4793
  if (!this.twilioService.acceptedCallList?.length) {
4794
+ console.log('357 callend');
4793
4795
  this.twilioService.device?.disconnectAll();
4794
4796
  }
4795
4797
  }, 2000);
4796
4798
  }
4797
4799
  }
4798
4800
  if (!this.incomingCallsList?.length) {
4799
- this.isCallInProgress = false;
4800
- this.twilioService.device?.disconnectAll();
4801
+ setTimeout(() => {
4802
+ this.isCallInProgress = false;
4803
+ console.log('366 callend');
4804
+ this.twilioService.device?.disconnectAll();
4805
+ }, 2000);
4801
4806
  }
4802
4807
  });
4803
4808
  this.token = localStorage.getItem('ext_token') || '';
@@ -4987,10 +4992,7 @@ class DialboxComponent {
4987
4992
  // }
4988
4993
  }
4989
4994
  else if (snapshot?.data?.content == "Missed Call" || snapshot?.data?.data?.status == "rejected" || snapshot?.data?.data?.status == "accepted") {
4990
- let index = this.notificationCallList.findIndex((call) => call?.participantId === snapshot?.data?.data?.recordId || call?.participantId === snapshot?.data?.data?.participantId);
4991
- if (index > -1) {
4992
- this.notificationCallList.splice(index, 1);
4993
- }
4995
+ this.notificationCallList = this.notificationCallList.filter((call) => call?.participantId != snapshot?.data?.data?.recordId && call?.participantId != snapshot?.data?.data?.participantId);
4994
4996
  this.missCallInfo = snapshot;
4995
4997
  let incomingCallIndex = this.incomingCallsList.findIndex((call) => (call?.participantId == snapshot?.data?.data?.recordId || call.participantId == snapshot?.data?.data?.participantId) && call?.direction == 'incoming-call');
4996
4998
  if (incomingCallIndex > -1) {
@@ -5757,6 +5759,7 @@ class DialboxComponent {
5757
5759
  this.incomingCallsList = [];
5758
5760
  // Clean up Twilio device when component is destroyed
5759
5761
  if (this.twilioService['device']) {
5762
+ console.log('Destroying Twilio device...');
5760
5763
  this.twilioService['device'].disconnectAll();
5761
5764
  this.twilioService['device'].destroy();
5762
5765
  }