I have trying to establish a call with javascript client:
function call() {
// get the phone number or client to connect the call to
params = {"PhoneNumber": $("#number").val()};
Twilio.Device.connect(params);
}
In incoming call back api we are got the call sid
Twilio.Device.incoming(function (conn) {
alert(conn.parameters.CallSid);
});
And outgoing call back api we are not get the call sid:
Twilio.Device.connect(function (conn) {
alert(conn.parameters.CallSid); // Not working undefine
$("#log").text("Successfully established call");
});
How to get call sid when twilio device connect successfully call(outgoing call)
Thanks