@vgroup/dialbox 0.7.92 → 0.7.94

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.
@@ -1,21 +1,21 @@
1
1
  export const environment = {
2
- abb: "t",
3
- production: false,
2
+ abb: "p",
3
+ production: true,
4
4
  secureCookies: true,
5
- feUrl: 'https://test.vgroupinc.com:91/',
6
- apiUrl: 'https://apis.vgroupinc.com/test_softphone',
7
- websocketUrl: 'wss://apis.vgroupinc.com/test_softphone/',
5
+ feUrl: 'https://app-phone.contexttocall.com/',
6
+ apiUrl: 'https://phone-api.contexttocall.com/softphone/',
7
+ websocketUrl: 'wss://phone-api.contexttocall.com/softphone/',
8
8
  captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
9
- stripePublishableKey: "pk_test_51NbMVaA3guus6fhlTuCV5ycFTIJmwgN38dDUf9pNPfM319x5CkLbV6EbTQaZiNOrRsfR16RWLE8hQmR0eZFTBqTy00Wlsug4qS",
9
+ stripePublishableKey: "pk_live_51OV9NYDjRTFWP7oMLrrgaWxCUp4nzeuwdDCCPjvwH7z6oDYUTierhavGMxBa411U0O27Yn24te7Hb43WFDwg2U7N00qbQUzTi6",
10
10
  sessionTimeout: 15,
11
11
  deviceType: "web",
12
- appVersion: "2.3",
13
- channelId: '61481b12e138eb7dc3007579',
12
+ appVersion: "3.2",
13
+ channelId: '6511738039ee10367cbde2e9',
14
14
  c2c_support_point_id: '60424735f74ac306c1bfa900',
15
- c2c_support_channel_id: '677f6726be93ab507fbbfdf0',
16
- c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
17
- c2c_call_label_id: '6NU5fKE2mGTyXDC3yhmK',
18
- c2c_email_label_id: 'YPMamj8RvsGORVvqXWyc',
15
+ c2c_support_channel_id: '67783949be93ab03faf8eea6',
16
+ c2c_point_url: 'https://bit.ly/3blWnPv',
17
+ c2c_call_label_id: 'Bn78kjz6sSottXSHgqMt',
18
+ c2c_email_label_id: 'UkNer4LgzXCfFlh8u909',
19
19
  radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
20
20
  firebase: {
21
21
  apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
@@ -27,9 +27,6 @@ export const environment = {
27
27
  measurementId: "G-NGXTSV9SH3",
28
28
  vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
29
29
  },
30
- perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
31
- keycloakURL: 'https://test-keycloak.vgroupinc.com/',
32
- keycloakRealm: 'vgroup-test',
33
- keycloakClientId: 'c2c-softphone-app'
30
+ perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
34
31
  };
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW52aXJvbm1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGlhbGJveC9zcmMvbGliL2Vudmlyb25tZW50cy9lbnZpcm9ubWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sV0FBVyxHQUFHO0lBQ3pCLEdBQUcsRUFBRSxHQUFHO0lBQ1IsVUFBVSxFQUFFLEtBQUs7SUFDakIsYUFBYSxFQUFFLElBQUk7SUFDbkIsS0FBSyxFQUFDLGdDQUFnQztJQUN0QyxNQUFNLEVBQUUsMkNBQTJDO0lBQ2pELFlBQVksRUFBRSwwQ0FBMEM7SUFDMUQsVUFBVSxFQUFFLDBDQUEwQztJQUN0RCxvQkFBb0IsRUFBRSw2R0FBNkc7SUFDbkksY0FBYyxFQUFFLEVBQUU7SUFDbEIsVUFBVSxFQ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NmY2MzllZGRlNjEyMGEyNmY3MDM1MTFjNjFhYWVjZDNmN2VmJyxcclxuICBmaXJlYmFzZToge1xyXG4gICAgICBhcGlLZXk6IFwiQUl6YVN5Q0E4TFNQcnFsRHFfdGhrMjZMaEJRZXhBUWVZNnBrVTVZXCIsXHJcbiAgICAgIGF1dGhEb21haW46IFwic29mdHBob25lLWQ1Nzc3LmZpcmViYXNlYXBwLmNvbVwiLFxyXG4gICAgICBwcm9qZWN0SWQ6IFwic29mdHBob25lLWQ1Nzc3XCIsXHJcbiAgICAgIHN0b3JhZ2VCdWNrZXQ6IFwic29mdHBob25lLWQ1Nzc3LmFwcHNwb3QuY29tXCIsXHJcbiAgICAgIG1lc3NhZ2luZ1NlbmRlcklkOiBcIjg1MDgxMjQ5NDUzOFwiLFxyXG4gICAgICBhcHBJZDogXCIxOjg1MDgxMjQ5NDUzODp3ZWI6NzRmOGEzMGZjMThlMjhkZWQ3OGEzM1wiLFxyXG4gICAgICBtZWFzdXJlbWVudElkOiBcIkctTkdYVFNWOVNIM1wiLFxyXG4gICAgICB2YXBpZEtleTpcIkJENkVnY1FnYlpUak9RZmxlRzNZbEVjMF9TYWpCMDNwcnFUZER5LXFHSmt4VHhlemJxLUFfcXR1WEUxbDN5VDQ3bzhoblRBYlRLQmNIMTVEMkFKQjJUb1wiXHJcbiAgfSxcclxuICBwZXJzcGVjdGl2ZUFwaUtleTogJ0FJemFTeUNsZjMybHZMSDRRT3ktdk9uekx6d1NObnRLSWdhcEg4cydcclxufTtcclxuIl19
@@ -63,23 +63,23 @@ const keypad = [
63
63
  ];
64
64
 
65
65
  const environment = {
66
- abb: "t",
67
- production: false,
66
+ abb: "p",
67
+ production: true,
68
68
  secureCookies: true,
69
- feUrl: 'https://test.vgroupinc.com:91/',
70
- apiUrl: 'https://apis.vgroupinc.com/test_softphone',
71
- websocketUrl: 'wss://apis.vgroupinc.com/test_softphone/',
69
+ feUrl: 'https://app-phone.contexttocall.com/',
70
+ apiUrl: 'https://phone-api.contexttocall.com/softphone/',
71
+ websocketUrl: 'wss://phone-api.contexttocall.com/softphone/',
72
72
  captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
73
- stripePublishableKey: "pk_test_51NbMVaA3guus6fhlTuCV5ycFTIJmwgN38dDUf9pNPfM319x5CkLbV6EbTQaZiNOrRsfR16RWLE8hQmR0eZFTBqTy00Wlsug4qS",
73
+ stripePublishableKey: "pk_live_51OV9NYDjRTFWP7oMLrrgaWxCUp4nzeuwdDCCPjvwH7z6oDYUTierhavGMxBa411U0O27Yn24te7Hb43WFDwg2U7N00qbQUzTi6",
74
74
  sessionTimeout: 15,
75
75
  deviceType: "web",
76
- appVersion: "2.3",
77
- channelId: '61481b12e138eb7dc3007579',
76
+ appVersion: "3.2",
77
+ channelId: '6511738039ee10367cbde2e9',
78
78
  c2c_support_point_id: '60424735f74ac306c1bfa900',
79
- c2c_support_channel_id: '677f6726be93ab507fbbfdf0',
80
- c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
81
- c2c_call_label_id: '6NU5fKE2mGTyXDC3yhmK',
82
- c2c_email_label_id: 'YPMamj8RvsGORVvqXWyc',
79
+ c2c_support_channel_id: '67783949be93ab03faf8eea6',
80
+ c2c_point_url: 'https://bit.ly/3blWnPv',
81
+ c2c_call_label_id: 'Bn78kjz6sSottXSHgqMt',
82
+ c2c_email_label_id: 'UkNer4LgzXCfFlh8u909',
83
83
  radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
84
84
  firebase: {
85
85
  apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
@@ -91,10 +91,7 @@ const environment = {
91
91
  measurementId: "G-NGXTSV9SH3",
92
92
  vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
93
93
  },
94
- perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
95
- keycloakURL: 'https://test-keycloak.vgroupinc.com/',
96
- keycloakRealm: 'vgroup-test',
97
- keycloakClientId: 'c2c-softphone-app'
94
+ perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
98
95
  };
99
96
 
100
97
  class IpAddressService {
@@ -2355,7 +2352,6 @@ class CallProgressComponent {
2355
2352
  if (!((_p = this.deviceNumberList) === null || _p === void 0 ? void 0 : _p.length)) {
2356
2353
  this.deviceNumberList = this.callerIdList.map((res) => res.number);
2357
2354
  }
2358
- console.log('newIncomingCallsList', this.newIncomingCallsList);
2359
2355
  this.newIncomingCallsList.forEach((callInfo, i) => {
2360
2356
  var _a, _b, _c;
2361
2357
  this.conferenceId = i == 0 ? this.newIncomingCallsList[i].conferenceId : this.conferenceId;
@@ -2420,7 +2416,6 @@ class CallProgressComponent {
2420
2416
  this.startTimer((_p = this.currentCall) === null || _p === void 0 ? void 0 : _p.joinedAt);
2421
2417
  }
2422
2418
  else if (index != -1 && !(res === null || res === void 0 ? void 0 : res.isLeft)) {
2423
- //console.log(res);
2424
2419
  const participantId = res.id;
2425
2420
  // Check if a mute update is pending for this participant
2426
2421
  const isMutePending = this.pendingMuteParticipants.has(participantId);
@@ -2945,7 +2940,7 @@ class CallProgressComponent {
2945
2940
  setTimeout(() => __awaiter(this, void 0, void 0, function* () {
2946
2941
  var _c, _d, _e, _f, _g;
2947
2942
  try {
2948
- let addClientParticipantRes = this.addClientParticipant({
2943
+ let addClientParticipantRes = yield this.addClientParticipant({
2949
2944
  from: callData === null || callData === void 0 ? void 0 : callData.from,
2950
2945
  route: "OUTGOING",
2951
2946
  participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
@@ -2956,9 +2951,9 @@ class CallProgressComponent {
2956
2951
  deviceId: this.deviceId,
2957
2952
  clientSid: (_d = this.call) === null || _d === void 0 ? void 0 : _d.parameters['CallSid']
2958
2953
  });
2959
- // if(addClientParticipantRes?.status != 200) {
2960
- // swal("Error", addClientParticipantRes?.message.join("<br/>"), "error");
2961
- // }
2954
+ if ((addClientParticipantRes === null || addClientParticipantRes === void 0 ? void 0 : addClientParticipantRes.status) != 200) {
2955
+ swal("Error", addClientParticipantRes === null || addClientParticipantRes === void 0 ? void 0 : addClientParticipantRes.message, "error");
2956
+ }
2962
2957
  this.addRes = yield this.addParticipantToCall({
2963
2958
  from: callData === null || callData === void 0 ? void 0 : callData.from,
2964
2959
  route: "OUTGOING",
@@ -2996,14 +2991,34 @@ class CallProgressComponent {
2996
2991
  this.unholdPendingConference();
2997
2992
  }
2998
2993
  else {
2994
+ console.log(896);
2995
+ this.endCallEvent.emit();
2999
2996
  this.endCall(); // regular call failure – disconnect everything
3000
2997
  }
3001
2998
  }
3002
2999
  }
3003
3000
  catch (error) {
3004
3001
  this.showRingAnimation = false;
3005
- this.handleError(error);
3006
- this.endCall();
3002
+ // Whatever failed above (backend call, Twilio connect, etc.), the "Connecting..."
3003
+ // loader must always come down — previously this was left to endCall()/the socket
3004
+ // feed, and if either of those didn't run (or threw), the loader stayed on screen
3005
+ // forever with no way back to the dialpad.
3006
+ this.extensionService.isLoadershow.next(false);
3007
+ this.isLoadershown.emit(false);
3008
+ if (isNewConference) {
3009
+ this.unholdPendingConference();
3010
+ }
3011
+ else {
3012
+ console.log(896);
3013
+ this.endCallEvent.emit();
3014
+ try {
3015
+ this.endCall(); // regular call failure – disconnect everything
3016
+ }
3017
+ catch (cleanupError) {
3018
+ console.error('Error during call failure cleanup:', cleanupError);
3019
+ }
3020
+ }
3021
+ this.handleError('Call not initiating due to a technical issue. Please try again.');
3007
3022
  return false;
3008
3023
  }
3009
3024
  });
@@ -3105,15 +3120,25 @@ class CallProgressComponent {
3105
3120
  });
3106
3121
  }
3107
3122
  onEndCall(c, isAllCallEnd, isContect) {
3108
- var _a;
3123
+ var _a, _b;
3109
3124
  return __awaiter(this, void 0, void 0, function* () {
3110
- let participantId = isAllCallEnd ? 'all' : c.participantId || (c === null || c === void 0 ? void 0 : c.id);
3125
+ let participantId = isAllCallEnd ? 'all' : (c === null || c === void 0 ? void 0 : c.participantId) || (c === null || c === void 0 ? void 0 : c.id);
3111
3126
  const currentConferenceCallInfo = this.getCurrentCallInfo();
3112
- const participantList = this.newIncomingCallsList.find((callInfo) => (callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId) == (c === null || c === void 0 ? void 0 : c.conferenceId)).participants.filter((resData) => !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
3127
+ // A call that failed/aborted before the backend ever created a conference for it
3128
+ // (e.g. initiateCall()/connectToDevice() threw) has no `c` and no matching entry
3129
+ // here — there is nothing to remove server-side, so just fall through to the
3130
+ // local cleanup below instead of throwing on `undefined.participants`.
3131
+ if (!(c === null || c === void 0 ? void 0 : c.conferenceId) && !isAllCallEnd) {
3132
+ this.conferenceCallIDForParticipantList = currentConferenceCallInfo === null || currentConferenceCallInfo === void 0 ? void 0 : currentConferenceCallInfo.conferenceId;
3133
+ this.incomeingCallSocketService.pause();
3134
+ this.cdr.detectChanges();
3135
+ return false;
3136
+ }
3137
+ const participantList = ((_a = this.newIncomingCallsList.find((callInfo) => (callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId) == (c === null || c === void 0 ? void 0 : c.conferenceId))) === null || _a === void 0 ? void 0 : _a.participants.filter((resData) => !(resData === null || resData === void 0 ? void 0 : resData.isLeft))) || [];
3113
3138
  if ((participantList === null || participantList === void 0 ? void 0 : participantList.length) <= 2 && !isContect) {
3114
3139
  participantId = 'all';
3115
3140
  }
3116
- if (((_a = this.newIncomingCallsList) === null || _a === void 0 ? void 0 : _a.length) == 2) {
3141
+ if (((_b = this.newIncomingCallsList) === null || _b === void 0 ? void 0 : _b.length) == 2) {
3117
3142
  this.pendingAutoUnhold = true;
3118
3143
  }
3119
3144
  let conferenceId = c.conferenceId || (currentConferenceCallInfo === null || currentConferenceCallInfo === void 0 ? void 0 : currentConferenceCallInfo.conferenceId);
@@ -3617,7 +3642,7 @@ class CallProgressComponent {
3617
3642
  else if (((_d = (_c = (_b = this.missCallInfo) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.recordId) == (data === null || data === void 0 ? void 0 : data.id) && !((_e = callToAccept.parameters) === null || _e === void 0 ? void 0 : _e.CallSid)) {
3618
3643
  clearInterval(intervalId);
3619
3644
  const sid = (_f = callToAccept.parameters) === null || _f === void 0 ? void 0 : _f.CallSid;
3620
- this.isConnectingIncomingCallId = '';
3645
+ this.twilioService.isConnectingIncomingCallId.next('');
3621
3646
  this.isConnectingIncomingCallId = '';
3622
3647
  this.acceptedCallList = this.acceptedCallList.filter(c => c.callSid !== sid);
3623
3648
  this.twilioService.acceptedCallList = this.twilioService.acceptedCallList.filter((c) => { var _a; return ((_a = c.parameters) === null || _a === void 0 ? void 0 : _a.CallSid) !== sid; });
@@ -3762,7 +3787,7 @@ class CallProgressComponent {
3762
3787
  catch (error) {
3763
3788
  console.error('Error adding participant:', error);
3764
3789
  this.showRingAnimation = false;
3765
- this.handleError(error);
3790
+ this.handleError('Failed to add participant. Please try again.');
3766
3791
  }
3767
3792
  });
3768
3793
  }
@@ -4119,9 +4144,7 @@ class CallProgressComponent {
4119
4144
  console.log(ev);
4120
4145
  try {
4121
4146
  let selfCall = (_a = this.newIncomingCallsList.find((res) => { var _a; return (res === null || res === void 0 ? void 0 : res.conferenceId) == ((_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.conferenceId); })) === null || _a === void 0 ? void 0 : _a.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.host))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
4122
- console.log(selfCall);
4123
4147
  let device = this.twilioService.getIncomingCallById((selfCall === null || selfCall === void 0 ? void 0 : selfCall.callSid) || (selfCall === null || selfCall === void 0 ? void 0 : selfCall.clientSid));
4124
- console.log(device);
4125
4148
  if (device && (device === null || device === void 0 ? void 0 : device._status) == 'open') {
4126
4149
  device.sendDigits(String(ev.key));
4127
4150
  }
@@ -4924,7 +4947,6 @@ class DialboxComponent {
4924
4947
  incomingCallData = (incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length) > 0
4925
4948
  ? incomingCallData.filter((item) => { var _a; return ((_a = item.participants) === null || _a === void 0 ? void 0 : _a.length) > 0; })
4926
4949
  : [];
4927
- console.log('244', incomingCallData);
4928
4950
  // All conferenceIds received from socket this tick
4929
4951
  const socketConferenceIds = incomingCallData.map((c) => c.conferenceId);
4930
4952
  incomingCallData.forEach((callInfo) => {
@@ -4953,14 +4975,11 @@ class DialboxComponent {
4953
4975
  }
4954
4976
  }
4955
4977
  });
4956
- console.log('incomingCallsList 275', this.incomingCallsList);
4957
4978
  // Remove active-call entries whose conferenceId is no longer in the socket
4958
4979
  // but keep incoming-call notifications (they are managed by notificationCallList expiry)
4959
- this.incomingCallsList = this.incomingCallsList.filter((res) => socketConferenceIds.includes(res.conferenceId) || res.direction === 'incoming-call');
4960
- console.log('incomingCallsList 281', this.incomingCallsList);
4980
+ this.incomingCallsList = this.incomingCallsList.filter((res) => socketConferenceIds.includes(res.conferenceId) || res.callDirection === 'incoming-call');
4961
4981
  // Remove expired notification entries
4962
4982
  this.notificationCallList = this.notificationCallList.filter((res) => res.endTime >= new Date().getTime());
4963
- console.log('notificationCallList 286', this.notificationCallList, this.incomingCallsList);
4964
4983
  // Merge notificationCallList ONCE (not inside forEach). A pending incoming-call
4965
4984
  // notification is identified by its OWN participantId — never by conferenceId —
4966
4985
  // because it can legitimately share the conferenceId of a conference we are already
@@ -4969,10 +4988,8 @@ class DialboxComponent {
4969
4988
  const existingNotificationParticipantIds = new Set(this.incomingCallsList
4970
4989
  .filter((r) => r === null || r === void 0 ? void 0 : r._isNotification)
4971
4990
  .map((r) => r === null || r === void 0 ? void 0 : r.participantId));
4972
- console.log('existingNotificationParticipantIds 296', existingNotificationParticipantIds);
4973
4991
  const notificationsToAdd = this.notificationCallList.filter((n) => !existingNotificationParticipantIds.has(n === null || n === void 0 ? void 0 : n.participantId));
4974
4992
  this.incomingCallsList = [...this.incomingCallsList, ...notificationsToAdd];
4975
- console.log('incomingCallsList 305', this.incomingCallsList, notificationsToAdd);
4976
4993
  // Final deduplication. Active conference entries are keyed by conferenceId (socket data
4977
4994
  // wins — last write wins). Pending incoming-call notifications are keyed in a SEPARATE
4978
4995
  // namespace by participantId, so a notification and an active conference that share the
@@ -4984,13 +5001,11 @@ class DialboxComponent {
4984
5001
  : `conf:${item === null || item === void 0 ? void 0 : item.conferenceId}`;
4985
5002
  seen.set(key, item);
4986
5003
  }
4987
- console.log('incomingCallsList 320', this.incomingCallsList, Array.from(seen.values()));
4988
5004
  let finalList = Array.from(seen.values());
4989
5005
  // Remove any notification entry if an active conference with the same conferenceId already exists
4990
5006
  // added for 7472 bug
4991
5007
  const activeConferenceIds = new Set(finalList.filter((item) => !item._isNotification).map((item) => item.conferenceId));
4992
5008
  finalList = finalList.filter((item) => !(item._isNotification && activeConferenceIds.has(item.conferenceId)));
4993
- console.log('incomingCallsList 33=0', this.incomingCallsList, finalList);
4994
5009
  this.incomingCallsList = finalList;
4995
5010
  if (((_b = this.incomingCallsList) === null || _b === void 0 ? void 0 : _b.length) && (incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length)) {
4996
5011
  this.isCallInProgress = true;
@@ -5000,7 +5015,7 @@ class DialboxComponent {
5000
5015
  this.cdk.detectChanges();
5001
5016
  }
5002
5017
  else {
5003
- const hasPendingNotifications = this.incomingCallsList.some((res) => (res === null || res === void 0 ? void 0 : res._isNotification) || (res === null || res === void 0 ? void 0 : res.direction) === 'incoming-call');
5018
+ const hasPendingNotifications = this.incomingCallsList.some((res) => (res === null || res === void 0 ? void 0 : res._isNotification) || (res === null || res === void 0 ? void 0 : res.callDirection) === 'incoming-call');
5004
5019
  const hasAcceptedCalls = ((_c = this.twilioService.acceptedCallList) === null || _c === void 0 ? void 0 : _c.length) > 0;
5005
5020
  if ((hasAcceptedCalls || hasPendingNotifications) && ((_d = this.incomingCallsList) === null || _d === void 0 ? void 0 : _d.length)) {
5006
5021
  this.isCallInProgress = true;
@@ -5045,12 +5060,12 @@ class DialboxComponent {
5045
5060
  if (acceptedParticipantId != null) {
5046
5061
  this.notificationCallList = this.notificationCallList.filter((call) => (call === null || call === void 0 ? void 0 : call.participantId) != acceptedParticipantId);
5047
5062
  this.incomingCallsList = this.incomingCallsList.filter((call) => !(((call === null || call === void 0 ? void 0 : call.participantId) == acceptedParticipantId || (call === null || call === void 0 ? void 0 : call.id) == acceptedParticipantId) &&
5048
- (call === null || call === void 0 ? void 0 : call.direction) == 'incoming-call'));
5063
+ (call === null || call === void 0 ? void 0 : call.callDirection) == 'incoming-call'));
5049
5064
  }
5050
5065
  else {
5051
5066
  // Legacy fallback: remove by conferenceId.
5052
5067
  this.notificationCallList = this.notificationCallList.filter((call) => (call === null || call === void 0 ? void 0 : call.conferenceId) != acceptedConferenceId);
5053
- this.incomingCallsList = this.incomingCallsList.filter((call) => (call === null || call === void 0 ? void 0 : call.conferenceId) != acceptedConferenceId || (call === null || call === void 0 ? void 0 : call.direction) != 'incoming-call');
5068
+ this.incomingCallsList = this.incomingCallsList.filter((call) => (call === null || call === void 0 ? void 0 : call.conferenceId) != acceptedConferenceId || (call === null || call === void 0 ? void 0 : call.callDirection) != 'incoming-call');
5054
5069
  }
5055
5070
  });
5056
5071
  this.getUserCallSetting();
@@ -5222,7 +5237,7 @@ class DialboxComponent {
5222
5237
  else if (((_j = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _j === void 0 ? void 0 : _j.content) == "Missed Call" || ((_l = (_k = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.status) == "rejected" || ((_o = (_m = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.status) == "accepted") {
5223
5238
  this.notificationCallList = this.notificationCallList.filter((call) => { var _a, _b, _c, _d; return (call === null || call === void 0 ? void 0 : call.participantId) != ((_b = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recordId) && (call === null || call === void 0 ? void 0 : call.participantId) != ((_d = (_c = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.participantId); });
5224
5239
  this.missCallInfo = snapshot;
5225
- let incomingCallIndex = this.incomingCallsList.findIndex((call) => { var _a, _b, _c, _d; return ((call === null || call === void 0 ? void 0 : call.participantId) == ((_b = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recordId) || call.participantId == ((_d = (_c = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.participantId)) && (call === null || call === void 0 ? void 0 : call.direction) == 'incoming-call'; });
5240
+ let incomingCallIndex = this.incomingCallsList.findIndex((call) => { var _a, _b, _c, _d; return ((call === null || call === void 0 ? void 0 : call.participantId) == ((_b = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recordId) || call.participantId == ((_d = (_c = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.participantId)) && (call === null || call === void 0 ? void 0 : call.callDirection) == 'incoming-call'; });
5226
5241
  if (incomingCallIndex > -1) {
5227
5242
  console.log('incomingCallIndex', incomingCallIndex, snapshot);
5228
5243
  this.incomingCallsList.splice(incomingCallIndex, 1);
@@ -5254,7 +5269,7 @@ class DialboxComponent {
5254
5269
  this.notificationCallList = this.notificationCallList.filter((res) => res.endTime >= (new Date().getTime()));
5255
5270
  this.notificationCallList.forEach((call) => {
5256
5271
  this.incomingCallsList.forEach((item) => {
5257
- let info = item.participants.find((resInfo) => (resInfo === null || resInfo === void 0 ? void 0 : resInfo.id) === (call === null || call === void 0 ? void 0 : call.participantId) && (call === null || call === void 0 ? void 0 : call.direction) !== 'incoming');
5272
+ let info = item.participants.find((resInfo) => (resInfo === null || resInfo === void 0 ? void 0 : resInfo.id) === (call === null || call === void 0 ? void 0 : call.participantId) && (call === null || call === void 0 ? void 0 : call.callDirection) !== 'incoming');
5258
5273
  if (info) {
5259
5274
  parentCall.push(info.id);
5260
5275
  }
@@ -5281,7 +5296,7 @@ class DialboxComponent {
5281
5296
  if (this.twilioService.incomingCallToken != this.updatedTwilioToken) {
5282
5297
  this.twilioService.incomingCallToken = this.updatedTwilioToken;
5283
5298
  this.twilioService.tokenInitialized = true;
5284
- this.twilioService.initializeTwilioDevice(this.deviceId || localStorage.getItem('deviceId'));
5299
+ this.twilioService.initializeTwilioDevice(localStorage.getItem('deviceId'));
5285
5300
  }
5286
5301
  }
5287
5302
  if (((_x = changes['userId']) === null || _x === void 0 ? void 0 : _x.currentValue) && this.userId) {
@@ -5448,7 +5463,7 @@ class DialboxComponent {
5448
5463
  // so a notification can coexist with an active conference that shares its conferenceId.
5449
5464
  _isNotification: true,
5450
5465
  participantId: notification === null || notification === void 0 ? void 0 : notification.participantId,
5451
- direction: "incoming-call",
5466
+ callDirection: "incoming-call",
5452
5467
  participants: [
5453
5468
  {
5454
5469
  direction: "incoming-call", businessNumber: notification.c2cBusiness, img: notification.fromImage || notification.image || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: notification.fromNumber, to: notification.toNumber,
@@ -6026,6 +6041,7 @@ class DialboxComponent {
6026
6041
  this.incomingCallsList = [];
6027
6042
  // Clean up Twilio device when component is destroyed
6028
6043
  if (this.twilioService['device']) {
6044
+ console.log('Destroying Twilio device...');
6029
6045
  this.twilioService['device'].disconnectAll();
6030
6046
  this.twilioService['device'].destroy();
6031
6047
  }