@vgroup/dialbox 0.5.12 → 0.5.14

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.
@@ -1931,21 +1931,21 @@ class CallProgressComponent {
1931
1931
  }
1932
1932
  else if (!((_j = this.newIncomingCallsList) === null || _j === void 0 ? void 0 : _j.length)) {
1933
1933
  console.log('test null');
1934
- if (this.isRinging) {
1935
- this.incomeingCallSocketService.pause();
1936
- }
1937
1934
  this.isRinging = false;
1938
1935
  this.isConcurrentIncoming = false;
1939
1936
  this.incomingCallDiv = false;
1940
1937
  this.currentCallList = [];
1941
1938
  this.currentCall = {};
1939
+ this.cdr.detectChanges();
1940
+ if (this.isRinging) {
1941
+ this.incomeingCallSocketService.pause();
1942
+ }
1942
1943
  this.isRinging = false;
1943
1944
  this.isCallInProgress = false;
1944
1945
  this.isConferenceCallHold = false;
1945
- this.stopTimer();
1946
1946
  this.call.disconnect();
1947
+ this.stopTimer();
1947
1948
  this.cdr.detectChanges();
1948
- // this.twilioService.device.disconnectAll()
1949
1949
  this.endCallEvent.emit();
1950
1950
  }
1951
1951
  }
@@ -2844,7 +2844,6 @@ class CallProgressComponent {
2844
2844
  }
2845
2845
  isMergeCallAllowed() {
2846
2846
  let mergeCallList = this.currentCallList.filter((res) => res.conferenceId == this.currentCall.conferenceId);
2847
- console.log('mergeCallList', mergeCallList);
2848
2847
  return mergeCallList.length <= 1;
2849
2848
  }
2850
2849
  mergeCalls() {
@@ -3792,7 +3791,7 @@ class DialboxComponent {
3792
3791
  this.registerDragElement();
3793
3792
  }
3794
3793
  ngOnChanges(changes) {
3795
- var _a, _b, _c, _d, _e;
3794
+ var _a, _b, _c, _d, _e, _f;
3796
3795
  if (((_a = changes['incomingCallnotification']) === null || _a === void 0 ? void 0 : _a.currentValue) && this.incomingCallnotification) {
3797
3796
  this.isIncomingCallnotification = true;
3798
3797
  // let payload = {
@@ -3806,15 +3805,18 @@ class DialboxComponent {
3806
3805
  console.log(',,,,,', this.incomingCallnotification);
3807
3806
  if (this.incomingCallnotification.data.content == "IncomingCall") {
3808
3807
  let callerInfo;
3809
- if (((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.c2cBusiness) == 'false') {
3810
- this.extensionService.getUserInformation((_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.participantId).subscribe((resInfo) => {
3811
- console.log('uesrInfo', resInfo);
3812
- callerInfo = resInfo.c2cInformation;
3813
- this.incomingCallNotification(callerInfo);
3814
- });
3815
- }
3816
- else {
3817
- this.incomingCallNotification({});
3808
+ let numberList = this.callerIdList.map((res) => res.number);
3809
+ if (!numberList.includes((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.fromNumber)) {
3810
+ if (((_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.c2cBusiness) == 'false') {
3811
+ this.extensionService.getUserInformation((_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.participantId).subscribe((resInfo) => {
3812
+ console.log('uesrInfo', resInfo);
3813
+ callerInfo = resInfo.c2cInformation;
3814
+ this.incomingCallNotification(callerInfo);
3815
+ });
3816
+ }
3817
+ else {
3818
+ this.incomingCallNotification({});
3819
+ }
3818
3820
  }
3819
3821
  }
3820
3822
  else if (this.incomingCallnotification.data.content == "Missed Call") {
@@ -3841,10 +3843,10 @@ class DialboxComponent {
3841
3843
  this.twilioService.deviceId = changes['deviceId'].currentValue;
3842
3844
  console.log('Set deviceId in localStorage:', changes['deviceId'].currentValue);
3843
3845
  }
3844
- if (((_d = changes['userId']) === null || _d === void 0 ? void 0 : _d.currentValue) && this.userId) {
3846
+ if (((_e = changes['userId']) === null || _e === void 0 ? void 0 : _e.currentValue) && this.userId) {
3845
3847
  this.extensionService.userId = this.userId;
3846
3848
  }
3847
- if (((_e = changes['contactInfo']) === null || _e === void 0 ? void 0 : _e.currentValue) && this.contactInfo) {
3849
+ if (((_f = changes['contactInfo']) === null || _f === void 0 ? void 0 : _f.currentValue) && this.contactInfo) {
3848
3850
  let contact = this.contactInfo;
3849
3851
  console.log('contactInfo', contact);
3850
3852
  if (contact.number) {
@@ -4170,6 +4172,7 @@ class DialboxComponent {
4170
4172
  // Reset dialed number
4171
4173
  this.dialedNumber = '';
4172
4174
  this.sanitizedNum = '';
4175
+ this.twilioService.device.disconnectAll();
4173
4176
  // Emit end call event
4174
4177
  this.endCallEvent.emit();
4175
4178
  console.log('Call ended successfully');