@vgroup/dialbox 0.7.87 → 0.7.89
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 +43 -15
- package/esm2020/lib/dialbox.component.mjs +5 -3
- package/esm2020/lib/environments/environments.mjs +12 -12
- package/esm2020/lib/service/twilio.service.mjs +1 -1
- package/fesm2015/vgroup-dialbox.mjs +61 -31
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +57 -27
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/service/twilio.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -62,23 +62,23 @@ const keypad = [
|
|
|
62
62
|
];
|
|
63
63
|
|
|
64
64
|
const environment = {
|
|
65
|
-
abb: "
|
|
65
|
+
abb: "u",
|
|
66
66
|
production: false,
|
|
67
67
|
secureCookies: true,
|
|
68
|
-
feUrl: 'https://
|
|
69
|
-
apiUrl: 'https://
|
|
70
|
-
websocketUrl: 'wss://
|
|
68
|
+
feUrl: 'https://c2c-uat.contexttocall.com:85/',
|
|
69
|
+
apiUrl: 'https://c2c-uatapi-t10.contexttocall.com/uat_softphone',
|
|
70
|
+
websocketUrl: 'wss://c2c-uatapi-t10.contexttocall.com/uat_softphone/',
|
|
71
71
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
72
|
-
stripePublishableKey: "
|
|
72
|
+
stripePublishableKey: "pk_live_51NbMVaA3guus6fhl85gdcvAWHzfHba5LdGlsnV7DxBT9spHghn4IHT9rDCjSRgFh2ijTiZn9qeazdciY1PbreOuB00t1GdQAZJ",
|
|
73
73
|
sessionTimeout: 15,
|
|
74
74
|
deviceType: "web",
|
|
75
|
-
appVersion: "2.
|
|
76
|
-
channelId: '
|
|
75
|
+
appVersion: "2.9",
|
|
76
|
+
channelId: '6511738039ee10367cbde2e9',
|
|
77
77
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
78
|
-
c2c_support_channel_id: '
|
|
79
|
-
c2c_point_url: 'https://
|
|
80
|
-
c2c_call_label_id: '
|
|
81
|
-
c2c_email_label_id: '
|
|
78
|
+
c2c_support_channel_id: '677f68fcbe93ab507fbbfe0b',
|
|
79
|
+
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
80
|
+
c2c_call_label_id: '5M4taT8xzAg9pPIUADOW',
|
|
81
|
+
c2c_email_label_id: 'MUUC4NV5bLqHixXyhmok',
|
|
82
82
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
83
83
|
firebase: {
|
|
84
84
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -2632,14 +2632,14 @@ class CallProgressComponent {
|
|
|
2632
2632
|
this.timer = this.getTimeDifference(this.currentCall?.joinedAt);
|
|
2633
2633
|
}
|
|
2634
2634
|
if (this.selectedUserInfo?.participantId) {
|
|
2635
|
-
let selectedUser = this.currentCallList.find((item) => item?.id == this.selectedUserInfo?.
|
|
2635
|
+
let selectedUser = this.currentCallList.find((item) => item?.id == this.selectedUserInfo?.id);
|
|
2636
2636
|
if (selectedUser && (selectedUser?.conferenceId == this.currentConferenceCall?.conferenceId || this.isClickExpand)) {
|
|
2637
2637
|
selectedUser.IsUserInfoShow = true;
|
|
2638
2638
|
if (selectedUser.businessNumber == true && !selectedUser.userInfoId) {
|
|
2639
2639
|
this.toggleC2CInfoPanel(selectedUser);
|
|
2640
2640
|
}
|
|
2641
2641
|
else {
|
|
2642
|
-
this.selectedUserInfo = selectedUser;
|
|
2642
|
+
this.selectedUserInfo = this.C2ConfoList[selectedUser?.participantId] || selectedUser;
|
|
2643
2643
|
}
|
|
2644
2644
|
this.checkTextHeight();
|
|
2645
2645
|
}
|
|
@@ -2973,7 +2973,7 @@ class CallProgressComponent {
|
|
|
2973
2973
|
await this.pollCallStatus(callAuthId);
|
|
2974
2974
|
setTimeout(async () => {
|
|
2975
2975
|
try {
|
|
2976
|
-
let addClientParticipantRes = this.addClientParticipant({
|
|
2976
|
+
let addClientParticipantRes = await this.addClientParticipant({
|
|
2977
2977
|
from: callData?.from,
|
|
2978
2978
|
route: "OUTGOING",
|
|
2979
2979
|
participantNumber: callData?.phone,
|
|
@@ -2984,9 +2984,9 @@ class CallProgressComponent {
|
|
|
2984
2984
|
deviceId: this.deviceId,
|
|
2985
2985
|
clientSid: this.call?.parameters['CallSid']
|
|
2986
2986
|
});
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2987
|
+
if (addClientParticipantRes?.status != 200) {
|
|
2988
|
+
swal("Error", addClientParticipantRes?.message, "error");
|
|
2989
|
+
}
|
|
2990
2990
|
this.addRes = await this.addParticipantToCall({
|
|
2991
2991
|
from: callData?.from,
|
|
2992
2992
|
route: "OUTGOING",
|
|
@@ -3024,14 +3024,34 @@ class CallProgressComponent {
|
|
|
3024
3024
|
this.unholdPendingConference();
|
|
3025
3025
|
}
|
|
3026
3026
|
else {
|
|
3027
|
+
console.log(896);
|
|
3028
|
+
this.endCallEvent.emit();
|
|
3027
3029
|
this.endCall(); // regular call failure – disconnect everything
|
|
3028
3030
|
}
|
|
3029
3031
|
}
|
|
3030
3032
|
}
|
|
3031
3033
|
catch (error) {
|
|
3032
3034
|
this.showRingAnimation = false;
|
|
3033
|
-
|
|
3034
|
-
this
|
|
3035
|
+
// Whatever failed above (backend call, Twilio connect, etc.), the "Connecting..."
|
|
3036
|
+
// loader must always come down — previously this was left to endCall()/the socket
|
|
3037
|
+
// feed, and if either of those didn't run (or threw), the loader stayed on screen
|
|
3038
|
+
// forever with no way back to the dialpad.
|
|
3039
|
+
this.extensionService.isLoadershow.next(false);
|
|
3040
|
+
this.isLoadershown.emit(false);
|
|
3041
|
+
if (isNewConference) {
|
|
3042
|
+
this.unholdPendingConference();
|
|
3043
|
+
}
|
|
3044
|
+
else {
|
|
3045
|
+
console.log(896);
|
|
3046
|
+
this.endCallEvent.emit();
|
|
3047
|
+
try {
|
|
3048
|
+
this.endCall(); // regular call failure – disconnect everything
|
|
3049
|
+
}
|
|
3050
|
+
catch (cleanupError) {
|
|
3051
|
+
console.error('Error during call failure cleanup:', cleanupError);
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
this.handleError('Call not initiating due to a technical issue. Please try again.');
|
|
3035
3055
|
return false;
|
|
3036
3056
|
}
|
|
3037
3057
|
}
|
|
@@ -3126,9 +3146,19 @@ class CallProgressComponent {
|
|
|
3126
3146
|
// await this.getAllParticipants(c?.conferenceId);
|
|
3127
3147
|
}
|
|
3128
3148
|
async onEndCall(c, isAllCallEnd, isContect) {
|
|
3129
|
-
let participantId = isAllCallEnd ? 'all' : c
|
|
3149
|
+
let participantId = isAllCallEnd ? 'all' : c?.participantId || c?.id;
|
|
3130
3150
|
const currentConferenceCallInfo = this.getCurrentCallInfo();
|
|
3131
|
-
|
|
3151
|
+
// A call that failed/aborted before the backend ever created a conference for it
|
|
3152
|
+
// (e.g. initiateCall()/connectToDevice() threw) has no `c` and no matching entry
|
|
3153
|
+
// here — there is nothing to remove server-side, so just fall through to the
|
|
3154
|
+
// local cleanup below instead of throwing on `undefined.participants`.
|
|
3155
|
+
if (!c?.conferenceId && !isAllCallEnd) {
|
|
3156
|
+
this.conferenceCallIDForParticipantList = currentConferenceCallInfo?.conferenceId;
|
|
3157
|
+
this.incomeingCallSocketService.pause();
|
|
3158
|
+
this.cdr.detectChanges();
|
|
3159
|
+
return false;
|
|
3160
|
+
}
|
|
3161
|
+
const participantList = this.newIncomingCallsList.find((callInfo) => callInfo?.conferenceId == c?.conferenceId)?.participants.filter((resData) => !resData?.isLeft) || [];
|
|
3132
3162
|
if (participantList?.length <= 2 && !isContect) {
|
|
3133
3163
|
participantId = 'all';
|
|
3134
3164
|
}
|
|
@@ -3597,7 +3627,7 @@ class CallProgressComponent {
|
|
|
3597
3627
|
else if (this.missCallInfo?.data?.data?.recordId == data?.id && !callToAccept.parameters?.CallSid) {
|
|
3598
3628
|
clearInterval(intervalId);
|
|
3599
3629
|
const sid = callToAccept.parameters?.CallSid;
|
|
3600
|
-
this.isConnectingIncomingCallId
|
|
3630
|
+
this.twilioService.isConnectingIncomingCallId.next('');
|
|
3601
3631
|
this.isConnectingIncomingCallId = '';
|
|
3602
3632
|
this.acceptedCallList = this.acceptedCallList.filter(c => c.callSid !== sid);
|
|
3603
3633
|
this.twilioService.acceptedCallList = this.twilioService.acceptedCallList.filter((c) => c.parameters?.CallSid !== sid);
|
|
@@ -3738,7 +3768,7 @@ class CallProgressComponent {
|
|
|
3738
3768
|
catch (error) {
|
|
3739
3769
|
console.error('Error adding participant:', error);
|
|
3740
3770
|
this.showRingAnimation = false;
|
|
3741
|
-
this.handleError(
|
|
3771
|
+
this.handleError('Failed to add participant. Please try again.');
|
|
3742
3772
|
}
|
|
3743
3773
|
}
|
|
3744
3774
|
async CallToUnsavedNumber(number, isNewConference, options, participantInfo) {
|
|
@@ -4049,9 +4079,7 @@ class CallProgressComponent {
|
|
|
4049
4079
|
console.log(ev);
|
|
4050
4080
|
try {
|
|
4051
4081
|
let selfCall = this.newIncomingCallsList.find((res) => res?.conferenceId == this.currentCall?.conferenceId)?.participants.find((resData) => ((this.deviceNumberList.includes(resData?.from) && resData?.client) || (this.deviceNumberList.includes(resData?.to) && resData?.direction == 'incoming-call' && resData?.host)) && !resData?.isLeft);
|
|
4052
|
-
console.log(selfCall);
|
|
4053
4082
|
let device = this.twilioService.getIncomingCallById(selfCall?.callSid || selfCall?.clientSid);
|
|
4054
|
-
console.log(device);
|
|
4055
4083
|
if (device && device?._status == 'open') {
|
|
4056
4084
|
device.sendDigits(String(ev.key));
|
|
4057
4085
|
}
|
|
@@ -4919,11 +4947,12 @@ class DialboxComponent {
|
|
|
4919
4947
|
}, 2000);
|
|
4920
4948
|
}
|
|
4921
4949
|
}
|
|
4922
|
-
if (!this.incomingCallsList?.length) {
|
|
4950
|
+
if (!this.incomingCallsList?.length && !this.twilioService.acceptedCallList?.length) {
|
|
4923
4951
|
setTimeout(() => {
|
|
4924
4952
|
if (!this.incomingCallsList?.length && !this.twilioService.acceptedCallList?.length) {
|
|
4925
4953
|
this.isCallInProgress = false;
|
|
4926
4954
|
this.twilioService.device?.disconnectAll();
|
|
4955
|
+
this.twilioService.spareDevice?.disconnectAll();
|
|
4927
4956
|
}
|
|
4928
4957
|
}, 2000);
|
|
4929
4958
|
}
|
|
@@ -5178,7 +5207,7 @@ class DialboxComponent {
|
|
|
5178
5207
|
if (this.twilioService.incomingCallToken != this.updatedTwilioToken) {
|
|
5179
5208
|
this.twilioService.incomingCallToken = this.updatedTwilioToken;
|
|
5180
5209
|
this.twilioService.tokenInitialized = true;
|
|
5181
|
-
this.twilioService.initializeTwilioDevice(
|
|
5210
|
+
this.twilioService.initializeTwilioDevice(localStorage.getItem('deviceId'));
|
|
5182
5211
|
}
|
|
5183
5212
|
}
|
|
5184
5213
|
if (changes['userId']?.currentValue && this.userId) {
|
|
@@ -5885,6 +5914,7 @@ class DialboxComponent {
|
|
|
5885
5914
|
this.incomingCallsList = [];
|
|
5886
5915
|
// Clean up Twilio device when component is destroyed
|
|
5887
5916
|
if (this.twilioService['device']) {
|
|
5917
|
+
console.log('Destroying Twilio device...');
|
|
5888
5918
|
this.twilioService['device'].disconnectAll();
|
|
5889
5919
|
this.twilioService['device'].destroy();
|
|
5890
5920
|
}
|