@vgroup/dialbox 0.2.80 → 0.2.81
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 +5 -3
- package/esm2020/lib/dialbox.component.mjs +43 -43
- package/fesm2015/vgroup-dialbox.mjs +46 -44
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +46 -44
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2080,6 +2080,7 @@ class CallProgressComponent {
|
|
|
2080
2080
|
if (changes['callData']) {
|
|
2081
2081
|
if (changes['callData'].currentValue?.isIncomingCall) {
|
|
2082
2082
|
this.incomingCallDiv = true;
|
|
2083
|
+
this.call['callInfo'] = { ...this.callData };
|
|
2083
2084
|
this.cdr.detectChanges();
|
|
2084
2085
|
}
|
|
2085
2086
|
else if (changes['callData'].currentValue?.displayNum || changes['callData'].currentValue?.from) {
|
|
@@ -2179,7 +2180,7 @@ class CallProgressComponent {
|
|
|
2179
2180
|
conferenceId: this.conferenceId
|
|
2180
2181
|
});
|
|
2181
2182
|
this.callData = { ...this.callData, participantId: this.addRes?.participantId };
|
|
2182
|
-
this.call['callInfo'] = this.callData;
|
|
2183
|
+
this.call['callInfo'] = { ...this.callData };
|
|
2183
2184
|
console.log('Initial participantId:', this.addRes?.participantId);
|
|
2184
2185
|
}
|
|
2185
2186
|
catch (e) {
|
|
@@ -2449,7 +2450,7 @@ class CallProgressComponent {
|
|
|
2449
2450
|
hold: true
|
|
2450
2451
|
});
|
|
2451
2452
|
// Put current call on hold
|
|
2452
|
-
this.heldCall = this.call;
|
|
2453
|
+
this.heldCall = { ...this.call };
|
|
2453
2454
|
this.isCallOnHold = true;
|
|
2454
2455
|
this.heldCall.mute(true);
|
|
2455
2456
|
// Close contacts panel and show ring animation
|
|
@@ -2466,6 +2467,7 @@ class CallProgressComponent {
|
|
|
2466
2467
|
name: contactName || phoneNumber,
|
|
2467
2468
|
img: contact?.img || 'assets/images/user.jpg'
|
|
2468
2469
|
};
|
|
2470
|
+
this.call['callInfo'] = { ...this.callData };
|
|
2469
2471
|
this.cdr.detectChanges();
|
|
2470
2472
|
// Get the conference ID from the current call or use the stored one
|
|
2471
2473
|
const conferenceId = this.conferenceId;
|
|
@@ -3069,50 +3071,50 @@ class DialboxComponent {
|
|
|
3069
3071
|
// Ensure Twilio is initialized even when dialpad starts hidden,
|
|
3070
3072
|
// so we can auto-open on incoming calls.
|
|
3071
3073
|
this.initializeTwilio();
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
if (incomingCallData) {
|
|
3078
|
-
if (
|
|
3079
|
-
this._isDialpadHidden
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
this.
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3074
|
+
try {
|
|
3075
|
+
this.incomeingCallSocketService.connect();
|
|
3076
|
+
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => {
|
|
3077
|
+
console.log("WS Event Received:", incomingCallData);
|
|
3078
|
+
console.log("WS Event Received:", incomingCallData.data);
|
|
3079
|
+
if (incomingCallData.type === "/incoming/call") {
|
|
3080
|
+
if (incomingCallData) {
|
|
3081
|
+
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3082
|
+
this._isDialpadHidden = false;
|
|
3083
|
+
}
|
|
3084
|
+
if (this.isCallInProgress) {
|
|
3085
|
+
this.newIncomingCalls.push(incomingCallData);
|
|
3086
|
+
console.log('325', incomingCallData);
|
|
3087
|
+
this.getUserInformation(incomingCallData);
|
|
3088
|
+
}
|
|
3089
|
+
else {
|
|
3090
|
+
incomingCallData['isFirstCall'] = true;
|
|
3091
|
+
console.log('dd1');
|
|
3092
|
+
this.isCallInProgress = true;
|
|
3093
|
+
this.isDialpadHidden = false;
|
|
3094
|
+
this.callData.phone = incomingCallData.parameters['From'];
|
|
3095
|
+
console.log('dd2');
|
|
3096
|
+
this.getUserInformation(incomingCallData);
|
|
3097
|
+
this.callData.name = incomingCallData.customParameters.get('name');
|
|
3098
|
+
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3099
|
+
this.callData.isIncomingCall = true;
|
|
3100
|
+
}
|
|
3101
|
+
incomingCallData.on('cancel', () => {
|
|
3102
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3103
|
+
// if(this.incomingCallsList.length == 0){
|
|
3104
|
+
// console.log('dd3')
|
|
3105
|
+
// this.isCallInProgress = false;
|
|
3106
|
+
// }
|
|
3107
|
+
});
|
|
3108
|
+
incomingCallData.on('disconnect', () => {
|
|
3109
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3110
|
+
// if(this.incomingCallsList.length == 0){
|
|
3111
|
+
// console.log('dd4')
|
|
3112
|
+
// this.isCallInProgress = false;
|
|
3113
|
+
// }
|
|
3114
|
+
});
|
|
3097
3115
|
}
|
|
3098
|
-
incomingCallData.on('cancel', () => {
|
|
3099
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3100
|
-
// if(this.incomingCallsList.length == 0){
|
|
3101
|
-
// console.log('dd3')
|
|
3102
|
-
// this.isCallInProgress = false;
|
|
3103
|
-
// }
|
|
3104
|
-
});
|
|
3105
|
-
incomingCallData.on('disconnect', () => {
|
|
3106
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3107
|
-
// if(this.incomingCallsList.length == 0){
|
|
3108
|
-
// console.log('dd4')
|
|
3109
|
-
// this.isCallInProgress = false;
|
|
3110
|
-
// }
|
|
3111
|
-
});
|
|
3112
3116
|
}
|
|
3113
|
-
}
|
|
3114
|
-
});
|
|
3115
|
-
try {
|
|
3117
|
+
});
|
|
3116
3118
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3117
3119
|
//this.isCallInProgress = true;
|
|
3118
3120
|
this.getContactList();
|