@vgroup/dialbox 0.5.48 → 0.5.50
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/call-progress.component.mjs +5 -5
- package/esm2020/lib/dialbox.component.mjs +55 -5
- package/esm2020/lib/environments/environments.mjs +10 -10
- package/fesm2015/vgroup-dialbox.mjs +98 -50
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +67 -17
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/dialbox.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export const environment = {
|
|
2
|
-
abb: "
|
|
2
|
+
abb: "d",
|
|
3
3
|
production: false,
|
|
4
4
|
secureCookies: true,
|
|
5
|
-
feUrl: 'https://
|
|
6
|
-
apiUrl: 'https://
|
|
7
|
-
websocketUrl: 'wss://
|
|
5
|
+
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
6
|
+
apiUrl: 'https://dev-api-t10.vgroupinc.com/dev_softphone_p91',
|
|
7
|
+
websocketUrl: 'wss://dev-api-t10.vgroupinc.com/dev_softphone_p91/',
|
|
8
8
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
9
|
-
stripePublishableKey: "
|
|
9
|
+
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
10
10
|
sessionTimeout: 15,
|
|
11
11
|
deviceType: "web",
|
|
12
12
|
appVersion: "2.3",
|
|
13
13
|
channelId: '61481b12e138eb7dc3007579',
|
|
14
14
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
15
|
-
c2c_support_channel_id: '
|
|
15
|
+
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
16
16
|
c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
|
|
17
|
-
c2c_call_label_id: '
|
|
18
|
-
c2c_email_label_id: '
|
|
17
|
+
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
18
|
+
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
19
19
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
20
20
|
firebase: {
|
|
21
21
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -29,7 +29,7 @@ export const environment = {
|
|
|
29
29
|
},
|
|
30
30
|
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
|
|
31
31
|
keycloakURL: 'https://test-keycloak.vgroupinc.com/',
|
|
32
|
-
keycloakRealm: 'vgroup-
|
|
32
|
+
keycloakRealm: 'vgroup-dev',
|
|
33
33
|
keycloakClientId: 'c2c-softphone-app'
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW52aXJvbm1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGlhbGJveC9zcmMvbGliL2Vudmlyb25tZW50cy9lbnZpcm9ubWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sV0FBVyxHQUFHO0lBQ3pCLEdBQUcsRUFBRSxHQUFHO0lBQ1IsVUFBVSxFQUFFLEtBQUs7SUFDakIsYUFBYSxFQUFFLElBQUk7SUFDbkIsS0FBSyxFQUFFLCtCQUErQjtJQUN0QyxNQUFNLEVBQUUscURBQXFEO0lBQzdELFlBQVksRUFBRSxvREFBb0Q7SUFDbEUsVU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cclxuICBmaXJlYmFzZToge1xyXG4gICAgYXBpS2V5OiBcIkFJemFTeUNBOExTUHJxbERxX3RoazI2TGhCUWV4QVFlWTZwa1U1WVwiLFxyXG4gICAgYXV0aERvbWFpbjogXCJzb2Z0cGhvbmUtZDU3NzcuZmlyZWJhc2VhcHAuY29tXCIsXHJcbiAgICBwcm9qZWN0SWQ6IFwic29mdHBob25lLWQ1Nzc3XCIsXHJcbiAgICBzdG9yYWdlQnVja2V0OiBcInNvZnRwaG9uZS1kNTc3Ny5hcHBzcG90LmNvbVwiLFxyXG4gICAgbWVzc2FnaW5nU2VuZGVySWQ6IFwiODUwODEyNDk0NTM4XCIsXHJcbiAgICBhcHBJZDogXCIxOjg1MDgxMjQ5NDUzODp3ZWI6NzRmOGEzMGZjMThlMjhkZWQ3OGEzM1wiLFxyXG4gICAgbWVhc3VyZW1lbnRJZDogXCJHLU5HWFRTVjlTSDNcIixcclxuICAgIHZhcGlkS2V5OiBcIkJENkVnY1FnYlpUak9RZmxlRzNZbEVjMF9TYWpCMDNwcnFUZER5LXFHSmt4VHhlemJxLUFfcXR1WEUxbDN5VDQ3bzhoblRBYlRLQmNIMTVEMkFKQjJUb1wiXHJcbiAgfSxcclxuICBwZXJzcGVjdGl2ZUFwaUtleTogJ0FJemFTeUNsZjMybHZMSDRRT3ktdk9uekx6d1NObnRLSWdhcEg4cycsXHJcbiAga2V5Y2xvYWtVUkw6ICdodHRwczovL3Rlc3Qta2V5Y2xvYWsudmdyb3VwaW5jLmNvbS8nLFxyXG4gIGtleWNsb2FrUmVhbG06ICd2Z3JvdXAtZGV2JyxcclxuICBrZXljbG9ha0NsaWVudElkOiAnYzJjLXNvZnRwaG9uZS1hcHAnXHJcbn07Il19
|
|
@@ -64,23 +64,23 @@ const keypad = [
|
|
|
64
64
|
];
|
|
65
65
|
|
|
66
66
|
const environment = {
|
|
67
|
-
abb: "
|
|
67
|
+
abb: "d",
|
|
68
68
|
production: false,
|
|
69
69
|
secureCookies: true,
|
|
70
|
-
feUrl: 'https://
|
|
71
|
-
apiUrl: 'https://
|
|
72
|
-
websocketUrl: 'wss://
|
|
70
|
+
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
71
|
+
apiUrl: 'https://dev-api-t10.vgroupinc.com/dev_softphone_p91',
|
|
72
|
+
websocketUrl: 'wss://dev-api-t10.vgroupinc.com/dev_softphone_p91/',
|
|
73
73
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
74
|
-
stripePublishableKey: "
|
|
74
|
+
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
75
75
|
sessionTimeout: 15,
|
|
76
76
|
deviceType: "web",
|
|
77
77
|
appVersion: "2.3",
|
|
78
78
|
channelId: '61481b12e138eb7dc3007579',
|
|
79
79
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
80
|
-
c2c_support_channel_id: '
|
|
80
|
+
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
81
81
|
c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
|
|
82
|
-
c2c_call_label_id: '
|
|
83
|
-
c2c_email_label_id: '
|
|
82
|
+
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
83
|
+
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
84
84
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
85
85
|
firebase: {
|
|
86
86
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -94,7 +94,7 @@ const environment = {
|
|
|
94
94
|
},
|
|
95
95
|
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
|
|
96
96
|
keycloakURL: 'https://test-keycloak.vgroupinc.com/',
|
|
97
|
-
keycloakRealm: 'vgroup-
|
|
97
|
+
keycloakRealm: 'vgroup-dev',
|
|
98
98
|
keycloakClientId: 'c2c-softphone-app'
|
|
99
99
|
};
|
|
100
100
|
|
|
@@ -1834,7 +1834,7 @@ class CallProgressComponent {
|
|
|
1834
1834
|
if (this.currentCallList.length > 0) {
|
|
1835
1835
|
let index = this.currentCallList.findIndex((item) => item.id == res.id);
|
|
1836
1836
|
if (index == -1 && !res.isLeft) {
|
|
1837
|
-
this.currentCallList.push(Object.assign(Object.assign({}, res), { img:
|
|
1837
|
+
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.image) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: res.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo.conferenceSid, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()) }));
|
|
1838
1838
|
if (this.showContactsPanel) {
|
|
1839
1839
|
this.getAllParticipants(this.currentCall.conferenceSid);
|
|
1840
1840
|
this.applyFilter();
|
|
@@ -1876,11 +1876,11 @@ class CallProgressComponent {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
else if (index != -1) {
|
|
1879
|
-
this.currentCallList[index] = Object.assign(Object.assign({}, res), { img:
|
|
1879
|
+
this.currentCallList[index] = Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.image) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: res.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo.conferenceSid, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()) });
|
|
1880
1880
|
}
|
|
1881
1881
|
}
|
|
1882
1882
|
else if (!res.isLeft) {
|
|
1883
|
-
this.currentCallList.push(Object.assign(Object.assign({}, res), { img:
|
|
1883
|
+
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.image) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: res.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo.conferenceSid, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()) }));
|
|
1884
1884
|
this.timer = '00:00';
|
|
1885
1885
|
this.startTimer();
|
|
1886
1886
|
}
|
|
@@ -2481,7 +2481,7 @@ class CallProgressComponent {
|
|
|
2481
2481
|
else {
|
|
2482
2482
|
let index = this.currentCallList.findIndex((res) => res.participantId == data.participantId);
|
|
2483
2483
|
this.currentCallList.splice(index, 1);
|
|
2484
|
-
swal("Error", res === null || res === void 0 ? void 0 : res.message
|
|
2484
|
+
swal("Error", res === null || res === void 0 ? void 0 : res.message, "error");
|
|
2485
2485
|
this.incomeingCallSocketService.pause();
|
|
2486
2486
|
this.endCallEvent.emit(data);
|
|
2487
2487
|
}
|
|
@@ -3553,6 +3553,9 @@ class DialboxComponent {
|
|
|
3553
3553
|
try {
|
|
3554
3554
|
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => __awaiter(this, void 0, void 0, function* () {
|
|
3555
3555
|
var _a, _b;
|
|
3556
|
+
// const data = JSON.parse(incomingCallData.data);
|
|
3557
|
+
// console.log("WS Event Received:", incomingCallData);
|
|
3558
|
+
// console.log("WS Event Received:", incomingCallData.data);
|
|
3556
3559
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3557
3560
|
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; }) : [];
|
|
3558
3561
|
if (!!(incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length)) {
|
|
@@ -3591,6 +3594,45 @@ class DialboxComponent {
|
|
|
3591
3594
|
(_b = this.twilioService.device) === null || _b === void 0 ? void 0 : _b.disconnectAll();
|
|
3592
3595
|
}
|
|
3593
3596
|
}
|
|
3597
|
+
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3598
|
+
// this.initializeTwilio();
|
|
3599
|
+
// if (incomingCallData.type === "/incoming/call") {
|
|
3600
|
+
// if (incomingCallData) {
|
|
3601
|
+
// if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3602
|
+
// this._isDialpadHidden = false;
|
|
3603
|
+
// }
|
|
3604
|
+
// if (this.isCallInProgress) {
|
|
3605
|
+
// this.newIncomingCalls.push(incomingCallData);
|
|
3606
|
+
// console.log('325', incomingCallData)
|
|
3607
|
+
// this.getUserInformation(incomingCallData);
|
|
3608
|
+
// } else {
|
|
3609
|
+
// incomingCallData['isFirstCall'] = true;
|
|
3610
|
+
// console.log('dd1')
|
|
3611
|
+
// this.isCallInProgress = true;
|
|
3612
|
+
// this.isDialpadHidden = false;
|
|
3613
|
+
// this.callData.phone = incomingCallData.parameters['From'];
|
|
3614
|
+
// console.log('dd2')
|
|
3615
|
+
// this.getUserInformation(incomingCallData);
|
|
3616
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3617
|
+
// this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3618
|
+
// this.callData.isIncomingCall = true;
|
|
3619
|
+
// }
|
|
3620
|
+
// incomingCallData.on('cancel', () => {
|
|
3621
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3622
|
+
// // if(this.incomingCallsList.length == 0){
|
|
3623
|
+
// // console.log('dd3')
|
|
3624
|
+
// // this.isCallInProgress = false;
|
|
3625
|
+
// // }
|
|
3626
|
+
// });
|
|
3627
|
+
// incomingCallData.on('disconnect', () => {
|
|
3628
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3629
|
+
// // if(this.incomingCallsList.length == 0){
|
|
3630
|
+
// // console.log('dd4')
|
|
3631
|
+
// // this.isCallInProgress = false;
|
|
3632
|
+
// // }
|
|
3633
|
+
// });
|
|
3634
|
+
// }
|
|
3635
|
+
// }
|
|
3594
3636
|
}));
|
|
3595
3637
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3596
3638
|
//this.isCallInProgress = true;
|
|
@@ -3653,6 +3695,14 @@ class DialboxComponent {
|
|
|
3653
3695
|
});
|
|
3654
3696
|
// handle incoming call (managed internally; host need not pass incomingCallData)
|
|
3655
3697
|
const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
|
|
3698
|
+
// if (incomingCallData) {
|
|
3699
|
+
// this.isCallInProgress = true;
|
|
3700
|
+
// this.isDialpadHidden = false;
|
|
3701
|
+
// this.callData.phone = incomingCallData.parameters.From;
|
|
3702
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3703
|
+
// this.callData.img = incomingCallData.customParameters.get('image');
|
|
3704
|
+
// this.callData.isIncomingCall = true;
|
|
3705
|
+
// }
|
|
3656
3706
|
if (incomingCallData) {
|
|
3657
3707
|
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3658
3708
|
this._isDialpadHidden = false;
|
|
@@ -3751,7 +3801,6 @@ class DialboxComponent {
|
|
|
3751
3801
|
this.cdk.detectChanges();
|
|
3752
3802
|
}
|
|
3753
3803
|
console.log('test', this.incomingCallsList);
|
|
3754
|
-
this.incomeingCallSocketService.pause();
|
|
3755
3804
|
this.isIncomingCallnotification = false;
|
|
3756
3805
|
if (!((_e = this.incomingCallsList) === null || _e === void 0 ? void 0 : _e.length)) {
|
|
3757
3806
|
this.isCallInProgress = false;
|
|
@@ -3922,43 +3971,42 @@ class DialboxComponent {
|
|
|
3922
3971
|
}
|
|
3923
3972
|
}
|
|
3924
3973
|
incomingCallNotification(callerInfo) {
|
|
3925
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3974
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3975
|
+
let incomingCall = {
|
|
3976
|
+
conferenceId: 'no',
|
|
3977
|
+
isActive: true,
|
|
3978
|
+
isIncomingCall: true,
|
|
3979
|
+
participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
|
|
3980
|
+
participants: [
|
|
3981
|
+
{ direction: "incoming-call", img: ((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.image) || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.fromNumber, to: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.toNumber,
|
|
3982
|
+
from: (_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.fromNumber, fromName: (_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.fromName, participantId: (_g = this.incomingCallnotification.data.data) === null || _g === void 0 ? void 0 : _g.participantId, name: (_h = this.incomingCallnotification.data.data) === null || _h === void 0 ? void 0 : _h.fromName, time: '', id: (_j = this.incomingCallnotification.data.data) === null || _j === void 0 ? void 0 : _j.participantId }
|
|
3983
|
+
],
|
|
3984
|
+
};
|
|
3985
|
+
if (callerInfo) {
|
|
3986
|
+
incomingCall.participants[0]['email'] = callerInfo.email;
|
|
3987
|
+
incomingCall.participants[0]['name'] = callerInfo.name;
|
|
3988
|
+
incomingCall.participants[0]['image'] = callerInfo.image;
|
|
3989
|
+
incomingCall.participants[0]['extension'] = callerInfo.extension;
|
|
3990
|
+
incomingCall.participants[0]['userInfoId'] = callerInfo.id;
|
|
3991
|
+
incomingCall.participants[0]['message'] = callerInfo.message;
|
|
3992
|
+
incomingCall.participants[0]['note'] = callerInfo.note;
|
|
3993
|
+
incomingCall.participants[0]['number'] = callerInfo.number;
|
|
3994
|
+
incomingCall.participants[0]['pointName'] = callerInfo.pointName;
|
|
3995
|
+
incomingCall.participants[0]['softphoneTwilioAuthId'] = callerInfo.softphoneTwilioAuthId;
|
|
3996
|
+
incomingCall.participants[0]['sourceName'] = callerInfo.sourceName;
|
|
3997
|
+
incomingCall.participants[0]['subject'] = callerInfo.subject;
|
|
3998
|
+
}
|
|
3999
|
+
const now = new Date().getTime();
|
|
4000
|
+
incomingCall['endTime'] = (new Date().getTime() + 45 * 1000);
|
|
4001
|
+
this.notificationCallList.push(incomingCall);
|
|
4002
|
+
this.notificationCallList = this.notificationCallList.filter((res) => (res === null || res === void 0 ? void 0 : res.endTime) >= now);
|
|
4003
|
+
this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
|
|
4004
|
+
this.cdk.detectChanges();
|
|
4005
|
+
if ((_k = this.incomingCallnotification.data.data) === null || _k === void 0 ? void 0 : _k.participantId) {
|
|
4006
|
+
this.isCallInProgress = true;
|
|
3955
4007
|
this.cdk.detectChanges();
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
this.cdk.detectChanges();
|
|
3959
|
-
this.isDialpadHidden = false;
|
|
3960
|
-
}
|
|
3961
|
-
});
|
|
4008
|
+
this.isDialpadHidden = false;
|
|
4009
|
+
}
|
|
3962
4010
|
}
|
|
3963
4011
|
addNumber(num) {
|
|
3964
4012
|
if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {
|