Skip to content

Instantly share code, notes, and snippets.

@lancefisher
Created January 2, 2012 06:53
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 lancefisher/1549641 to your computer and use it in GitHub Desktop.
Save lancefisher/1549641 to your computer and use it in GitHub Desktop.
ASP.NET Code running on AppHarbor for Twilio Rube Goldberg Contest
@using System.Text.RegularExpressions;
@{
Response.ContentType = "text/xml";
// My Twilio phone number
string callerId = "+XXXXXXXXXX";
// put your default Twilio Client name here, for when a phone number isn't given
string number = "jenny";
// get the phone number from the page request parameters, if given
if (Request["PhoneNumber"] != null) {
number = Request["PhoneNumber"];
}
}
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Sms to="@number" from="@callerId">
Hi can you tell me what year it is?
</Sms>
<Say>
I just sent a text message to @number .
If they reply with a number, we'll set the nixie tubes!
</Say>
</Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment