Last active
August 29, 2015 14:02
-
-
Save dchanTwilio/d86f40b340e29e729473 to your computer and use it in GitHub Desktop.
Csharp Dial with dial attributes
This file contains 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 Twilio.TwiML; | |
using Twilio.TwiML.Mvc; | |
namespace Demo.Controllers | |
{ | |
public class DialExampleController : TwilioController | |
{ | |
public ActionResult Dial() | |
{ | |
var response = new TwilioResponse(); | |
var toNumber = new Number | |
{ | |
url = "someUrl", | |
// See documentation for other valid attributes here: https://www.twilio.com/docs/api/twiml/number#attributes | |
}; | |
var dialAttributes = new | |
{ | |
// See documentation for valid attributes https://www.twilio.com/docs/api/twiml/dial#attributes | |
timeout = "30", | |
record = "true", | |
someOtherAttribute = "attributeValue", | |
// etc. | |
}; | |
response.Dial(toNumber, dialAttributes; | |
return TwiML(response); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment