@vgroup/dialbox 0.2.86 → 0.2.87
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 +3 -1
- package/esm2020/lib/dialbox.component.mjs +43 -43
- package/fesm2015/vgroup-dialbox.mjs +44 -42
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +44 -42
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2468,6 +2468,8 @@ class CallProgressComponent {
|
|
|
2468
2468
|
var _a, _b, _c, _d;
|
|
2469
2469
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2470
2470
|
console.log('Adding participant:', contact);
|
|
2471
|
+
console.log('this.call', this.call);
|
|
2472
|
+
console.log('this.call', this.call.status());
|
|
2471
2473
|
// Check if there's an active call
|
|
2472
2474
|
if (!this.call || this.call.status() !== 'open') {
|
|
2473
2475
|
console.error('No active call');
|
|
@@ -3105,50 +3107,50 @@ class DialboxComponent {
|
|
|
3105
3107
|
// Ensure Twilio is initialized even when dialpad starts hidden,
|
|
3106
3108
|
// so we can auto-open on incoming calls.
|
|
3107
3109
|
this.initializeTwilio();
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
if (incomingCallData) {
|
|
3114
|
-
if (
|
|
3115
|
-
this._isDialpadHidden
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
this.
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3110
|
+
try {
|
|
3111
|
+
this.incomeingCallSocketService.connect();
|
|
3112
|
+
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => {
|
|
3113
|
+
console.log("WS Event Received:", incomingCallData);
|
|
3114
|
+
console.log("WS Event Received:", incomingCallData.data);
|
|
3115
|
+
if (incomingCallData.type === "/incoming/call") {
|
|
3116
|
+
if (incomingCallData) {
|
|
3117
|
+
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3118
|
+
this._isDialpadHidden = false;
|
|
3119
|
+
}
|
|
3120
|
+
if (this.isCallInProgress) {
|
|
3121
|
+
this.newIncomingCalls.push(incomingCallData);
|
|
3122
|
+
console.log('325', incomingCallData);
|
|
3123
|
+
this.getUserInformation(incomingCallData);
|
|
3124
|
+
}
|
|
3125
|
+
else {
|
|
3126
|
+
incomingCallData['isFirstCall'] = true;
|
|
3127
|
+
console.log('dd1');
|
|
3128
|
+
this.isCallInProgress = true;
|
|
3129
|
+
this.isDialpadHidden = false;
|
|
3130
|
+
this.callData.phone = incomingCallData.parameters['From'];
|
|
3131
|
+
console.log('dd2');
|
|
3132
|
+
this.getUserInformation(incomingCallData);
|
|
3133
|
+
this.callData.name = incomingCallData.customParameters.get('name');
|
|
3134
|
+
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3135
|
+
this.callData.isIncomingCall = true;
|
|
3136
|
+
}
|
|
3137
|
+
incomingCallData.on('cancel', () => {
|
|
3138
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3139
|
+
// if(this.incomingCallsList.length == 0){
|
|
3140
|
+
// console.log('dd3')
|
|
3141
|
+
// this.isCallInProgress = false;
|
|
3142
|
+
// }
|
|
3143
|
+
});
|
|
3144
|
+
incomingCallData.on('disconnect', () => {
|
|
3145
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3146
|
+
// if(this.incomingCallsList.length == 0){
|
|
3147
|
+
// console.log('dd4')
|
|
3148
|
+
// this.isCallInProgress = false;
|
|
3149
|
+
// }
|
|
3150
|
+
});
|
|
3133
3151
|
}
|
|
3134
|
-
incomingCallData.on('cancel', () => {
|
|
3135
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3136
|
-
// if(this.incomingCallsList.length == 0){
|
|
3137
|
-
// console.log('dd3')
|
|
3138
|
-
// this.isCallInProgress = false;
|
|
3139
|
-
// }
|
|
3140
|
-
});
|
|
3141
|
-
incomingCallData.on('disconnect', () => {
|
|
3142
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3143
|
-
// if(this.incomingCallsList.length == 0){
|
|
3144
|
-
// console.log('dd4')
|
|
3145
|
-
// this.isCallInProgress = false;
|
|
3146
|
-
// }
|
|
3147
|
-
});
|
|
3148
3152
|
}
|
|
3149
|
-
}
|
|
3150
|
-
});
|
|
3151
|
-
try {
|
|
3153
|
+
});
|
|
3152
3154
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3153
3155
|
//this.isCallInProgress = true;
|
|
3154
3156
|
this.getContactList();
|