@vgroup/dialbox 0.6.3-0.11 → 0.6.3-0.12
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.
|
@@ -3885,12 +3885,17 @@ class DialboxComponent {
|
|
|
3885
3885
|
// so we can auto-open on incoming calls.
|
|
3886
3886
|
this.initializeTwilio();
|
|
3887
3887
|
this.incomeingCallSocketService.connect(this.deviceId);
|
|
3888
|
+
let deviceNumberList = this.callerIdList.map((res) => res.number);
|
|
3888
3889
|
try {
|
|
3889
3890
|
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => __awaiter(this, void 0, void 0, function* () {
|
|
3890
3891
|
var _a, _b;
|
|
3891
3892
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3892
3893
|
incomingCallData = (incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length) > 0 ? incomingCallData.filter((item) => { var _a; return ((_a = item.participants) === null || _a === void 0 ? void 0 : _a.length) > 0; }) : [];
|
|
3893
|
-
|
|
3894
|
+
let ourNumber = {};
|
|
3895
|
+
this.incomingCallData.forEach((callInfo, i) => {
|
|
3896
|
+
ourNumber = callInfo.participants.find((resData) => ((deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.to) == 'c2c_softphone_client') || (deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call')) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
|
|
3897
|
+
});
|
|
3898
|
+
if (!!(incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length) && (ourNumber === null || ourNumber === void 0 ? void 0 : ourNumber.id)) {
|
|
3894
3899
|
// this.incomingCallsList = incomingCallData.participants.filter((item: any) => !item.isLeft) || [];
|
|
3895
3900
|
this.incomingCallsList = incomingCallData || [];
|
|
3896
3901
|
let parentCall = [];
|