@vgroup/dialbox 0.4.147 → 0.4.149

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.
@@ -602,10 +602,10 @@ class ExtensionService {
602
602
  'Content-Type': 'application/json',
603
603
  'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
604
604
  'ip-address': this.ipAddressInfo?.ip,
605
- 'ip-country': this.ipAddressInfo?.country
605
+ 'ip-country': this.ipAddressInfo?.address?.country
606
606
  });
607
607
  const httpOptions = { headers: headers };
608
- payload = { ...payload, proxy: this.ipAddressInfo.proxy.toString(), countrycode: this.ipAddressInfo.address.countryCode.toString() };
608
+ payload = { ...payload, proxy: this.ipAddressInfo?.proxy, countrycode: this.ipAddressInfo?.address?.countryCode };
609
609
  console.log(payload, 'payload');
610
610
  return this.http.post(environment.apiUrl + '/utilities/ext/ur/add/participant', payload, httpOptions);
611
611
  }
@@ -3583,10 +3583,13 @@ class DialboxComponent {
3583
3583
  this.incomingCallsList = incomingCallData.participants || [];
3584
3584
  this.isCallInProgress = true;
3585
3585
  this.isDialpadHidden = false;
3586
+ this.isIncomingCallnotification = false;
3586
3587
  }
3587
3588
  else {
3588
- this.callData = [];
3589
- this.incomingCallsList = [];
3589
+ if (!this.isIncomingCallnotification) {
3590
+ this.callData = [];
3591
+ this.incomingCallsList = [];
3592
+ }
3590
3593
  // this.isCallInProgress = false;
3591
3594
  }
3592
3595
  // incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
@@ -3770,17 +3773,18 @@ class DialboxComponent {
3770
3773
  if (changes['incomingCallnotification']) {
3771
3774
  console.log('incomingCallnotification', changes['incomingCallnotification'].currentValue);
3772
3775
  this.isIncomingCallnotification = true;
3773
- let payload = {
3774
- recordId: this.incomingCallnotification.data.data.participantId,
3775
- ipAddress: '',
3776
- ipCountry: '',
3777
- callStatus: 'answered',
3778
- deviceId: this.deviceId,
3779
- conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3780
- };
3781
- this.extensionService.setIncomingCallStatus(payload).subscribe((res) => {
3782
- console.log(res);
3783
- });
3776
+ // let payload = {
3777
+ // recordId: this.incomingCallnotification.data.data.participantId,
3778
+ // ipAddress: '',
3779
+ // ipCountry: '',
3780
+ // callStatus: 'answered',
3781
+ // deviceId: this.deviceId,
3782
+ // conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3783
+ // }
3784
+ this.incomingCallsList.push({ direction: "incoming-call", img: 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: this.incomingCallnotification.data.data?.fromNumber, participantId: this.incomingCallnotification.data.data?.participantId, name: this.incomingCallnotification.data.data?.fromName, time: '', id: this.incomingCallnotification.data.data?.participantId });
3785
+ // this.extensionService.setIncomingCallStatus(payload).subscribe((res: any) => {
3786
+ // console.log(res)
3787
+ // })
3784
3788
  }
3785
3789
  if (changes['deviceId']) {
3786
3790
  localStorage.setItem('deviceId', changes['deviceId'].currentValue);