Elby
Elby

Reputation: 1674

How to know twilio call is active/not?

I have an web application with Twilio web calling. Its working well. Now my problem is I want to create a Twilio listener. If we navigate a new window I want to inform user Twilio calling section is active.

For connecting Twilio I used following java script code

Twilio.Device.connect(function (conn) {

 }

Upvotes: 0

Views: 151

Answers (1)

Farah Inamdar
Farah Inamdar

Reputation: 21

You can check status of Twilio device.

// session for call is active 
if (Twilio.Device.status() == "busy")
{
// Do your stuff here
}

Upvotes: 1

Related Questions