0

I'm using Twilio API to make some calls from browser to phones and I have one question? Can the client realize when the user hangups his/her phone, raising an event and changing something in the view with js?

I'm trying to implement a single but user-friendly call/hangup modal to make the calls using twilio js library.

4

1 回答 1

3

您可以在Twilio Connection对象上注册一个事件侦听器来实现:

var connection = Twilio.Device.connect();

connection.disconnect(function(conn) {
  console.log("the call has ended");
});
于 2015-07-07T17:53:54.917 回答