Twilio javascript client callback on call answer

丶灬走出姿态 提交于 2019-12-04 09:25:57

The Twilio js client has a Device property which has the following methods that you can use.

Twilio.Device.incoming(softPhoneIncoming);
Twilio.Device.connect(softPhoneConnect);

function softPhoneIncoming(conn) {
        console.log(conn.parameters.From); // who is calling
        conn.accept(); //This will accept the incoming phone call
    }

function softPhoneConnect(conn)
    {
        // Called for all new connections, you could start the timer here
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!