@vgroup/dialbox 0.2.39 → 0.2.40

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.
@@ -2436,6 +2436,28 @@ class CallProgressComponent {
2436
2436
  this.handleError(error);
2437
2437
  }
2438
2438
  }
2439
+ // acceptConcurrentCall(incomingCall: any) {
2440
+ // if (!incomingCall) return;
2441
+ // // Put current call on hold instead of disconnecting
2442
+ // if (this.call) {
2443
+ // this.heldCall = this.call;
2444
+ // this.isCallOnHold = true;
2445
+ // // Mute the held call
2446
+ // this.heldCall.mute(true);
2447
+ // }
2448
+ // incomingCall.accept();
2449
+ // this.call = incomingCall;
2450
+ // this.callData.phone = incomingCall.parameters['From'];
2451
+ // this.callData.name = incomingCall.customParameters?.get('name') || '-';
2452
+ // this.callData.img = incomingCall.customParameters?.get('image') || 'assets/images/user.jpg';
2453
+ // this.isConcurrentIncoming = false;
2454
+ // this.incomingCallDiv = false;
2455
+ // this.disbaleEndCallBtn = false;
2456
+ // // Reset timer for new call
2457
+ // this.stopTimer();
2458
+ // this.startTimer();
2459
+ // this.cdr.detectChanges();
2460
+ // }
2439
2461
  acceptConcurrentCall(incomingCall) {
2440
2462
  if (!incomingCall)
2441
2463
  return;
@@ -2446,6 +2468,7 @@ class CallProgressComponent {
2446
2468
  // Mute the held call
2447
2469
  this.heldCall.mute(true);
2448
2470
  }
2471
+ // Accept the new call
2449
2472
  incomingCall.accept();
2450
2473
  this.call = incomingCall;
2451
2474
  this.callData.phone = incomingCall.parameters['From'];
@@ -2454,7 +2477,10 @@ class CallProgressComponent {
2454
2477
  this.isConcurrentIncoming = false;
2455
2478
  this.incomingCallDiv = false;
2456
2479
  this.disbaleEndCallBtn = false;
2457
- // Reset timer for new call
2480
+ // 🟢 Remove the accepted call from incoming list
2481
+ this.newIncomingCallsList = (this.newIncomingCallsList || []).filter((c) => c?.parameters?.CallSid !== incomingCall?.parameters?.CallSid);
2482
+ this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
2483
+ // 🕒 Reset timer for new call
2458
2484
  this.stopTimer();
2459
2485
  this.startTimer();
2460
2486
  this.cdr.detectChanges();