Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Created June 20, 2012 21:59
Show Gist options
  • Save jonmarkgo/2962480 to your computer and use it in GitHub Desktop.
Save jonmarkgo/2962480 to your computer and use it in GitHub Desktop.
Twilio app setup
var twilio_app = cli.account.getApplication(process.env.app_sid, function (err, app) {
if (err) {
throw err;
}
app.register();
app.on('incomingCall', function (call) {
if (arduinoTcp === null) {
call.say("I can't do that for you, Hal. I'm offline.");
} else {
curr_call = call;
call.gather(getDigits, {numDigits: 1}).say("Use 2, 4, 6, and 8 to drive. Press 0 to stop, 5 for distance.");
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment