@vgroup/dialbox 0.1.33 → 0.1.35

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.
@@ -1611,6 +1611,10 @@ class IncomingCallComponent {
1611
1611
  acceptCallFromList(data) {
1612
1612
  data.accept();
1613
1613
  // data.parameters['isCallConnected'] = true;
1614
+ const isFirstCall = this.newIncomingCallsList.find((item) => item.isFirstCall);
1615
+ if (isFirstCall && isFirstCall.isCallConnected) {
1616
+ isFirstCall.disconnect();
1617
+ }
1614
1618
  data.isCallConnected = true;
1615
1619
  this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered').then(() => {
1616
1620
  if (this.shouldRecordCall) { // default recording
@@ -2426,7 +2430,7 @@ class DialboxComponent {
2426
2430
  }
2427
2431
  });
2428
2432
  // handle incoming call
2429
- const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
2433
+ const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
2430
2434
  // if (incomingCallData) {
2431
2435
  // this.isCallInProgress = true;
2432
2436
  // this.isDialpadHidden = false;
@@ -2442,6 +2446,7 @@ class DialboxComponent {
2442
2446
  this.getUserInformation(incomingCallData);
2443
2447
  }
2444
2448
  else {
2449
+ incomingCallData['isFirstCall'] = true;
2445
2450
  this.isCallInProgress = true;
2446
2451
  this.isDialpadHidden = false;
2447
2452
  this.callData.phone = incomingCallData.parameters['From'];