@vgroup/dialbox 0.0.43 → 0.0.45
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.
|
@@ -2215,7 +2215,7 @@ class DialboxComponent {
|
|
|
2215
2215
|
this.selectedCallerId = { number: contact.from };
|
|
2216
2216
|
this.isSmartDialCall = true;
|
|
2217
2217
|
setTimeout(() => {
|
|
2218
|
-
this.isDialpadHidden =
|
|
2218
|
+
this.isDialpadHidden = true;
|
|
2219
2219
|
}, 2000);
|
|
2220
2220
|
this.callData.phone = contact.number;
|
|
2221
2221
|
this.callData.name = contact.name;
|
|
@@ -2229,7 +2229,7 @@ class DialboxComponent {
|
|
|
2229
2229
|
else {
|
|
2230
2230
|
this.getUserCallSetting();
|
|
2231
2231
|
setTimeout(() => {
|
|
2232
|
-
this.isDialpadHidden =
|
|
2232
|
+
this.isDialpadHidden = true;
|
|
2233
2233
|
}, 1000);
|
|
2234
2234
|
this.getUserInformation(contact);
|
|
2235
2235
|
// this.incomingCallsList.push(contact)
|
|
@@ -2276,7 +2276,7 @@ class DialboxComponent {
|
|
|
2276
2276
|
}
|
|
2277
2277
|
else {
|
|
2278
2278
|
this.isCallInProgress = true;
|
|
2279
|
-
this.isDialpadHidden =
|
|
2279
|
+
this.isDialpadHidden = true;
|
|
2280
2280
|
this.callData.phone = incomingCallData.parameters['From'];
|
|
2281
2281
|
this.getUserInformation(incomingCallData);
|
|
2282
2282
|
this.callData.name = incomingCallData.customParameters.get('name');
|
|
@@ -2401,7 +2401,7 @@ class DialboxComponent {
|
|
|
2401
2401
|
}
|
|
2402
2402
|
}
|
|
2403
2403
|
hideDialpad() {
|
|
2404
|
-
this.isDialpadHidden =
|
|
2404
|
+
this.isDialpadHidden = false;
|
|
2405
2405
|
this.closeDialpadEvent.emit();
|
|
2406
2406
|
this.clearAllDialed();
|
|
2407
2407
|
this.filteredContactList = [];
|
|
@@ -3049,9 +3049,42 @@ class DialboxComponent {
|
|
|
3049
3049
|
this.newIncomingCallData = call;
|
|
3050
3050
|
}
|
|
3051
3051
|
rejectNewIncomingCall(call) {
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3052
|
+
var _a, _b;
|
|
3053
|
+
try {
|
|
3054
|
+
if (!call || typeof call.reject !== 'function') {
|
|
3055
|
+
console.error('Invalid call object provided or missing reject method');
|
|
3056
|
+
return;
|
|
3057
|
+
}
|
|
3058
|
+
// Reject the call
|
|
3059
|
+
call.reject();
|
|
3060
|
+
// Get call SID safely
|
|
3061
|
+
const callSid = ((_a = call.parameters) === null || _a === void 0 ? void 0 : _a.CallSid) || ((_b = call.parameters) === null || _b === void 0 ? void 0 : _b.callSid);
|
|
3062
|
+
if (!callSid) {
|
|
3063
|
+
console.warn('No CallSid found for rejected call');
|
|
3064
|
+
return;
|
|
3065
|
+
}
|
|
3066
|
+
// Filter out the rejected call from the lists
|
|
3067
|
+
const filterByCallSid = (item) => {
|
|
3068
|
+
var _a, _b;
|
|
3069
|
+
const itemSid = ((_a = item.parameters) === null || _a === void 0 ? void 0 : _a.CallSid) || ((_b = item.parameters) === null || _b === void 0 ? void 0 : _b.callSid);
|
|
3070
|
+
return itemSid !== callSid;
|
|
3071
|
+
};
|
|
3072
|
+
// Update call lists
|
|
3073
|
+
if (Array.isArray(this.newIncomingCalls)) {
|
|
3074
|
+
this.newIncomingCalls = this.newIncomingCalls.filter(filterByCallSid);
|
|
3075
|
+
}
|
|
3076
|
+
if (Array.isArray(this.incomingCallsList)) {
|
|
3077
|
+
this.incomingCallsList = this.incomingCallsList.filter(filterByCallSid);
|
|
3078
|
+
}
|
|
3079
|
+
// Reset call state if no more incoming calls
|
|
3080
|
+
if (!this.incomingCallsList || this.incomingCallsList.length === 0) {
|
|
3081
|
+
this.isCallInProgress = false;
|
|
3082
|
+
this.isDialpadHidden = false;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
catch (error) {
|
|
3086
|
+
console.error('Error rejecting incoming call:', error);
|
|
3087
|
+
}
|
|
3055
3088
|
}
|
|
3056
3089
|
newIncomingCallInitiated() {
|
|
3057
3090
|
this.isCallInProgress = true;
|