@vgroup/dialbox 0.1.35 → 0.1.36
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.
- package/esm2020/lib/components/call-progress/incoming-call/incoming-call.component.mjs +20 -14
- package/fesm2015/vgroup-dialbox.mjs +19 -13
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +19 -13
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1609,22 +1609,28 @@ class IncomingCallComponent {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
1611
|
acceptCallFromList(data) {
|
|
1612
|
-
data
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1612
|
+
if (!data) {
|
|
1613
|
+
return;
|
|
1614
|
+
}
|
|
1615
|
+
// Disconnect any other connected call before accepting this one
|
|
1616
|
+
if (this.newIncomingCallsList && this.newIncomingCallsList.length) {
|
|
1617
|
+
const otherConnected = this.newIncomingCallsList.find((item) => item.isCallConnected && item !== data);
|
|
1618
|
+
if (otherConnected) {
|
|
1619
|
+
try {
|
|
1620
|
+
otherConnected.disconnect();
|
|
1621
|
+
}
|
|
1622
|
+
catch { }
|
|
1623
|
+
otherConnected.isCallConnected = false;
|
|
1624
|
+
otherConnected.isFirstCall = false;
|
|
1625
|
+
}
|
|
1617
1626
|
}
|
|
1627
|
+
// Accept this call and mark as the active one
|
|
1628
|
+
data.accept();
|
|
1618
1629
|
data.isCallConnected = true;
|
|
1630
|
+
data.isFirstCall = true;
|
|
1619
1631
|
this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered').then(() => {
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
this.closeIncomingCallWrapper(1);
|
|
1623
|
-
}
|
|
1624
|
-
else { // manual recording
|
|
1625
|
-
this.extensionService.setCallSid(this.CallSid, this.recordCall);
|
|
1626
|
-
this.closeIncomingCallWrapper(1);
|
|
1627
|
-
}
|
|
1632
|
+
this.extensionService.setCallSid(this.CallSid, this.recordCall);
|
|
1633
|
+
this.closeIncomingCallWrapper(1);
|
|
1628
1634
|
});
|
|
1629
1635
|
}
|
|
1630
1636
|
rejectCallFromList(data) {
|