@vgroup/dialbox 0.8.6 → 0.8.8
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 +58 -20
- package/esm2020/lib/dialbox.component.mjs +12 -10
- package/esm2020/lib/environments/environments.mjs +12 -12
- package/fesm2015/vgroup-dialbox.mjs +82 -43
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +79 -39
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export const environment = {
|
|
2
|
-
abb: "
|
|
2
|
+
abb: "u",
|
|
3
3
|
production: false,
|
|
4
4
|
secureCookies: true,
|
|
5
|
-
feUrl: 'https://
|
|
6
|
-
apiUrl: 'https://
|
|
7
|
-
websocketUrl: 'wss://
|
|
5
|
+
feUrl: 'https://c2c-uat.contexttocall.com:85/',
|
|
6
|
+
apiUrl: 'https://c2c-uatapi-t10.contexttocall.com/uat_softphone',
|
|
7
|
+
websocketUrl: 'wss://c2c-uatapi-t10.contexttocall.com/uat_softphone/',
|
|
8
8
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
9
|
-
stripePublishableKey: "
|
|
9
|
+
stripePublishableKey: "pk_live_51NbMVaA3guus6fhl85gdcvAWHzfHba5LdGlsnV7DxBT9spHghn4IHT9rDCjSRgFh2ijTiZn9qeazdciY1PbreOuB00t1GdQAZJ",
|
|
10
10
|
sessionTimeout: 15,
|
|
11
11
|
deviceType: "web",
|
|
12
|
-
appVersion: "2.
|
|
13
|
-
channelId: '
|
|
12
|
+
appVersion: "2.9",
|
|
13
|
+
channelId: '6511738039ee10367cbde2e9',
|
|
14
14
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
15
|
-
c2c_support_channel_id: '
|
|
16
|
-
c2c_point_url: 'https://
|
|
17
|
-
c2c_call_label_id: '
|
|
18
|
-
c2c_email_label_id: '
|
|
15
|
+
c2c_support_channel_id: '677f68fcbe93ab507fbbfe0b',
|
|
16
|
+
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
17
|
+
c2c_call_label_id: '5M4taT8xzAg9pPIUADOW',
|
|
18
|
+
c2c_email_label_id: 'MUUC4NV5bLqHixXyhmok',
|
|
19
19
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
20
20
|
firebase: {
|
|
21
21
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -32,4 +32,4 @@ export const environment = {
|
|
|
32
32
|
keycloakRealm: 'vgroup-test',
|
|
33
33
|
keycloakClientId: 'c2c-softphone-app'
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW52aXJvbm1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGlhbGJveC9zcmMvbGliL2Vudmlyb25tZW50cy9lbnZpcm9ubWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sV0FBVyxHQUFHO0lBQ3pCLEdBQUcsRUFBRSxHQUFHO0lBQ1IsVUFBVSxFQUFFLEtBQUs7SUFDakIsYUFBYSxFQUFFLElBQUk7SUFDbkIsS0FBSyxFQUFDLHVDQUF1QztJQUM3QyxNQUFNLEVBQUUsd0RBQXdEO0lBQ2hFLFlBQVksRUFBRSx1REFBdUQ7SUFDckUsVUFBVSxFQUFFLDBDQUEwQztJQUN0RCxvQkFBb0IsRUFBRSw2R0FBNkc7SUFDbkksY0FBYyxFQUFFLEVBQUU7SUFD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IGF1dGhEb21haW46IFwic29mdHBob25lLWQ1Nzc3LmZpcmViYXNlYXBwLmNvbVwiLFxyXG4gICAgICBwcm9qZWN0SWQ6IFwic29mdHBob25lLWQ1Nzc3XCIsXHJcbiAgICAgIHN0b3JhZ2VCdWNrZXQ6IFwic29mdHBob25lLWQ1Nzc3LmFwcHNwb3QuY29tXCIsXHJcbiAgICAgIG1lc3NhZ2luZ1NlbmRlcklkOiBcIjg1MDgxMjQ5NDUzOFwiLFxyXG4gICAgICBhcHBJZDogXCIxOjg1MDgxMjQ5NDUzODp3ZWI6NzRmOGEzMGZjMThlMjhkZWQ3OGEzM1wiLFxyXG4gICAgICBtZWFzdXJlbWVudElkOiBcIkctTkdYVFNWOVNIM1wiLFxyXG4gICAgICB2YXBpZEtleTpcIkJENkVnY1FnYlpUak9RZmxlRzNZbEVjMF9TYWpCMDNwcnFUZER5LXFHSmt4VHhlemJxLUFfcXR1WEUxbDN5VDQ3bzhoblRBYlRLQmNIMTVEMkFKQjJUb1wiXHJcbiAgfSxcclxuICBwZXJzcGVjdGl2ZUFwaUtleTogJ0FJemFTeUNsZjMybHZMSDRRT3ktdk9uekx6d1NObnRLSWdhcEg4cycsXHJcbiAga2V5Y2xvYWtVUkw6ICdodHRwczovL3Rlc3Qta2V5Y2xvYWsudmdyb3VwaW5jLmNvbS8nLFxyXG4gIGtleWNsb2FrUmVhbG06ICd2Z3JvdXAtdGVzdCcsXHJcbiAga2V5Y2xvYWtDbGllbnRJZDogJ2MyYy1zb2Z0cGhvbmUtYXBwJ1xyXG59O1xyXG4iXX0=
|
|
@@ -63,23 +63,23 @@ const keypad = [
|
|
|
63
63
|
];
|
|
64
64
|
|
|
65
65
|
const environment = {
|
|
66
|
-
abb: "
|
|
66
|
+
abb: "u",
|
|
67
67
|
production: false,
|
|
68
68
|
secureCookies: true,
|
|
69
|
-
feUrl: 'https://
|
|
70
|
-
apiUrl: 'https://
|
|
71
|
-
websocketUrl: 'wss://
|
|
69
|
+
feUrl: 'https://c2c-uat.contexttocall.com:85/',
|
|
70
|
+
apiUrl: 'https://c2c-uatapi-t10.contexttocall.com/uat_softphone',
|
|
71
|
+
websocketUrl: 'wss://c2c-uatapi-t10.contexttocall.com/uat_softphone/',
|
|
72
72
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
73
|
-
stripePublishableKey: "
|
|
73
|
+
stripePublishableKey: "pk_live_51NbMVaA3guus6fhl85gdcvAWHzfHba5LdGlsnV7DxBT9spHghn4IHT9rDCjSRgFh2ijTiZn9qeazdciY1PbreOuB00t1GdQAZJ",
|
|
74
74
|
sessionTimeout: 15,
|
|
75
75
|
deviceType: "web",
|
|
76
|
-
appVersion: "2.
|
|
77
|
-
channelId: '
|
|
76
|
+
appVersion: "2.9",
|
|
77
|
+
channelId: '6511738039ee10367cbde2e9',
|
|
78
78
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
79
|
-
c2c_support_channel_id: '
|
|
80
|
-
c2c_point_url: 'https://
|
|
81
|
-
c2c_call_label_id: '
|
|
82
|
-
c2c_email_label_id: '
|
|
79
|
+
c2c_support_channel_id: '677f68fcbe93ab507fbbfe0b',
|
|
80
|
+
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
81
|
+
c2c_call_label_id: '5M4taT8xzAg9pPIUADOW',
|
|
82
|
+
c2c_email_label_id: 'MUUC4NV5bLqHixXyhmok',
|
|
83
83
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
84
84
|
firebase: {
|
|
85
85
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -2314,6 +2314,7 @@ class CallProgressComponent {
|
|
|
2314
2314
|
this.isParticipantPanelLoading = false;
|
|
2315
2315
|
this.pendingNewCallHeldParticipant = null;
|
|
2316
2316
|
this.isCallCancelled = false;
|
|
2317
|
+
this.isNewCallLoader = false;
|
|
2317
2318
|
this.isMinimised = false;
|
|
2318
2319
|
this.showDisconnectModal = false;
|
|
2319
2320
|
this.call = this.twilioService.call;
|
|
@@ -2346,6 +2347,7 @@ class CallProgressComponent {
|
|
|
2346
2347
|
}
|
|
2347
2348
|
else if (((_c = changes['callData'].currentValue) === null || _c === void 0 ? void 0 : _c.displayNum) || ((_d = changes['callData'].currentValue) === null || _d === void 0 ? void 0 : _d.from)) {
|
|
2348
2349
|
this.currentCall = Object.assign(Object.assign({}, changes['callData'].currentValue), { id: '125', img: 'assets/images/user.jpg', isIncomingCall: false, isHold: false, isMute: false, isConference: false, isAcceptCall: true, dial: true, phone: (_e = changes['callData'].currentValue) === null || _e === void 0 ? void 0 : _e.phone, participantId: '121', name: ((_f = changes['callData'].currentValue) === null || _f === void 0 ? void 0 : _f.name) || ((_g = changes['callData'].currentValue) === null || _g === void 0 ? void 0 : _g.fromName) || ((_h = changes['callData'].currentValue) === null || _h === void 0 ? void 0 : _h.toName) || '', time: this.timer });
|
|
2350
|
+
this.isNewCallLoader = true;
|
|
2349
2351
|
this.onAddNewCall(changes['callData'].currentValue);
|
|
2350
2352
|
}
|
|
2351
2353
|
}
|
|
@@ -2656,6 +2658,7 @@ class CallProgressComponent {
|
|
|
2656
2658
|
this.isRinging = false;
|
|
2657
2659
|
this.isConcurrentIncoming = false;
|
|
2658
2660
|
if (this.call) {
|
|
2661
|
+
console.log('call disconnect 566');
|
|
2659
2662
|
this.call.disconnect();
|
|
2660
2663
|
}
|
|
2661
2664
|
this.currentCallList = [];
|
|
@@ -2686,6 +2689,7 @@ class CallProgressComponent {
|
|
|
2686
2689
|
this.deviceNumberList = this.callerIdList.map((res) => res.number);
|
|
2687
2690
|
let data = (_27 = this.newIncomingCallsList.find((item) => { var _a; return (item === null || item === void 0 ? void 0 : item.conferenceId) == ((_a = this.callAction) === null || _a === void 0 ? void 0 : _a.conferenceId); })) === null || _27 === void 0 ? void 0 : _27.participants.find((resData) => resData === null || resData === void 0 ? void 0 : resData.host);
|
|
2688
2691
|
if ((data === null || data === void 0 ? void 0 : data.isLeft) || !data) {
|
|
2692
|
+
this.isNewCallLoader = true;
|
|
2689
2693
|
this.rejoinHost(this.callAction);
|
|
2690
2694
|
}
|
|
2691
2695
|
}
|
|
@@ -2758,9 +2762,11 @@ class CallProgressComponent {
|
|
|
2758
2762
|
clientSid: (_b = (_a = this.call) === null || _a === void 0 ? void 0 : _a.parameters) === null || _b === void 0 ? void 0 : _b['CallSid'],
|
|
2759
2763
|
recordId: rejoinParticipentInfo === null || rejoinParticipentInfo === void 0 ? void 0 : rejoinParticipentInfo.id
|
|
2760
2764
|
});
|
|
2765
|
+
this.isNewCallLoader = false;
|
|
2761
2766
|
this.conferenceCallIDForParticipantList = rejoinParticipentInfo === null || rejoinParticipentInfo === void 0 ? void 0 : rejoinParticipentInfo.conferenceId;
|
|
2762
2767
|
}
|
|
2763
2768
|
catch (error) {
|
|
2769
|
+
this.isNewCallLoader = false;
|
|
2764
2770
|
console.error('Error in addClientParticipant:', error);
|
|
2765
2771
|
}
|
|
2766
2772
|
};
|
|
@@ -2964,16 +2970,17 @@ class CallProgressComponent {
|
|
|
2964
2970
|
}
|
|
2965
2971
|
this.conferenceId = (_b = response === null || response === void 0 ? void 0 : response.callauth) === null || _b === void 0 ? void 0 : _b.id;
|
|
2966
2972
|
this.isCallCancelled = false;
|
|
2967
|
-
if (response.status == 200) {
|
|
2973
|
+
if ((response === null || response === void 0 ? void 0 : response.status) == 200) {
|
|
2968
2974
|
this.pendingNewCallHeldParticipant = null;
|
|
2969
2975
|
const { id: callAuthId, recordCall, tokenData } = yield this.getCallAuthId(response);
|
|
2970
2976
|
this.recordCall = recordCall; // Store the recordCall value
|
|
2971
2977
|
yield this.connectToDevice(callAuthId, callData, tokenData);
|
|
2972
2978
|
yield this.pollCallStatus(callAuthId);
|
|
2979
|
+
console.log('Call initiated successfully:', response);
|
|
2973
2980
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
2974
2981
|
var _c, _d, _e, _f, _g;
|
|
2975
2982
|
try {
|
|
2976
|
-
let addClientParticipantRes = this.addClientParticipant({
|
|
2983
|
+
let addClientParticipantRes = yield this.addClientParticipant({
|
|
2977
2984
|
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2978
2985
|
route: "OUTGOING",
|
|
2979
2986
|
participantNumber: callData === null || callData === void 0 ? void 0 : callData.phone,
|
|
@@ -2984,9 +2991,9 @@ class CallProgressComponent {
|
|
|
2984
2991
|
deviceId: this.deviceId,
|
|
2985
2992
|
clientSid: (_d = this.call) === null || _d === void 0 ? void 0 : _d.parameters['CallSid']
|
|
2986
2993
|
});
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2994
|
+
if ((addClientParticipantRes === null || addClientParticipantRes === void 0 ? void 0 : addClientParticipantRes.status) != 200) {
|
|
2995
|
+
swal("Error", addClientParticipantRes === null || addClientParticipantRes === void 0 ? void 0 : addClientParticipantRes.message, "error");
|
|
2996
|
+
}
|
|
2990
2997
|
this.addRes = yield this.addParticipantToCall({
|
|
2991
2998
|
from: callData === null || callData === void 0 ? void 0 : callData.from,
|
|
2992
2999
|
route: "OUTGOING",
|
|
@@ -2997,6 +3004,7 @@ class CallProgressComponent {
|
|
|
2997
3004
|
countrycode: '',
|
|
2998
3005
|
deviceId: this.deviceId,
|
|
2999
3006
|
});
|
|
3007
|
+
this.isNewCallLoader = false;
|
|
3000
3008
|
if (isNewConference) {
|
|
3001
3009
|
this.conferenceCallIDForParticipantList = (_f = response === null || response === void 0 ? void 0 : response.callauth) === null || _f === void 0 ? void 0 : _f.id;
|
|
3002
3010
|
}
|
|
@@ -3005,6 +3013,7 @@ class CallProgressComponent {
|
|
|
3005
3013
|
this.extensionService.isLoadershow.next(false);
|
|
3006
3014
|
this.isLoadershown.emit(false);
|
|
3007
3015
|
}
|
|
3016
|
+
this.showRingAnimation = false;
|
|
3008
3017
|
// this.conferenceCallIDForParticipantList = response?.callauth?.id;
|
|
3009
3018
|
// await this.getAllParticipants(response?.callauth?.id);
|
|
3010
3019
|
}
|
|
@@ -3024,14 +3033,34 @@ class CallProgressComponent {
|
|
|
3024
3033
|
this.unholdPendingConference();
|
|
3025
3034
|
}
|
|
3026
3035
|
else {
|
|
3036
|
+
console.log(896);
|
|
3037
|
+
this.endCallEvent.emit();
|
|
3027
3038
|
this.endCall(); // regular call failure – disconnect everything
|
|
3028
3039
|
}
|
|
3029
3040
|
}
|
|
3030
3041
|
}
|
|
3031
3042
|
catch (error) {
|
|
3032
3043
|
this.showRingAnimation = false;
|
|
3033
|
-
|
|
3034
|
-
this
|
|
3044
|
+
// Whatever failed above (backend call, Twilio connect, etc.), the "Connecting..."
|
|
3045
|
+
// loader must always come down — previously this was left to endCall()/the socket
|
|
3046
|
+
// feed, and if either of those didn't run (or threw), the loader stayed on screen
|
|
3047
|
+
// forever with no way back to the dialpad.
|
|
3048
|
+
this.extensionService.isLoadershow.next(false);
|
|
3049
|
+
this.isLoadershown.emit(false);
|
|
3050
|
+
if (isNewConference) {
|
|
3051
|
+
this.unholdPendingConference();
|
|
3052
|
+
}
|
|
3053
|
+
else {
|
|
3054
|
+
console.log(896);
|
|
3055
|
+
this.endCallEvent.emit();
|
|
3056
|
+
try {
|
|
3057
|
+
this.endCall(); // regular call failure – disconnect everything
|
|
3058
|
+
}
|
|
3059
|
+
catch (cleanupError) {
|
|
3060
|
+
console.error('Error during call failure cleanup:', cleanupError);
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
this.handleError('Call not initiating due to a technical issue. Please try again.');
|
|
3035
3064
|
return false;
|
|
3036
3065
|
}
|
|
3037
3066
|
});
|
|
@@ -3133,15 +3162,25 @@ class CallProgressComponent {
|
|
|
3133
3162
|
});
|
|
3134
3163
|
}
|
|
3135
3164
|
onEndCall(c, isAllCallEnd, isContect, isSetTimer) {
|
|
3136
|
-
var _a;
|
|
3165
|
+
var _a, _b;
|
|
3137
3166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3138
3167
|
let participantId = isAllCallEnd ? 'all' : c.participantId || (c === null || c === void 0 ? void 0 : c.id);
|
|
3139
3168
|
const currentConferenceCallInfo = this.getCurrentCallInfo();
|
|
3140
|
-
|
|
3169
|
+
// A call that failed/aborted before the backend ever created a conference for it
|
|
3170
|
+
// (e.g. initiateCall()/connectToDevice() threw) has no `c` and no matching entry
|
|
3171
|
+
// here — there is nothing to remove server-side, so just fall through to the
|
|
3172
|
+
// local cleanup below instead of throwing on `undefined.participants`.
|
|
3173
|
+
if (!(c === null || c === void 0 ? void 0 : c.conferenceId) && !isAllCallEnd) {
|
|
3174
|
+
this.conferenceCallIDForParticipantList = currentConferenceCallInfo === null || currentConferenceCallInfo === void 0 ? void 0 : currentConferenceCallInfo.conferenceId;
|
|
3175
|
+
this.incomeingCallSocketService.pause();
|
|
3176
|
+
this.cdr.detectChanges();
|
|
3177
|
+
return false;
|
|
3178
|
+
}
|
|
3179
|
+
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))) || [];
|
|
3141
3180
|
if ((participantList === null || participantList === void 0 ? void 0 : participantList.length) <= 2 && !isContect) {
|
|
3142
3181
|
participantId = 'all';
|
|
3143
3182
|
}
|
|
3144
|
-
if (((
|
|
3183
|
+
if (((_b = this.newIncomingCallsList) === null || _b === void 0 ? void 0 : _b.length) == 2) {
|
|
3145
3184
|
this.pendingAutoUnhold = true;
|
|
3146
3185
|
}
|
|
3147
3186
|
let conferenceId = c.conferenceId || (currentConferenceCallInfo === null || currentConferenceCallInfo === void 0 ? void 0 : currentConferenceCallInfo.conferenceId);
|
|
@@ -3650,7 +3689,7 @@ class CallProgressComponent {
|
|
|
3650
3689
|
else if (((_e = (_d = (_c = this.missCallInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.recordId) == (data === null || data === void 0 ? void 0 : data.id) && !((_f = callToAccept.parameters) === null || _f === void 0 ? void 0 : _f.CallSid)) {
|
|
3651
3690
|
clearInterval(intervalId);
|
|
3652
3691
|
const sid = (_g = callToAccept.parameters) === null || _g === void 0 ? void 0 : _g.CallSid;
|
|
3653
|
-
this.isConnectingIncomingCallId
|
|
3692
|
+
this.twilioService.isConnectingIncomingCallId.next('');
|
|
3654
3693
|
this.isConnectingIncomingCallId = '';
|
|
3655
3694
|
this.acceptedCallList = this.acceptedCallList.filter(c => c.callSid !== sid);
|
|
3656
3695
|
this.twilioService.acceptedCallList = this.twilioService.acceptedCallList.filter((c) => { var _a; return ((_a = c.parameters) === null || _a === void 0 ? void 0 : _a.CallSid) !== sid; });
|
|
@@ -3795,7 +3834,7 @@ class CallProgressComponent {
|
|
|
3795
3834
|
catch (error) {
|
|
3796
3835
|
console.error('Error adding participant:', error);
|
|
3797
3836
|
this.showRingAnimation = false;
|
|
3798
|
-
this.handleError(
|
|
3837
|
+
this.handleError('Failed to add participant. Please try again.');
|
|
3799
3838
|
}
|
|
3800
3839
|
});
|
|
3801
3840
|
}
|
|
@@ -4152,9 +4191,7 @@ class CallProgressComponent {
|
|
|
4152
4191
|
console.log(ev);
|
|
4153
4192
|
try {
|
|
4154
4193
|
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));
|
|
4155
|
-
console.log(selfCall);
|
|
4156
4194
|
let device = this.twilioService.getIncomingCallById((selfCall === null || selfCall === void 0 ? void 0 : selfCall.callSid) || (selfCall === null || selfCall === void 0 ? void 0 : selfCall.clientSid));
|
|
4157
|
-
console.log(device);
|
|
4158
4195
|
if (device && (device === null || device === void 0 ? void 0 : device._status) == 'open') {
|
|
4159
4196
|
device.sendDigits(String(ev.key));
|
|
4160
4197
|
}
|
|
@@ -4628,15 +4665,16 @@ class CallProgressComponent {
|
|
|
4628
4665
|
}
|
|
4629
4666
|
}
|
|
4630
4667
|
ngOnDestroy() {
|
|
4668
|
+
var _a, _b, _c;
|
|
4631
4669
|
this.callData.dial = false;
|
|
4632
|
-
setTimeout(() => {
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
}, 1500);
|
|
4670
|
+
// setTimeout(() => {
|
|
4671
|
+
if (!((_a = this.newIncomingCallsList) === null || _a === void 0 ? void 0 : _a.length) && !this.isNewCallLoader) {
|
|
4672
|
+
console.log('Destroying device and disconnecting all calls 2572');
|
|
4673
|
+
(_b = this.twilioService.device) === null || _b === void 0 ? void 0 : _b.disconnectAll();
|
|
4674
|
+
this.call.disconnect();
|
|
4675
|
+
(_c = this.device) === null || _c === void 0 ? void 0 : _c.destroy();
|
|
4676
|
+
}
|
|
4677
|
+
// }, 1500);
|
|
4640
4678
|
if (this.timerSubscription) {
|
|
4641
4679
|
this.timerSubscription.unsubscribe();
|
|
4642
4680
|
}
|
|
@@ -5046,6 +5084,7 @@ class DialboxComponent {
|
|
|
5046
5084
|
this.isCallInProgress = false;
|
|
5047
5085
|
setTimeout(() => {
|
|
5048
5086
|
var _a, _b, _c;
|
|
5087
|
+
console.log('344');
|
|
5049
5088
|
if (!((_a = this.twilioService.acceptedCallList) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
5050
5089
|
(_b = this.twilioService.device) === null || _b === void 0 ? void 0 : _b.disconnectAll();
|
|
5051
5090
|
(_c = this.twilioService.spareDevice) === null || _c === void 0 ? void 0 : _c.disconnectAll();
|
|
@@ -5055,15 +5094,14 @@ class DialboxComponent {
|
|
|
5055
5094
|
}
|
|
5056
5095
|
}
|
|
5057
5096
|
if (!((_e = this.incomingCallsList) === null || _e === void 0 ? void 0 : _e.length)) {
|
|
5058
|
-
setTimeout(() => {
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
}, 2000);
|
|
5097
|
+
// setTimeout(() => {
|
|
5098
|
+
// if(!this.incomingCallsList?.length) {
|
|
5099
|
+
// this.isCallInProgress = false;
|
|
5100
|
+
// this.twilioService.device?.disconnectAll();
|
|
5101
|
+
// this.twilioService.spareDevice?.disconnectAll();
|
|
5102
|
+
// this.twilioService.acceptedCallList = [];
|
|
5103
|
+
// }
|
|
5104
|
+
// }, 5000);
|
|
5067
5105
|
}
|
|
5068
5106
|
}));
|
|
5069
5107
|
this.token = localStorage.getItem('ext_token') || '';
|
|
@@ -5317,7 +5355,7 @@ class DialboxComponent {
|
|
|
5317
5355
|
if (this.twilioService.incomingCallToken != this.updatedTwilioToken) {
|
|
5318
5356
|
this.twilioService.incomingCallToken = this.updatedTwilioToken;
|
|
5319
5357
|
this.twilioService.tokenInitialized = true;
|
|
5320
|
-
this.twilioService.initializeTwilioDevice(
|
|
5358
|
+
this.twilioService.initializeTwilioDevice(localStorage.getItem('deviceId'));
|
|
5321
5359
|
}
|
|
5322
5360
|
}
|
|
5323
5361
|
if (((_x = changes['userId']) === null || _x === void 0 ? void 0 : _x.currentValue) && this.userId) {
|
|
@@ -6062,6 +6100,7 @@ class DialboxComponent {
|
|
|
6062
6100
|
this.incomingCallsList = [];
|
|
6063
6101
|
// Clean up Twilio device when component is destroyed
|
|
6064
6102
|
if (this.twilioService['device']) {
|
|
6103
|
+
console.log('1402');
|
|
6065
6104
|
this.twilioService['device'].disconnectAll();
|
|
6066
6105
|
this.twilioService['device'].destroy();
|
|
6067
6106
|
}
|