@vgroup/dialbox 0.5.47 → 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 +4 -4
- package/esm2020/lib/dialbox.component.mjs +55 -5
- package/esm2020/lib/environments/environments.mjs +10 -10
- package/fesm2015/vgroup-dialbox.mjs +97 -49
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +66 -16
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/dialbox.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -63,23 +63,23 @@ const keypad = [
|
|
|
63
63
|
];
|
|
64
64
|
|
|
65
65
|
const environment = {
|
|
66
|
-
abb: "
|
|
66
|
+
abb: "d",
|
|
67
67
|
production: false,
|
|
68
68
|
secureCookies: true,
|
|
69
|
-
feUrl: 'https://
|
|
70
|
-
apiUrl: 'https://
|
|
71
|
-
websocketUrl: 'wss://
|
|
69
|
+
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
70
|
+
apiUrl: 'https://dev-api-t10.vgroupinc.com/dev_softphone_p91',
|
|
71
|
+
websocketUrl: 'wss://dev-api-t10.vgroupinc.com/dev_softphone_p91/',
|
|
72
72
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
73
|
-
stripePublishableKey: "
|
|
73
|
+
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
74
74
|
sessionTimeout: 15,
|
|
75
75
|
deviceType: "web",
|
|
76
76
|
appVersion: "2.3",
|
|
77
77
|
channelId: '61481b12e138eb7dc3007579',
|
|
78
78
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
79
|
-
c2c_support_channel_id: '
|
|
79
|
+
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
80
80
|
c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
|
|
81
|
-
c2c_call_label_id: '
|
|
82
|
-
c2c_email_label_id: '
|
|
81
|
+
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
82
|
+
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
83
83
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
84
84
|
firebase: {
|
|
85
85
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -93,7 +93,7 @@ const environment = {
|
|
|
93
93
|
},
|
|
94
94
|
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
|
|
95
95
|
keycloakURL: 'https://test-keycloak.vgroupinc.com/',
|
|
96
|
-
keycloakRealm: 'vgroup-
|
|
96
|
+
keycloakRealm: 'vgroup-dev',
|
|
97
97
|
keycloakClientId: 'c2c-softphone-app'
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -1842,7 +1842,7 @@ class CallProgressComponent {
|
|
|
1842
1842
|
if (index == -1 && !res.isLeft) {
|
|
1843
1843
|
this.currentCallList.push({
|
|
1844
1844
|
...res,
|
|
1845
|
-
img: res
|
|
1845
|
+
img: res?.image || contact?.image || 'assets/images/user.jpg',
|
|
1846
1846
|
isIncomingCall: res.direction == "incoming-call",
|
|
1847
1847
|
isHold: res.isHold,
|
|
1848
1848
|
isMute: false,
|
|
@@ -1898,7 +1898,7 @@ class CallProgressComponent {
|
|
|
1898
1898
|
else if (index != -1) {
|
|
1899
1899
|
this.currentCallList[index] = {
|
|
1900
1900
|
...res,
|
|
1901
|
-
img: res
|
|
1901
|
+
img: res?.image || contact?.image || 'assets/images/user.jpg',
|
|
1902
1902
|
isIncomingCall: res.direction == "incoming-call",
|
|
1903
1903
|
isHold: res.isHold,
|
|
1904
1904
|
isMute: false,
|
|
@@ -1916,7 +1916,7 @@ class CallProgressComponent {
|
|
|
1916
1916
|
else if (!res.isLeft) {
|
|
1917
1917
|
this.currentCallList.push({
|
|
1918
1918
|
...res,
|
|
1919
|
-
img: res
|
|
1919
|
+
img: res?.image || contact?.image || 'assets/images/user.jpg',
|
|
1920
1920
|
isIncomingCall: res.direction == "incoming-call",
|
|
1921
1921
|
isHold: res.isHold,
|
|
1922
1922
|
isMute: false,
|
|
@@ -3584,6 +3584,9 @@ class DialboxComponent {
|
|
|
3584
3584
|
this.incomeingCallSocketService.connect(this.deviceId);
|
|
3585
3585
|
try {
|
|
3586
3586
|
this.incomeingCallSocketService.listen().subscribe(async (incomingCallData) => {
|
|
3587
|
+
// const data = JSON.parse(incomingCallData.data);
|
|
3588
|
+
// console.log("WS Event Received:", incomingCallData);
|
|
3589
|
+
// console.log("WS Event Received:", incomingCallData.data);
|
|
3587
3590
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3588
3591
|
incomingCallData = incomingCallData?.length > 0 ? incomingCallData.filter((item) => item.participants?.length > 0) : [];
|
|
3589
3592
|
if (!!incomingCallData?.length) {
|
|
@@ -3622,6 +3625,45 @@ class DialboxComponent {
|
|
|
3622
3625
|
this.twilioService.device?.disconnectAll();
|
|
3623
3626
|
}
|
|
3624
3627
|
}
|
|
3628
|
+
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3629
|
+
// this.initializeTwilio();
|
|
3630
|
+
// if (incomingCallData.type === "/incoming/call") {
|
|
3631
|
+
// if (incomingCallData) {
|
|
3632
|
+
// if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3633
|
+
// this._isDialpadHidden = false;
|
|
3634
|
+
// }
|
|
3635
|
+
// if (this.isCallInProgress) {
|
|
3636
|
+
// this.newIncomingCalls.push(incomingCallData);
|
|
3637
|
+
// console.log('325', incomingCallData)
|
|
3638
|
+
// this.getUserInformation(incomingCallData);
|
|
3639
|
+
// } else {
|
|
3640
|
+
// incomingCallData['isFirstCall'] = true;
|
|
3641
|
+
// console.log('dd1')
|
|
3642
|
+
// this.isCallInProgress = true;
|
|
3643
|
+
// this.isDialpadHidden = false;
|
|
3644
|
+
// this.callData.phone = incomingCallData.parameters['From'];
|
|
3645
|
+
// console.log('dd2')
|
|
3646
|
+
// this.getUserInformation(incomingCallData);
|
|
3647
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3648
|
+
// this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3649
|
+
// this.callData.isIncomingCall = true;
|
|
3650
|
+
// }
|
|
3651
|
+
// incomingCallData.on('cancel', () => {
|
|
3652
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3653
|
+
// // if(this.incomingCallsList.length == 0){
|
|
3654
|
+
// // console.log('dd3')
|
|
3655
|
+
// // this.isCallInProgress = false;
|
|
3656
|
+
// // }
|
|
3657
|
+
// });
|
|
3658
|
+
// incomingCallData.on('disconnect', () => {
|
|
3659
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3660
|
+
// // if(this.incomingCallsList.length == 0){
|
|
3661
|
+
// // console.log('dd4')
|
|
3662
|
+
// // this.isCallInProgress = false;
|
|
3663
|
+
// // }
|
|
3664
|
+
// });
|
|
3665
|
+
// }
|
|
3666
|
+
// }
|
|
3625
3667
|
});
|
|
3626
3668
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3627
3669
|
//this.isCallInProgress = true;
|
|
@@ -3684,6 +3726,14 @@ class DialboxComponent {
|
|
|
3684
3726
|
});
|
|
3685
3727
|
// handle incoming call (managed internally; host need not pass incomingCallData)
|
|
3686
3728
|
const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
|
|
3729
|
+
// if (incomingCallData) {
|
|
3730
|
+
// this.isCallInProgress = true;
|
|
3731
|
+
// this.isDialpadHidden = false;
|
|
3732
|
+
// this.callData.phone = incomingCallData.parameters.From;
|
|
3733
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3734
|
+
// this.callData.img = incomingCallData.customParameters.get('image');
|
|
3735
|
+
// this.callData.isIncomingCall = true;
|
|
3736
|
+
// }
|
|
3687
3737
|
if (incomingCallData) {
|
|
3688
3738
|
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3689
3739
|
this._isDialpadHidden = false;
|
|
@@ -3781,7 +3831,6 @@ class DialboxComponent {
|
|
|
3781
3831
|
this.cdk.detectChanges();
|
|
3782
3832
|
}
|
|
3783
3833
|
console.log('test', this.incomingCallsList);
|
|
3784
|
-
this.incomeingCallSocketService.pause();
|
|
3785
3834
|
this.isIncomingCallnotification = false;
|
|
3786
3835
|
if (!this.incomingCallsList?.length) {
|
|
3787
3836
|
this.isCallInProgress = false;
|
|
@@ -3951,18 +4000,17 @@ class DialboxComponent {
|
|
|
3951
4000
|
console.log(e);
|
|
3952
4001
|
}
|
|
3953
4002
|
}
|
|
3954
|
-
|
|
4003
|
+
incomingCallNotification(callerInfo) {
|
|
3955
4004
|
let incomingCall = {
|
|
3956
4005
|
conferenceId: 'no',
|
|
3957
4006
|
isActive: true,
|
|
3958
4007
|
isIncomingCall: true,
|
|
3959
4008
|
participantId: this.incomingCallnotification.data.data?.participantId,
|
|
3960
4009
|
participants: [
|
|
3961
|
-
{ direction: "incoming-call", img: this.incomingCallnotification.data.data?.
|
|
4010
|
+
{ direction: "incoming-call", img: this.incomingCallnotification.data.data?.image || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: this.incomingCallnotification.data.data?.fromNumber, to: this.incomingCallnotification.data.data?.toNumber,
|
|
3962
4011
|
from: this.incomingCallnotification.data.data?.fromNumber, fromName: this.incomingCallnotification.data.data?.fromName, participantId: this.incomingCallnotification.data.data?.participantId, name: this.incomingCallnotification.data.data?.fromName, time: '', id: this.incomingCallnotification.data.data?.participantId }
|
|
3963
4012
|
],
|
|
3964
4013
|
};
|
|
3965
|
-
this.notificationCallList = await this.notificationCallList.filter((res) => res?.endTime > (new Date().getTime()));
|
|
3966
4014
|
if (callerInfo) {
|
|
3967
4015
|
incomingCall.participants[0]['email'] = callerInfo.email;
|
|
3968
4016
|
incomingCall.participants[0]['name'] = callerInfo.name;
|
|
@@ -3977,8 +4025,10 @@ class DialboxComponent {
|
|
|
3977
4025
|
incomingCall.participants[0]['sourceName'] = callerInfo.sourceName;
|
|
3978
4026
|
incomingCall.participants[0]['subject'] = callerInfo.subject;
|
|
3979
4027
|
}
|
|
4028
|
+
const now = new Date().getTime();
|
|
3980
4029
|
incomingCall['endTime'] = (new Date().getTime() + 45 * 1000);
|
|
3981
4030
|
this.notificationCallList.push(incomingCall);
|
|
4031
|
+
this.notificationCallList = this.notificationCallList.filter((res) => res?.endTime >= now);
|
|
3982
4032
|
this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
|
|
3983
4033
|
this.cdk.detectChanges();
|
|
3984
4034
|
if (this.incomingCallnotification.data.data?.participantId) {
|