@vgroup/dialbox 0.4.155 → 0.4.158

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.
@@ -1594,13 +1594,12 @@ class TwilioService {
1594
1594
  return this.http.get(`${environment.apiUrl}/utilities/ext/add/incoming/participant/${participantId}/${conferenceId}`, httpOptions);
1595
1595
  }
1596
1596
  connect(data) {
1597
- // this.device.disconnect();
1598
1597
  if (this.device._activeCall) {
1599
1598
  this.device.disconnectAll();
1600
1599
  }
1601
1600
  return this.device.connect({
1602
1601
  params: {
1603
- Token: this.conferenceCallInfo.conferenceId,
1602
+ Token: this.conferenceCallInfo.conferenceId || data,
1604
1603
  ConferenceName: this.conferenceCallInfo.conferenceName
1605
1604
  },
1606
1605
  rtcConstraints: { audio: { deviceId: 'default' } },
@@ -2531,13 +2530,22 @@ class CallProgressComponent {
2531
2530
  });
2532
2531
  }
2533
2532
  else {
2534
- this.call = await this.twilioService.connect('');
2535
- this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id);
2536
- console.log(this.call, 'callConnect');
2537
- data.isAcceptCall = true;
2538
2533
  // this.currentCall = data;
2539
- this.setIncomingCallStatus(data);
2540
- this.incomeingCallSocketService.pause();
2534
+ let payload = {
2535
+ recordId: data?.id,
2536
+ ipAddress: '',
2537
+ ipCountry: '',
2538
+ callStatus: 'answered',
2539
+ deviceId: this.deviceId,
2540
+ conferenceId: this.conferenceId || data?.conferenceId || 'no'
2541
+ };
2542
+ this.extensionService.setIncomingCallStatus(payload).subscribe(async (res) => {
2543
+ this.call = await this.twilioService.connect(res.conferenceId);
2544
+ this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id);
2545
+ console.log(this.call, 'callConnect');
2546
+ data.isAcceptCall = true;
2547
+ this.incomeingCallSocketService.pause();
2548
+ });
2541
2549
  }
2542
2550
  // } else if(data?.status == 'ringing'){
2543
2551
  // this.twilioService.addIncomingParticipant(data?.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((data: any) => {
@@ -3345,6 +3353,7 @@ class DialboxComponent {
3345
3353
  this._isDialpadHidden = true;
3346
3354
  // Let the library decide to auto-open on incoming call without host wiring
3347
3355
  this.autoOpenOnIncoming = true;
3356
+ this.isIncomingCallnotification = false;
3348
3357
  this.conferenceCallInfo = {
3349
3358
  "createdAt": "Tue Dec 30 07:53:51 UTC 2025",
3350
3359
  "conferenceName": "conf_6953850f1522800c4f3cc715",
@@ -3723,7 +3732,7 @@ class DialboxComponent {
3723
3732
  else {
3724
3733
  incomingCallData['isFirstCall'] = true;
3725
3734
  console.log('dd1');
3726
- this.isCallInProgress = true;
3735
+ // this.isCallInProgress = true;
3727
3736
  this.isDialpadHidden = false;
3728
3737
  this.callData.phone = incomingCallData.parameters['From'];
3729
3738
  console.log('dd2');
@@ -3791,8 +3800,10 @@ class DialboxComponent {
3791
3800
  // deviceId: this.deviceId,
3792
3801
  // conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3793
3802
  // }
3794
- this.isCallInProgress = true;
3795
3803
  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 });
3804
+ if (this.incomingCallnotification.data.data?.participantId) {
3805
+ this.isCallInProgress = true;
3806
+ }
3796
3807
  // this.extensionService.setIncomingCallStatus(payload).subscribe((res: any) => {
3797
3808
  // console.log(res)
3798
3809
  // })