@vgroup/dialbox 0.1.25 → 0.1.26
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 +15 -10
- package/esm2020/lib/service/twilio.service.mjs +4 -1
- package/fesm2015/vgroup-dialbox.mjs +17 -9
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +18 -10
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1457,6 +1457,9 @@ class TwilioService {
|
|
|
1457
1457
|
this.processedCallSids.add(callSid);
|
|
1458
1458
|
console.log('New incoming call:', callSid);
|
|
1459
1459
|
this.currentCall.next(call);
|
|
1460
|
+
this.callType.next('INCOMING');
|
|
1461
|
+
this.currentCallState.next('incoming');
|
|
1462
|
+
this.notificationSerivce.showNotification(call);
|
|
1460
1463
|
const callEndHandler = () => {
|
|
1461
1464
|
this.processedCallSids.delete(callSid);
|
|
1462
1465
|
call.off('disconnect', callEndHandler);
|
|
@@ -1615,16 +1618,21 @@ class IncomingCallComponent {
|
|
|
1615
1618
|
this.newIncomingCallsList = [];
|
|
1616
1619
|
}
|
|
1617
1620
|
const callSid = call.parameters['CallSid'];
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
this.twilioCallData
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1621
|
+
const existingCall = this.newIncomingCallsList.find((c) => c.parameters['CallSid'] === callSid);
|
|
1622
|
+
if (!existingCall) {
|
|
1623
|
+
this.newIncomingCallsList.push(call);
|
|
1624
|
+
this.incomingCallsNewList.emit([...this.newIncomingCallsList]);
|
|
1625
|
+
if (!this.twilioCallData) {
|
|
1626
|
+
this.twilioCallData = call;
|
|
1627
|
+
this.twilioAuthId = call.customParameters.get('twilioAuthId');
|
|
1628
|
+
this.sendIPforIncomingCall(this.twilioAuthId, '');
|
|
1629
|
+
}
|
|
1630
|
+
call.on('cancel', () => this.removeCallFromList(callSid));
|
|
1631
|
+
call.on('disconnect', () => this.removeCallFromList(callSid));
|
|
1632
|
+
}
|
|
1633
|
+
else {
|
|
1634
|
+
console.log('Call already in list, not adding again.');
|
|
1635
|
+
}
|
|
1628
1636
|
}
|
|
1629
1637
|
acceptCallFromList(data) {
|
|
1630
1638
|
data.accept();
|