@vgroup/dialbox 0.7.93 → 0.7.95
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 +13 -41
- package/esm2020/lib/dialbox.component.mjs +4 -3
- package/esm2020/lib/environments/environments.mjs +12 -12
- package/fesm2015/vgroup-dialbox.mjs +28 -55
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +26 -53
- package/fesm2020/vgroup-dialbox.mjs.map +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: "t",
|
|
66
66
|
production: false,
|
|
67
67
|
secureCookies: true,
|
|
68
|
-
feUrl: 'https://
|
|
69
|
-
apiUrl: 'https://
|
|
70
|
-
websocketUrl: 'wss://
|
|
68
|
+
feUrl: 'https://test.vgroupinc.com:91/',
|
|
69
|
+
apiUrl: 'https://apis.vgroupinc.com/test_softphone',
|
|
70
|
+
websocketUrl: 'wss://apis.vgroupinc.com/test_softphone/',
|
|
71
71
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
72
|
-
stripePublishableKey: "
|
|
72
|
+
stripePublishableKey: "pk_test_51NbMVaA3guus6fhlTuCV5ycFTIJmwgN38dDUf9pNPfM319x5CkLbV6EbTQaZiNOrRsfR16RWLE8hQmR0eZFTBqTy00Wlsug4qS",
|
|
73
73
|
sessionTimeout: 15,
|
|
74
74
|
deviceType: "web",
|
|
75
|
-
appVersion: "2.
|
|
76
|
-
channelId: '
|
|
75
|
+
appVersion: "2.3",
|
|
76
|
+
channelId: '61481b12e138eb7dc3007579',
|
|
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: '677f6726be93ab507fbbfdf0',
|
|
79
|
+
c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
|
|
80
|
+
c2c_call_label_id: '6NU5fKE2mGTyXDC3yhmK',
|
|
81
|
+
c2c_email_label_id: 'YPMamj8RvsGORVvqXWyc',
|
|
82
82
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
83
83
|
firebase: {
|
|
84
84
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -2980,7 +2980,7 @@ class CallProgressComponent {
|
|
|
2980
2980
|
await this.pollCallStatus(callAuthId);
|
|
2981
2981
|
setTimeout(async () => {
|
|
2982
2982
|
try {
|
|
2983
|
-
let addClientParticipantRes =
|
|
2983
|
+
let addClientParticipantRes = this.addClientParticipant({
|
|
2984
2984
|
from: callData?.from,
|
|
2985
2985
|
route: "OUTGOING",
|
|
2986
2986
|
participantNumber: callData?.phone,
|
|
@@ -2991,9 +2991,9 @@ class CallProgressComponent {
|
|
|
2991
2991
|
deviceId: this.deviceId,
|
|
2992
2992
|
clientSid: this.call?.parameters['CallSid']
|
|
2993
2993
|
});
|
|
2994
|
-
if
|
|
2995
|
-
|
|
2996
|
-
}
|
|
2994
|
+
// if(addClientParticipantRes?.status != 200) {
|
|
2995
|
+
// swal("Error", addClientParticipantRes?.message.join("<br/>"), "error");
|
|
2996
|
+
// }
|
|
2997
2997
|
this.addRes = await this.addParticipantToCall({
|
|
2998
2998
|
from: callData?.from,
|
|
2999
2999
|
route: "OUTGOING",
|
|
@@ -3031,34 +3031,14 @@ class CallProgressComponent {
|
|
|
3031
3031
|
this.unholdPendingConference();
|
|
3032
3032
|
}
|
|
3033
3033
|
else {
|
|
3034
|
-
console.log(896);
|
|
3035
|
-
this.endCallEvent.emit();
|
|
3036
3034
|
this.endCall(); // regular call failure – disconnect everything
|
|
3037
3035
|
}
|
|
3038
3036
|
}
|
|
3039
3037
|
}
|
|
3040
3038
|
catch (error) {
|
|
3041
3039
|
this.showRingAnimation = false;
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
// feed, and if either of those didn't run (or threw), the loader stayed on screen
|
|
3045
|
-
// forever with no way back to the dialpad.
|
|
3046
|
-
this.extensionService.isLoadershow.next(false);
|
|
3047
|
-
this.isLoadershown.emit(false);
|
|
3048
|
-
if (isNewConference) {
|
|
3049
|
-
this.unholdPendingConference();
|
|
3050
|
-
}
|
|
3051
|
-
else {
|
|
3052
|
-
console.log(896);
|
|
3053
|
-
this.endCallEvent.emit();
|
|
3054
|
-
try {
|
|
3055
|
-
this.endCall(); // regular call failure – disconnect everything
|
|
3056
|
-
}
|
|
3057
|
-
catch (cleanupError) {
|
|
3058
|
-
console.error('Error during call failure cleanup:', cleanupError);
|
|
3059
|
-
}
|
|
3060
|
-
}
|
|
3061
|
-
this.handleError('Call not initiating due to a technical issue. Please try again.');
|
|
3040
|
+
this.handleError(error);
|
|
3041
|
+
this.endCall();
|
|
3062
3042
|
return false;
|
|
3063
3043
|
}
|
|
3064
3044
|
}
|
|
@@ -3153,19 +3133,9 @@ class CallProgressComponent {
|
|
|
3153
3133
|
// await this.getAllParticipants(c?.conferenceId);
|
|
3154
3134
|
}
|
|
3155
3135
|
async onEndCall(c, isAllCallEnd, isContect) {
|
|
3156
|
-
let participantId = isAllCallEnd ? 'all' : c
|
|
3136
|
+
let participantId = isAllCallEnd ? 'all' : c.participantId || c?.id;
|
|
3157
3137
|
const currentConferenceCallInfo = this.getCurrentCallInfo();
|
|
3158
|
-
|
|
3159
|
-
// (e.g. initiateCall()/connectToDevice() threw) has no `c` and no matching entry
|
|
3160
|
-
// here — there is nothing to remove server-side, so just fall through to the
|
|
3161
|
-
// local cleanup below instead of throwing on `undefined.participants`.
|
|
3162
|
-
if (!c?.conferenceId && !isAllCallEnd) {
|
|
3163
|
-
this.conferenceCallIDForParticipantList = currentConferenceCallInfo?.conferenceId;
|
|
3164
|
-
this.incomeingCallSocketService.pause();
|
|
3165
|
-
this.cdr.detectChanges();
|
|
3166
|
-
return false;
|
|
3167
|
-
}
|
|
3168
|
-
const participantList = this.newIncomingCallsList.find((callInfo) => callInfo?.conferenceId == c?.conferenceId)?.participants.filter((resData) => !resData?.isLeft) || [];
|
|
3138
|
+
const participantList = this.newIncomingCallsList.find((callInfo) => callInfo?.conferenceId == c?.conferenceId).participants.filter((resData) => !resData?.isLeft);
|
|
3169
3139
|
if (participantList?.length <= 2 && !isContect) {
|
|
3170
3140
|
participantId = 'all';
|
|
3171
3141
|
}
|
|
@@ -3634,7 +3604,7 @@ class CallProgressComponent {
|
|
|
3634
3604
|
else if (this.missCallInfo?.data?.data?.recordId == data?.id && !callToAccept.parameters?.CallSid) {
|
|
3635
3605
|
clearInterval(intervalId);
|
|
3636
3606
|
const sid = callToAccept.parameters?.CallSid;
|
|
3637
|
-
this.
|
|
3607
|
+
this.isConnectingIncomingCallId = '';
|
|
3638
3608
|
this.isConnectingIncomingCallId = '';
|
|
3639
3609
|
this.acceptedCallList = this.acceptedCallList.filter(c => c.callSid !== sid);
|
|
3640
3610
|
this.twilioService.acceptedCallList = this.twilioService.acceptedCallList.filter((c) => c.parameters?.CallSid !== sid);
|
|
@@ -3775,7 +3745,7 @@ class CallProgressComponent {
|
|
|
3775
3745
|
catch (error) {
|
|
3776
3746
|
console.error('Error adding participant:', error);
|
|
3777
3747
|
this.showRingAnimation = false;
|
|
3778
|
-
this.handleError(
|
|
3748
|
+
this.handleError(error);
|
|
3779
3749
|
}
|
|
3780
3750
|
}
|
|
3781
3751
|
async CallToUnsavedNumber(number, isNewConference, options, participantInfo) {
|
|
@@ -4117,7 +4087,9 @@ class CallProgressComponent {
|
|
|
4117
4087
|
console.log(ev);
|
|
4118
4088
|
try {
|
|
4119
4089
|
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);
|
|
4090
|
+
console.log(selfCall);
|
|
4120
4091
|
let device = this.twilioService.getIncomingCallById(selfCall?.callSid || selfCall?.clientSid);
|
|
4092
|
+
console.log(device);
|
|
4121
4093
|
if (device && device?._status == 'open') {
|
|
4122
4094
|
device.sendDigits(String(ev.key));
|
|
4123
4095
|
}
|
|
@@ -4986,6 +4958,7 @@ class DialboxComponent {
|
|
|
4986
4958
|
setTimeout(() => {
|
|
4987
4959
|
if (!this.twilioService.acceptedCallList?.length) {
|
|
4988
4960
|
this.twilioService.device?.disconnectAll();
|
|
4961
|
+
this.twilioService.acceptedCallList = [];
|
|
4989
4962
|
}
|
|
4990
4963
|
}, 2000);
|
|
4991
4964
|
}
|
|
@@ -4996,6 +4969,7 @@ class DialboxComponent {
|
|
|
4996
4969
|
this.isCallInProgress = false;
|
|
4997
4970
|
this.twilioService.device?.disconnectAll();
|
|
4998
4971
|
this.twilioService.spareDevice?.disconnectAll();
|
|
4972
|
+
this.twilioService.acceptedCallList = [];
|
|
4999
4973
|
}
|
|
5000
4974
|
}, 2000);
|
|
5001
4975
|
}
|
|
@@ -5250,7 +5224,7 @@ class DialboxComponent {
|
|
|
5250
5224
|
if (this.twilioService.incomingCallToken != this.updatedTwilioToken) {
|
|
5251
5225
|
this.twilioService.incomingCallToken = this.updatedTwilioToken;
|
|
5252
5226
|
this.twilioService.tokenInitialized = true;
|
|
5253
|
-
this.twilioService.initializeTwilioDevice(localStorage.getItem('deviceId'));
|
|
5227
|
+
this.twilioService.initializeTwilioDevice(this.deviceId || localStorage.getItem('deviceId'));
|
|
5254
5228
|
}
|
|
5255
5229
|
}
|
|
5256
5230
|
if (changes['userId']?.currentValue && this.userId) {
|
|
@@ -5986,7 +5960,6 @@ class DialboxComponent {
|
|
|
5986
5960
|
this.incomingCallsList = [];
|
|
5987
5961
|
// Clean up Twilio device when component is destroyed
|
|
5988
5962
|
if (this.twilioService['device']) {
|
|
5989
|
-
console.log('Destroying Twilio device...');
|
|
5990
5963
|
this.twilioService['device'].disconnectAll();
|
|
5991
5964
|
this.twilioService['device'].destroy();
|
|
5992
5965
|
}
|