Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created November 6, 2010 18: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 mheadd/665617 to your computer and use it in GitHub Desktop.
Save mheadd/665617 to your computer and use it in GitHub Desktop.
// If the channel selected is TEXT, send a message.
if(channel == 'TEXT')
{
log("*** Sending text message. ***");
message("Hello, " + customerName + ", " + msg, { to: sendToNumber, network: "SMS"} );
}
// If the channel selected is Voice, make a call.
else
{
log("*** Making outbound phone call. ***");
call('tel:+1' + numberToDial, {
onAnswer: function() {
say("Hello, " + customerName + ", " + msg + ". This is a test message for a telephone.");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment