public HttpResponseMessage RecordMessage(TwilioRecordRequest twilioRequest) { var twilioResponse = new TwilioResponse(); twilioResponse.Say("Please leave your message after the beep and finish with the pound key.", _voicesettings); twilioResponse.Say("You have 6 seconds.", _voicesettings); twilioResponse.Record( new { action = Url.Link("ExtendedApi", new {controller = "Phone", action = "HandleRecordedMessage"}), finishOnkey = "#", maxLength = "6", method = "POST", transcribe = "true" }); twilioResponse.Say("We did not receive a recording. You're returning to the previous menu.", _voicesettings); twilioResponse.Redirect(Url.Link("ExtendedApi", new { controller = "Phone", action = "HandleMenuCall" })); return Request.CreateResponse(HttpStatusCode.OK, twilioResponse.Element); }
public HttpResponseMessage HandleRecordedMessage(TwilioRecordRequest twilioRequest) { var twilioResponse = new TwilioResponse(); twilioResponse.Say("Your message has been recorded.", _voicesettings); twilioResponse.Redirect(Url.Link("ExtendedApi", new { controller = "Phone", action = "GoodByeMessage" })); return Request.CreateResponse(HttpStatusCode.OK, twilioResponse.Element); }