I am building an application of calls with Twilio.
I can make the call from browser to mobile and its working fine. but I cant handle the situation when a call is rejected from mobile.
If a call rejected from mobile I need to show "The customer is Busy" in browser.
I have tried …
var outcall = outGoingDevice.connect(params);
outcall.on('ringing', function(call) {
console.log('Outgoing call Ringing');
if(call) $('.callStatus').html('Ringing...').show();
})
outcall.on('accept', function(call) {
console.log('Outgoing call Accepted');
$('.callStatus').hide();
startTimerOut();
})
outcall.on('disconnect', function(call) {
console.log('Outgoing call Disconnected');
$('.callStatus').hide();
resetTimerOut();
})
In my case when call to a number, it reject from mobile -> going to inside ringing + accept + disconnect methods
Is there any busy method available in twilio sdk..? I am using 1x version for my project...