I am using twilio to make the calls.I am using ASP.NET MVC to create the response and gather inputs
Q1: How can i specify the attributes like lang, voice, loop, pause attributes for verb
public ActionResult Welcome(string msg) {
var response = new TwilioResponse();
response.Say("This is a Sample Message");
return TwiML(response);
}
Q2: I am using Gather input for options like
a)press 1 to repeat the message.
b)press 2 to confirm.
c)press 3 to repeat the menu options
I am not able to find a way to forward my message parameter (msg) to the Gather action.
public ActionResult WelcomeCall(string msg)
{
var response = new TwilioResponse();
response.BeginGather(new
{
action = "http://testurl.azurewebsites.net/Gather",
Digits = "1"
});
response.Say(msg);
response.Say("To repeat the message, press one");
response.Say("To confirm, press two");
response.Say("To repeat the menu options, press three");
response.EndGather();
return TwiML(response);
}
public ActionResult Gather(string Digits)
{
var response = new TwilioResponse();
if(Digits==1)
{
response.Say(msg);
}
return TwiML(response);
}
Could you please provide a way to handle this case.