@vgroup/dialbox 0.0.72 → 0.0.73
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/dialbox.component.mjs +2 -2
- package/esm2020/lib/service/twilio.service.mjs +11 -3
- package/fesm2015/vgroup-dialbox.mjs +11 -3
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +11 -3
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1435,12 +1435,13 @@ class TwilioService {
|
|
|
1435
1435
|
this.device.register();
|
|
1436
1436
|
this.device.on('incoming', (call) => {
|
|
1437
1437
|
console.log('Incoming call received:', call);
|
|
1438
|
+
// Store the call in the current call subject
|
|
1438
1439
|
this.currentCall.next(call);
|
|
1439
1440
|
this.callType.next('INCOMING');
|
|
1440
1441
|
this.currentCallState.next('incoming');
|
|
1442
|
+
// Show notification
|
|
1441
1443
|
this.notificationService.showNotification(call);
|
|
1442
|
-
//
|
|
1443
|
-
// call.accept();
|
|
1444
|
+
// Set up call event handlers
|
|
1444
1445
|
call.on('accept', () => {
|
|
1445
1446
|
const callSid = call.parameters['CallSid'];
|
|
1446
1447
|
console.log('Call accepted:', callSid);
|
|
@@ -1451,6 +1452,13 @@ class TwilioService {
|
|
|
1451
1452
|
console.log('Call disconnected:', callSid);
|
|
1452
1453
|
this.currentCall.next(null);
|
|
1453
1454
|
this.currentCallState.next('disconnected');
|
|
1455
|
+
this.callType.next('');
|
|
1456
|
+
});
|
|
1457
|
+
call.on('cancel', () => {
|
|
1458
|
+
console.log('Call cancelled by caller');
|
|
1459
|
+
this.currentCall.next(null);
|
|
1460
|
+
this.currentCallState.next('disconnected');
|
|
1461
|
+
this.callType.next('');
|
|
1454
1462
|
});
|
|
1455
1463
|
});
|
|
1456
1464
|
this.device.on('error', (error) => {
|
|
@@ -2344,7 +2352,7 @@ class DialboxComponent {
|
|
|
2344
2352
|
}
|
|
2345
2353
|
else {
|
|
2346
2354
|
this.isCallInProgress = true;
|
|
2347
|
-
this.isDialpadHidden =
|
|
2355
|
+
this.isDialpadHidden = true;
|
|
2348
2356
|
this.callData.phone = incomingCallData.parameters['From'];
|
|
2349
2357
|
this.getUserInformation(incomingCallData);
|
|
2350
2358
|
this.callData.name = incomingCallData.customParameters.get('name');
|