@vgroup/dialbox 0.2.86 → 0.2.88
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 +4 -2
- package/esm2020/lib/dialbox.component.mjs +43 -43
- package/fesm2015/vgroup-dialbox.mjs +45 -43
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +45 -43
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2436,6 +2436,8 @@ class CallProgressComponent {
|
|
|
2436
2436
|
}
|
|
2437
2437
|
async callContact(contact) {
|
|
2438
2438
|
console.log('Adding participant:', contact);
|
|
2439
|
+
console.log('this.call', this.call);
|
|
2440
|
+
console.log('this.call', this.call.status());
|
|
2439
2441
|
// Check if there's an active call
|
|
2440
2442
|
if (!this.call || this.call.status() !== 'open') {
|
|
2441
2443
|
console.error('No active call');
|
|
@@ -2454,7 +2456,7 @@ class CallProgressComponent {
|
|
|
2454
2456
|
hold: true
|
|
2455
2457
|
});
|
|
2456
2458
|
// Put current call on hold
|
|
2457
|
-
this.heldCall =
|
|
2459
|
+
this.heldCall = this.call;
|
|
2458
2460
|
this.isCallOnHold = true;
|
|
2459
2461
|
this.heldCall.mute(true);
|
|
2460
2462
|
// Close contacts panel and show ring animation
|
|
@@ -3075,50 +3077,50 @@ class DialboxComponent {
|
|
|
3075
3077
|
// Ensure Twilio is initialized even when dialpad starts hidden,
|
|
3076
3078
|
// so we can auto-open on incoming calls.
|
|
3077
3079
|
this.initializeTwilio();
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
if (incomingCallData) {
|
|
3084
|
-
if (
|
|
3085
|
-
this._isDialpadHidden
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
this.
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3080
|
+
try {
|
|
3081
|
+
this.incomeingCallSocketService.connect();
|
|
3082
|
+
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => {
|
|
3083
|
+
console.log("WS Event Received:", incomingCallData);
|
|
3084
|
+
console.log("WS Event Received:", incomingCallData.data);
|
|
3085
|
+
if (incomingCallData.type === "/incoming/call") {
|
|
3086
|
+
if (incomingCallData) {
|
|
3087
|
+
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3088
|
+
this._isDialpadHidden = false;
|
|
3089
|
+
}
|
|
3090
|
+
if (this.isCallInProgress) {
|
|
3091
|
+
this.newIncomingCalls.push(incomingCallData);
|
|
3092
|
+
console.log('325', incomingCallData);
|
|
3093
|
+
this.getUserInformation(incomingCallData);
|
|
3094
|
+
}
|
|
3095
|
+
else {
|
|
3096
|
+
incomingCallData['isFirstCall'] = true;
|
|
3097
|
+
console.log('dd1');
|
|
3098
|
+
this.isCallInProgress = true;
|
|
3099
|
+
this.isDialpadHidden = false;
|
|
3100
|
+
this.callData.phone = incomingCallData.parameters['From'];
|
|
3101
|
+
console.log('dd2');
|
|
3102
|
+
this.getUserInformation(incomingCallData);
|
|
3103
|
+
this.callData.name = incomingCallData.customParameters.get('name');
|
|
3104
|
+
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3105
|
+
this.callData.isIncomingCall = true;
|
|
3106
|
+
}
|
|
3107
|
+
incomingCallData.on('cancel', () => {
|
|
3108
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3109
|
+
// if(this.incomingCallsList.length == 0){
|
|
3110
|
+
// console.log('dd3')
|
|
3111
|
+
// this.isCallInProgress = false;
|
|
3112
|
+
// }
|
|
3113
|
+
});
|
|
3114
|
+
incomingCallData.on('disconnect', () => {
|
|
3115
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3116
|
+
// if(this.incomingCallsList.length == 0){
|
|
3117
|
+
// console.log('dd4')
|
|
3118
|
+
// this.isCallInProgress = false;
|
|
3119
|
+
// }
|
|
3120
|
+
});
|
|
3103
3121
|
}
|
|
3104
|
-
incomingCallData.on('cancel', () => {
|
|
3105
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3106
|
-
// if(this.incomingCallsList.length == 0){
|
|
3107
|
-
// console.log('dd3')
|
|
3108
|
-
// this.isCallInProgress = false;
|
|
3109
|
-
// }
|
|
3110
|
-
});
|
|
3111
|
-
incomingCallData.on('disconnect', () => {
|
|
3112
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3113
|
-
// if(this.incomingCallsList.length == 0){
|
|
3114
|
-
// console.log('dd4')
|
|
3115
|
-
// this.isCallInProgress = false;
|
|
3116
|
-
// }
|
|
3117
|
-
});
|
|
3118
3122
|
}
|
|
3119
|
-
}
|
|
3120
|
-
});
|
|
3121
|
-
try {
|
|
3123
|
+
});
|
|
3122
3124
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3123
3125
|
//this.isCallInProgress = true;
|
|
3124
3126
|
this.getContactList();
|