public IActionResult ReceiveCall() { var twiml = new TwilioResponse(); twiml.Say("You are calling Marcos Placona").Dial(_twilioSettings.Options.MyOwnNumber); return(Content(twiml.ToString())); }
private static HttpResponseMessage GetHttpResponse(TwilioResponse response) { Log.Info(response); return(new HttpResponseMessage { Content = new StringContent(response.ToString(), Encoding.UTF8, "application/xml") }); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/xml"; var response = new TwilioResponse(); response.Say("Hello there! You have successfully configured a web hook."); response.Say("Good luck on your Twilio quest!", new { Voice = "woman" }); context.Response.Write(response.ToString()); }
public void Can_Generate_Dial_And_Mixed_Number_And_Client_Nouns() { var response = new TwilioResponse(); response.Dial( new Number("+15551112222"), new Client("Tommy"), new Number("+15553334444"), new Number("+15556667777"), new Client("Jenny") ); Debug.Write(response.ToString()); Assert.IsTrue(IsValidTwiML(response.ToXDocument())); }
public virtual ActionResult VoiceTwiML(string PhoneNumber) { var twiml = new TwilioResponse(); try { var number = new Number(PhoneNumber); twiml.Dial(number, new { callerId = MY_TWILIO_PHONENUMBER }); } catch (Exception) { //e.printStackTrace(); } Response.ContentType = "text/xml"; Response.Write(twiml.ToString()); Response.End(); return(Content("")); }
private static ActionResult SendTwilioResult(TwilioResponse response) { Stream result = new MemoryStream(Encoding.Default.GetBytes(response.ToString())); return(new FileStreamResult(result, "application/xml")); }
public void Hangup() { response.Hangup(); response.ToString(); }