Created
January 2, 2012 06:53
-
-
Save lancefisher/1549641 to your computer and use it in GitHub Desktop.
ASP.NET Code running on AppHarbor for Twilio Rube Goldberg Contest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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