I use "@twilio/voice-sdk": "^2.0.1"
When incoming call is calling everything works fine - I can accept or reject this call and it works.
But when caller stops calling I can't detect that there is no more incoming call (so UI still shows accept/reject buttons).
device = new Device(token, {
allowIncomingWhileBusy: true,
appName: 'spotioWeb',
closeProtection: true,
logLevel: 'debug',
})
device.register()
device.on('incoming', (conn) => {
onIncomingCall({ conn })
conn.on('reject', () => { callEnded() })
conn.on('disconnect', () => { callEnded() })
})