Skip to content

Instantly share code, notes, and snippets.

@mvilrokx
Last active August 29, 2015 14:13
Show Gist options
  • Save mvilrokx/c819fb63e98b80a6f5f2 to your computer and use it in GitHub Desktop.
Save mvilrokx/c819fb63e98b80a6f5f2 to your computer and use it in GitHub Desktop.
if ($("#call").is(':checked')) {
$.ajax({
type: "POST",
username: twilio.username,
password: twilio.pwd,
url: twilio.server_url + twilio.username + '/Calls.json',
data: { Url: <xml-containing-twilio-message>, From: twilio.phone, To: user.phone }
})
.done(function( msg ) {
console.log("Phone call made.");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment