Skip to content

Instantly share code, notes, and snippets.

@namlet
Created November 19, 2012 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save namlet/4112326 to your computer and use it in GitHub Desktop.
Save namlet/4112326 to your computer and use it in GitHub Desktop.
Twilio connection parameters example
var params = {
'name' : name,
'direction' : 'inbound'
};
connection = Twilio.Device.connect( params );
console.log(connection.parameters);
connection.error(function(error){
console.log("connection error!");
console.log(error);
});
connection.accept(function(conn){
console.log(conn.parameters);
if (type == 'monitor'){
mute();
}
stampanswered(call_sid, name);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment