@vgroup/dialbox 0.4.167 → 0.4.168

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.
@@ -2516,35 +2516,34 @@ class CallProgressComponent {
2516
2516
  }
2517
2517
  }
2518
2518
  // let incomingCallData = this.currentCallList.filter((item: any) => item.isIncomingCall && item.isAcceptCall);
2519
- if (this.currentCallList.length > 1) {
2520
- // this.call = await this.twilioService.connect('');
2521
- this.twilioService.addIncomingParticipant(data?.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((res) => {
2522
- console.log(res, 'bhhhhhhhhhhhhhhhhhhh');
2523
- this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id || data?.participantId);
2524
- this.incomeingCallSocketService.pause();
2525
- data.isAcceptCall = true;
2526
- // this.currentCall = data;
2527
- this.setIncomingCallStatus(data);
2528
- });
2529
- }
2530
- else {
2531
- // this.currentCall = data;
2532
- let payload = {
2533
- recordId: data?.id,
2534
- ipAddress: '',
2535
- ipCountry: '',
2536
- callStatus: 'answered',
2537
- deviceId: this.deviceId,
2538
- conferenceId: this.conferenceId || data?.conferenceId || 'no'
2539
- };
2540
- this.extensionService.setIncomingCallStatus(payload).subscribe(async (res) => {
2541
- this.call = await this.twilioService.connect({ conferenceId: res.conferenceId, conferenceName: res.conferenceName });
2542
- this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id);
2543
- console.log(this.call, 'callConnect');
2544
- data.isAcceptCall = true;
2545
- this.incomeingCallSocketService.pause();
2546
- });
2547
- }
2519
+ // if (this.currentCallList.length > 1) {
2520
+ // // this.call = await this.twilioService.connect('');
2521
+ // this.twilioService.addIncomingParticipant(data?.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((res: any) => {
2522
+ // console.log(res, 'bhhhhhhhhhhhhhhhhhhh')
2523
+ // this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id || data?.participantId);
2524
+ // this.incomeingCallSocketService.pause();
2525
+ // data.isAcceptCall = true;
2526
+ // // this.currentCall = data;
2527
+ // this.setIncomingCallStatus(data)
2528
+ // })
2529
+ // } else {
2530
+ // this.currentCall = data;
2531
+ let payload = {
2532
+ recordId: data?.id,
2533
+ ipAddress: '',
2534
+ ipCountry: '',
2535
+ callStatus: 'answered',
2536
+ deviceId: this.deviceId,
2537
+ conferenceId: this.conferenceId || data?.conferenceId || 'no'
2538
+ };
2539
+ this.extensionService.setIncomingCallStatus(payload).subscribe(async (res) => {
2540
+ this.call = await this.twilioService.connect({ conferenceId: res.conferenceId, conferenceName: res.conferenceName });
2541
+ this.incomeingCallSocketService.isCurrentIncomingCallList.push(data?.id);
2542
+ console.log(this.call, 'callConnect');
2543
+ data.isAcceptCall = true;
2544
+ this.incomeingCallSocketService.pause();
2545
+ });
2546
+ // }
2548
2547
  // } else if(data?.status == 'ringing'){
2549
2548
  // this.twilioService.addIncomingParticipant(data?.id, this.twilioService.conferenceCallInfo.conferenceId).subscribe((data: any) => {
2550
2549
  // console.log(data,'bhhhhhhhhhhhhhhhhhhh')
@@ -3612,6 +3611,7 @@ class DialboxComponent {
3612
3611
  if (parentCall.length > 0) {
3613
3612
  this.notificationCallList = this.notificationCallList.filter((item) => !parentCall.includes(item?.participantId));
3614
3613
  this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
3614
+ console.log('.....', this.notificationCallList);
3615
3615
  }
3616
3616
  else {
3617
3617
  this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
@@ -3815,19 +3815,27 @@ class DialboxComponent {
3815
3815
  // deviceId: this.deviceId,
3816
3816
  // conferenceId: this.incomingCallnotification.data.data.conferenceId || 'no'
3817
3817
  // }
3818
- let incomingCall = {
3819
- conferenceId: 'no',
3820
- isActive: true,
3821
- isIncomingCall: true,
3822
- participantId: this.incomingCallnotification.data.data?.participantId,
3823
- participants: [
3824
- { 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 }
3825
- ]
3826
- };
3827
- this.incomingCallsList.push(incomingCall);
3828
- this.notificationCallList.push(incomingCall);
3829
- if (this.incomingCallnotification.data.data?.participantId) {
3830
- this.isCallInProgress = true;
3818
+ if (this.incomingCallnotification.data.content == "IncomingCall") {
3819
+ let incomingCall = {
3820
+ conferenceId: 'no',
3821
+ isActive: true,
3822
+ isIncomingCall: true,
3823
+ participantId: this.incomingCallnotification.data.data?.participantId,
3824
+ participants: [
3825
+ { 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 }
3826
+ ]
3827
+ };
3828
+ this.incomingCallsList.push(incomingCall);
3829
+ this.notificationCallList.push(incomingCall);
3830
+ if (this.incomingCallnotification.data.data?.participantId) {
3831
+ this.isCallInProgress = true;
3832
+ }
3833
+ }
3834
+ else if (this.incomingCallnotification.data.content == "Missed Call") {
3835
+ let index = this.notificationCallList.findIndex((call) => call.participantId === this.incomingCallnotification.data.data?.participantId);
3836
+ if (index > -1) {
3837
+ this.notificationCallList.splice(index, 1);
3838
+ }
3831
3839
  }
3832
3840
  console.log('notificationCallList', this.notificationCallList);
3833
3841
  // this.extensionService.setIncomingCallStatus(payload).subscribe((res: any) => {