@vgroup/dialbox 0.4.160 → 0.4.162

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.
@@ -1599,8 +1599,8 @@ class TwilioService {
1599
1599
  }
1600
1600
  return this.device.connect({
1601
1601
  params: {
1602
- Token: this.conferenceCallInfo.conferenceId || data,
1603
- ConferenceName: this.conferenceCallInfo.conferenceName
1602
+ Token: this.conferenceCallInfo?.conferenceId || data.conferenceId,
1603
+ ConferenceName: this.conferenceCallInfo?.conferenceName || data.conferenceName
1604
1604
  },
1605
1605
  rtcConstraints: { audio: { deviceId: 'default' } },
1606
1606
  });
@@ -2020,18 +2020,16 @@ class CallProgressComponent {
2020
2020
  }
2021
2021
  getStatus(res) {
2022
2022
  // const statusList = ["answered", "participant-hold", "participant-mute", "participant-join", "queued", "in-progress", "initiated", 'ringing', '"connected"'];
2023
- // if (statusList.includes(res.status) && res.direction != "incoming-call") {
2024
- // return true;
2025
- // } else if (res.direction == "incoming-call") {
2026
- // return this.isCurrentIncomingCallList.includes(res.id);
2027
- // } else {
2028
- // return false;
2029
- // }
2030
- if (res.incomingStatus == 'answered' && res.direction == "incoming-call") {
2031
- return true;
2023
+ if (res.direction == "incoming-call") {
2024
+ return this.isCurrentIncomingCallList.includes(res.id);
2032
2025
  }
2033
2026
  else {
2034
- return false;
2027
+ if (res.status == 'answered' && res.direction == "incoming-call") {
2028
+ return true;
2029
+ }
2030
+ else {
2031
+ return false;
2032
+ }
2035
2033
  }
2036
2034
  }
2037
2035
  // private createAudioFromBase64(base64: string, mimeType = 'audio/mpeg'): HTMLAudioElement {
@@ -2139,6 +2137,7 @@ class CallProgressComponent {
2139
2137
  userId: this.userId || localStorage.getItem('userId'),
2140
2138
  proxy: '',
2141
2139
  countrycode: '',
2140
+ deviceId: this.deviceId
2142
2141
  });
2143
2142
  console.log('Initial participantId:', this.addRes?.participantId);
2144
2143
  }
@@ -2539,7 +2538,7 @@ class CallProgressComponent {
2539
2538
  conferenceId: this.conferenceId || data?.conferenceId || 'no'
2540
2539
  };
2541
2540
  this.extensionService.setIncomingCallStatus(payload).subscribe(async (res) => {
2542
- this.call = await this.twilioService.connect(res.conferenceId);
2541
+ this.call = await this.twilioService.connect({ conferenceId: res.conferenceId, conferenceName: res.conferenceName });
2543
2542
  this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id);
2544
2543
  console.log(this.call, 'callConnect');
2545
2544
  data.isAcceptCall = true;
@@ -2581,6 +2580,7 @@ class CallProgressComponent {
2581
2580
  userId: this.userId,
2582
2581
  proxy: '',
2583
2582
  countrycode: '',
2583
+ deviceId: this.deviceId
2584
2584
  });
2585
2585
  this.onholdOrUnholdParticipant({
2586
2586
  participantId: [data?.participantId],
@@ -2653,6 +2653,7 @@ class CallProgressComponent {
2653
2653
  userId: this.userId,
2654
2654
  proxy: '',
2655
2655
  countrycode: '',
2656
+ deviceId: this.deviceId
2656
2657
  });
2657
2658
  // this.callData = {
2658
2659
  // ...this.callData,
@@ -3814,6 +3815,7 @@ class DialboxComponent {
3814
3815
  }
3815
3816
  if (changes['deviceId']) {
3816
3817
  localStorage.setItem('deviceId', changes['deviceId'].currentValue);
3818
+ this.twilioService.deviceId = changes['deviceId'].currentValue;
3817
3819
  console.log('Set deviceId in localStorage:', changes['deviceId'].currentValue);
3818
3820
  }
3819
3821
  if (this.userId) {