@vgroup/dialbox 0.1.20 → 0.1.21
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 +16 -38
- package/fesm2015/vgroup-dialbox.mjs +17 -42
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +16 -38
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/incoming-call/incoming-call.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1622,47 +1622,25 @@ class IncomingCallComponent {
|
|
|
1622
1622
|
}
|
|
1623
1623
|
});
|
|
1624
1624
|
}
|
|
1625
|
-
|
|
1625
|
+
rejectCallFromList(data) {
|
|
1626
1626
|
if (!data)
|
|
1627
1627
|
return;
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
const twilioAuthId = data.customParameters.get('twilioAuthId');
|
|
1644
|
-
if (twilioAuthId) {
|
|
1645
|
-
await this.sendIPforIncomingCall(twilioAuthId, 'completed');
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
// Remove call from the list
|
|
1649
|
-
if (this.newIncomingCallsList && data.parameters?.CallSid) {
|
|
1650
|
-
this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters?.CallSid !== data.parameters.CallSid);
|
|
1651
|
-
this.incomingCallsNewList.emit([...this.newIncomingCallsList]);
|
|
1652
|
-
// Close the UI if no more calls
|
|
1653
|
-
if (this.newIncomingCallsList.length === 0) {
|
|
1654
|
-
this.closeIncomingCallDiv.emit({ show: 0, call: data });
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
catch (error) {
|
|
1659
|
-
console.error('Error rejecting call:', error);
|
|
1660
|
-
// Even if there's an error, try to clean up the UI
|
|
1661
|
-
if (this.newIncomingCallsList && data.parameters?.CallSid) {
|
|
1662
|
-
this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters?.CallSid !== data.parameters.CallSid);
|
|
1663
|
-
this.incomingCallsNewList.emit([...this.newIncomingCallsList]);
|
|
1628
|
+
if (data.reject)
|
|
1629
|
+
data.reject();
|
|
1630
|
+
if (data.disconnect)
|
|
1631
|
+
data.disconnect();
|
|
1632
|
+
if (data.parameters) {
|
|
1633
|
+
data.parameters['isCallConnected'] = false; // Should be false when rejecting
|
|
1634
|
+
}
|
|
1635
|
+
if (data.customParameters) {
|
|
1636
|
+
this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered');
|
|
1637
|
+
}
|
|
1638
|
+
if (this.newIncomingCallsList && data && data.parameters && data.parameters.CallSid) {
|
|
1639
|
+
this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== data.parameters.CallSid);
|
|
1640
|
+
this.incomingCallsNewList.emit(this.newIncomingCallsList);
|
|
1641
|
+
if (this.newIncomingCallsList.length == 0) {
|
|
1642
|
+
this.closeIncomingCallDiv.emit({ show: 0, call: data });
|
|
1664
1643
|
}
|
|
1665
|
-
this.closeIncomingCallDiv.emit({ show: 0, call: data });
|
|
1666
1644
|
}
|
|
1667
1645
|
}
|
|
1668
1646
|
closeIncomingCallWrapper(val) {
|