@vgroup/dialbox 0.7.35 → 0.7.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.
|
@@ -2997,7 +2997,7 @@ class CallProgressComponent {
|
|
|
2997
2997
|
}
|
|
2998
2998
|
this.intervalId = setInterval(() => {
|
|
2999
2999
|
seconds++;
|
|
3000
|
-
this.timer = this.formatTime(seconds);
|
|
3000
|
+
// this.timer = this.formatTime(seconds);
|
|
3001
3001
|
this.cdr.detectChanges();
|
|
3002
3002
|
}, 1000);
|
|
3003
3003
|
}
|
|
@@ -3149,7 +3149,7 @@ class CallProgressComponent {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
// Set selection immediately so the highlight appears before the API responds.
|
|
3151
3151
|
this.selectedUserInfo = userInfo;
|
|
3152
|
-
let participantID = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.businessParticipantId) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.participantId);
|
|
3152
|
+
let participantID = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.businessParticipantId) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.participantId) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id);
|
|
3153
3153
|
if (!this.C2ConfoList[userInfo === null || userInfo === void 0 ? void 0 : userInfo.participantId] && !this.C2ConfoList[userInfo === null || userInfo === void 0 ? void 0 : userInfo.businessParticipantId]) {
|
|
3154
3154
|
this.extensionService.getUserInformation(participantID).subscribe({
|
|
3155
3155
|
next: (resInfo) => {
|
|
@@ -3174,36 +3174,67 @@ class CallProgressComponent {
|
|
|
3174
3174
|
this.filteredParticipentList = this.allParticipentList;
|
|
3175
3175
|
});
|
|
3176
3176
|
}
|
|
3177
|
+
// async waitingCallAccept(incomingCallInfo:any) {
|
|
3178
|
+
// let ourNumberInfo: any = {}
|
|
3179
|
+
// this.newIncomingCallsList.forEach((callInfo: any, i: number) => {
|
|
3180
|
+
// // this.currentCall?.conferenceId == callInfo.conferenceId
|
|
3181
|
+
// ourNumberInfo = callInfo.participants.find((resData: any) =>
|
|
3182
|
+
// ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData)
|
|
3183
|
+
// );
|
|
3184
|
+
// if (ourNumberInfo?.id && ourNumberInfo?.conferenceId !== incomingCallInfo?.conferenceId) {
|
|
3185
|
+
// this.isUnholdConferenceCall = true;
|
|
3186
|
+
// let holdInfo: any = await this.onholdOrUnholdParticipant({
|
|
3187
|
+
// participantId: [ourNumberInfo?.id],
|
|
3188
|
+
// conferenceId: ourNumberInfo?.conferenceId,
|
|
3189
|
+
// hold: true,
|
|
3190
|
+
// mute: ourNumberInfo?.mute || false
|
|
3191
|
+
// });
|
|
3192
|
+
// if(holdInfo?.status != 200) {
|
|
3193
|
+
// console.error('holdInfo 1091', holdInfo)
|
|
3194
|
+
// }
|
|
3195
|
+
// this.isConferenceCallHold = true;
|
|
3196
|
+
// }
|
|
3197
|
+
// })
|
|
3198
|
+
// // if (callInfo?.participants?.length) {
|
|
3199
|
+
// // ourNumberInfo = callInfo.participants.find((resData: any) =>
|
|
3200
|
+
// // ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData)
|
|
3201
|
+
// // );
|
|
3202
|
+
// // }
|
|
3203
|
+
// const capturedCall = this.twilioService.getIncomingCallById(incomingCallInfo?.clientSid) || this.twilioService.incomingCallDetail;
|
|
3204
|
+
// this.twilioService.acceptedCallList.forEach((call: any) => {
|
|
3205
|
+
// call.mute(true);
|
|
3206
|
+
// });
|
|
3207
|
+
// this.add(incomingCallInfo, ourNumberInfo, capturedCall);
|
|
3208
|
+
// }
|
|
3177
3209
|
waitingCallAccept(incomingCallInfo) {
|
|
3210
|
+
var _a;
|
|
3178
3211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3179
3212
|
let ourNumberInfo = {};
|
|
3180
|
-
this.newIncomingCallsList.
|
|
3181
|
-
|
|
3213
|
+
let callInfo = this.newIncomingCallsList.find((callInfo, i) => { var _a; return ((_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.conferenceId) == callInfo.conferenceId; });
|
|
3214
|
+
if ((_a = callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants) === null || _a === void 0 ? void 0 : _a.length) {
|
|
3182
3215
|
ourNumberInfo = callInfo.participants.find((resData) => ((this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.client)) || (this.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.businessNumber))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft) && this.getStatus(resData));
|
|
3183
|
-
|
|
3184
|
-
this.isUnholdConferenceCall = true;
|
|
3185
|
-
let holdInfo = this.onholdOrUnholdParticipant({
|
|
3186
|
-
participantId: [ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.id],
|
|
3187
|
-
conferenceId: ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.conferenceId,
|
|
3188
|
-
hold: true,
|
|
3189
|
-
mute: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.mute) || false
|
|
3190
|
-
});
|
|
3191
|
-
if ((holdInfo === null || holdInfo === void 0 ? void 0 : holdInfo.status) != 200) {
|
|
3192
|
-
console.error('holdInfo 1091', holdInfo);
|
|
3193
|
-
}
|
|
3194
|
-
this.isConferenceCallHold = true;
|
|
3195
|
-
}
|
|
3196
|
-
});
|
|
3197
|
-
// if (callInfo?.participants?.length) {
|
|
3198
|
-
// ourNumberInfo = callInfo.participants.find((resData: any) =>
|
|
3199
|
-
// ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && !resData?.businessNumber)) && !resData?.isLeft && this.getStatus(resData)
|
|
3200
|
-
// );
|
|
3201
|
-
// }
|
|
3216
|
+
}
|
|
3202
3217
|
const capturedCall = this.twilioService.getIncomingCallById(incomingCallInfo === null || incomingCallInfo === void 0 ? void 0 : incomingCallInfo.clientSid) || this.twilioService.incomingCallDetail;
|
|
3203
3218
|
this.twilioService.acceptedCallList.forEach((call) => {
|
|
3204
3219
|
call.mute(true);
|
|
3205
3220
|
});
|
|
3206
|
-
|
|
3221
|
+
if ((ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.id) && (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.conferenceId) !== (incomingCallInfo === null || incomingCallInfo === void 0 ? void 0 : incomingCallInfo.conferenceId)) {
|
|
3222
|
+
this.isUnholdConferenceCall = true;
|
|
3223
|
+
let holdInfo = yield this.onholdOrUnholdParticipant({
|
|
3224
|
+
participantId: [ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.id],
|
|
3225
|
+
conferenceId: ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.conferenceId,
|
|
3226
|
+
hold: true,
|
|
3227
|
+
mute: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.mute) || false
|
|
3228
|
+
});
|
|
3229
|
+
if ((holdInfo === null || holdInfo === void 0 ? void 0 : holdInfo.status) != 200) {
|
|
3230
|
+
console.error('holdInfo 1091', holdInfo);
|
|
3231
|
+
}
|
|
3232
|
+
this.isConferenceCallHold = true;
|
|
3233
|
+
this.add(incomingCallInfo, ourNumberInfo, capturedCall);
|
|
3234
|
+
}
|
|
3235
|
+
else {
|
|
3236
|
+
this.add(incomingCallInfo, ourNumberInfo, capturedCall);
|
|
3237
|
+
}
|
|
3207
3238
|
});
|
|
3208
3239
|
}
|
|
3209
3240
|
add(data, ourNumberInfo, capturedCall) {
|
|
@@ -4063,10 +4094,10 @@ class CallProgressComponent {
|
|
|
4063
4094
|
onCloseC2CInfoPanel() {
|
|
4064
4095
|
var _a;
|
|
4065
4096
|
// this.isClickExpand = false;
|
|
4066
|
-
let businessInfo = (_a = this.currentConferenceCall) === null || _a === void 0 ? void 0 : _a.participants.find((item) => !!(item === null || item === void 0 ? void 0 : item.businessNumber) && this.deviceNumberList.includes(item === null || item === void 0 ? void 0 : item.to) && (item === null || item === void 0 ? void 0 : item.host));
|
|
4097
|
+
let businessInfo = (_a = this.currentConferenceCall) === null || _a === void 0 ? void 0 : _a.participants.find((item) => !!(item === null || item === void 0 ? void 0 : item.businessNumber) && this.deviceNumberList.includes(item === null || item === void 0 ? void 0 : item.to) && !(item === null || item === void 0 ? void 0 : item.host));
|
|
4067
4098
|
if (businessInfo) {
|
|
4068
|
-
this.selectedUserInfo = businessInfo;
|
|
4069
|
-
this.toggleC2CInfoPanel(
|
|
4099
|
+
this.selectedUserInfo = this.currentCallList.find(res => (businessInfo === null || businessInfo === void 0 ? void 0 : businessInfo.id) == (res === null || res === void 0 ? void 0 : res.id));
|
|
4100
|
+
this.toggleC2CInfoPanel(this.selectedUserInfo);
|
|
4070
4101
|
}
|
|
4071
4102
|
else {
|
|
4072
4103
|
this.isClickExpand = false;
|