@vgroup/dialbox 0.5.45 → 0.5.47

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.
@@ -63,23 +63,23 @@ const keypad = [
63
63
  ];
64
64
 
65
65
  const environment = {
66
- abb: "d",
66
+ abb: "t",
67
67
  production: false,
68
68
  secureCookies: true,
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/',
69
+ feUrl: 'https://test.vgroupinc.com:91/',
70
+ apiUrl: 'https://apis.vgroupinc.com/test_softphone',
71
+ websocketUrl: 'wss://apis.vgroupinc.com/test_softphone/',
72
72
  captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
73
- stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
73
+ stripePublishableKey: "pk_test_51NbMVaA3guus6fhlTuCV5ycFTIJmwgN38dDUf9pNPfM319x5CkLbV6EbTQaZiNOrRsfR16RWLE8hQmR0eZFTBqTy00Wlsug4qS",
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: '677f67f3be93ab507fbbfdfc',
79
+ c2c_support_channel_id: '677f6726be93ab507fbbfdf0',
80
80
  c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
81
- c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
82
- c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
81
+ c2c_call_label_id: '6NU5fKE2mGTyXDC3yhmK',
82
+ c2c_email_label_id: 'YPMamj8RvsGORVvqXWyc',
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-dev',
96
+ keycloakRealm: 'vgroup-test',
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?.image || contact?.image || 'assets/images/user.jpg',
1845
+ img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || 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?.image || contact?.image || 'assets/images/user.jpg',
1901
+ img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || 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?.image || contact?.image || 'assets/images/user.jpg',
1919
+ img: res.direction == "incoming-call" ? res?.toImage : res?.fromImage || contact?.image || 'assets/images/user.jpg',
1920
1920
  isIncomingCall: res.direction == "incoming-call",
1921
1921
  isHold: res.isHold,
1922
1922
  isMute: false,
@@ -3584,9 +3584,6 @@ 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);
3590
3587
  this.twilioService.conferenceCallInfo = incomingCallData;
3591
3588
  incomingCallData = incomingCallData?.length > 0 ? incomingCallData.filter((item) => item.participants?.length > 0) : [];
3592
3589
  if (!!incomingCallData?.length) {
@@ -3625,45 +3622,6 @@ class DialboxComponent {
3625
3622
  this.twilioService.device?.disconnectAll();
3626
3623
  }
3627
3624
  }
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
- // }
3667
3625
  });
3668
3626
  this.token = localStorage.getItem('ext_token') || '';
3669
3627
  //this.isCallInProgress = true;
@@ -3726,14 +3684,6 @@ class DialboxComponent {
3726
3684
  });
3727
3685
  // handle incoming call (managed internally; host need not pass incomingCallData)
3728
3686
  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
- // }
3737
3687
  if (incomingCallData) {
3738
3688
  if (this.autoOpenOnIncoming && this._isDialpadHidden) {
3739
3689
  this._isDialpadHidden = false;
@@ -3831,6 +3781,7 @@ class DialboxComponent {
3831
3781
  this.cdk.detectChanges();
3832
3782
  }
3833
3783
  console.log('test', this.incomingCallsList);
3784
+ this.incomeingCallSocketService.pause();
3834
3785
  this.isIncomingCallnotification = false;
3835
3786
  if (!this.incomingCallsList?.length) {
3836
3787
  this.isCallInProgress = false;
@@ -4000,17 +3951,18 @@ class DialboxComponent {
4000
3951
  console.log(e);
4001
3952
  }
4002
3953
  }
4003
- incomingCallNotification(callerInfo) {
3954
+ async incomingCallNotification(callerInfo) {
4004
3955
  let incomingCall = {
4005
3956
  conferenceId: 'no',
4006
3957
  isActive: true,
4007
3958
  isIncomingCall: true,
4008
3959
  participantId: this.incomingCallnotification.data.data?.participantId,
4009
3960
  participants: [
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,
3961
+ { direction: "incoming-call", img: this.incomingCallnotification.data.data?.fromImage || 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,
4011
3962
  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 }
4012
3963
  ],
4013
3964
  };
3965
+ this.notificationCallList = await this.notificationCallList.filter((res) => res?.endTime > (new Date().getTime()));
4014
3966
  if (callerInfo) {
4015
3967
  incomingCall.participants[0]['email'] = callerInfo.email;
4016
3968
  incomingCall.participants[0]['name'] = callerInfo.name;
@@ -4025,10 +3977,8 @@ class DialboxComponent {
4025
3977
  incomingCall.participants[0]['sourceName'] = callerInfo.sourceName;
4026
3978
  incomingCall.participants[0]['subject'] = callerInfo.subject;
4027
3979
  }
4028
- const now = new Date().getTime();
4029
3980
  incomingCall['endTime'] = (new Date().getTime() + 45 * 1000);
4030
3981
  this.notificationCallList.push(incomingCall);
4031
- this.notificationCallList = this.notificationCallList.filter((res) => res?.endTime >= now);
4032
3982
  this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
4033
3983
  this.cdk.detectChanges();
4034
3984
  if (this.incomingCallnotification.data.data?.participantId) {