@vgroup/dialbox 0.0.45 → 0.0.47
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/incoming-call/incoming-call.component.mjs +2 -2
- package/esm2020/lib/dialbox.component.mjs +6 -37
- package/fesm2015/vgroup-dialbox.mjs +6 -39
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +6 -37
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/dialbox.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1541,7 +1541,7 @@ class IncomingCallComponent {
|
|
|
1541
1541
|
// }
|
|
1542
1542
|
// });
|
|
1543
1543
|
try {
|
|
1544
|
-
this.twilioService.currentCall.subscribe(
|
|
1544
|
+
this.twilioService.currentCall.subscribe(call => {
|
|
1545
1545
|
if (call) {
|
|
1546
1546
|
this.twilioCallData = call;
|
|
1547
1547
|
this.twilioAuthId = call.customParameters.get('twilioAuthId');
|
|
@@ -2260,7 +2260,7 @@ class DialboxComponent {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
else {
|
|
2262
2262
|
this.isCallInProgress = true;
|
|
2263
|
-
this.isDialpadHidden =
|
|
2263
|
+
this.isDialpadHidden = false;
|
|
2264
2264
|
this.callData.phone = incomingCallData.parameters['From'];
|
|
2265
2265
|
this.getUserInformation(incomingCallData);
|
|
2266
2266
|
this.callData.name = incomingCallData.customParameters.get('name');
|
|
@@ -2385,7 +2385,7 @@ class DialboxComponent {
|
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
2387
|
hideDialpad() {
|
|
2388
|
-
this.isDialpadHidden =
|
|
2388
|
+
this.isDialpadHidden = true;
|
|
2389
2389
|
this.closeDialpadEvent.emit();
|
|
2390
2390
|
this.clearAllDialed();
|
|
2391
2391
|
this.filteredContactList = [];
|
|
@@ -3026,40 +3026,9 @@ class DialboxComponent {
|
|
|
3026
3026
|
this.newIncomingCallData = call;
|
|
3027
3027
|
}
|
|
3028
3028
|
rejectNewIncomingCall(call) {
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
return;
|
|
3033
|
-
}
|
|
3034
|
-
// Reject the call
|
|
3035
|
-
call.reject();
|
|
3036
|
-
// Get call SID safely
|
|
3037
|
-
const callSid = call.parameters?.CallSid || call.parameters?.callSid;
|
|
3038
|
-
if (!callSid) {
|
|
3039
|
-
console.warn('No CallSid found for rejected call');
|
|
3040
|
-
return;
|
|
3041
|
-
}
|
|
3042
|
-
// Filter out the rejected call from the lists
|
|
3043
|
-
const filterByCallSid = (item) => {
|
|
3044
|
-
const itemSid = item.parameters?.CallSid || item.parameters?.callSid;
|
|
3045
|
-
return itemSid !== callSid;
|
|
3046
|
-
};
|
|
3047
|
-
// Update call lists
|
|
3048
|
-
if (Array.isArray(this.newIncomingCalls)) {
|
|
3049
|
-
this.newIncomingCalls = this.newIncomingCalls.filter(filterByCallSid);
|
|
3050
|
-
}
|
|
3051
|
-
if (Array.isArray(this.incomingCallsList)) {
|
|
3052
|
-
this.incomingCallsList = this.incomingCallsList.filter(filterByCallSid);
|
|
3053
|
-
}
|
|
3054
|
-
// Reset call state if no more incoming calls
|
|
3055
|
-
if (!this.incomingCallsList || this.incomingCallsList.length === 0) {
|
|
3056
|
-
this.isCallInProgress = false;
|
|
3057
|
-
this.isDialpadHidden = false;
|
|
3058
|
-
}
|
|
3059
|
-
}
|
|
3060
|
-
catch (error) {
|
|
3061
|
-
console.error('Error rejecting incoming call:', error);
|
|
3062
|
-
}
|
|
3029
|
+
call.reject();
|
|
3030
|
+
this.newIncomingCalls = this.newIncomingCalls.filter((item) => item.parameters.CallSid !== call.parameters['CallSid']);
|
|
3031
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters.CallSid !== call.parameters['CallSid']);
|
|
3063
3032
|
}
|
|
3064
3033
|
newIncomingCallInitiated() {
|
|
3065
3034
|
this.isCallInProgress = true;
|