import com.twilio.twiml.voice.Gather;
import com.twilio.twiml.VoiceResponse;
import com.twilio.twiml.voice.Say;
import com.twilio.twiml.TwiMLException;
public class Example {
public static void main(String[] args) {
Say say = new Say
.Builder("Welcome to Twilio, please tell us why you're calling").build();
Gather gather = new Gather.Builder().input("speech")
.action("/completed").say(say).build();
VoiceResponse response = new VoiceResponse.Builder().gather(gather)
.build();
try {
System.out.println(response.toXml());
} catch (TwiMLException e) {
e.printStackTrace();
}
}
}
In the above code i want to know the funnction of action method.what is the use of "/completed" inside the action method.
in the twilio doc it says some thing like this
"This TwiML creates a with speech. When Twilio executes this TwiML the application will prompt the user and accept speech for up to 60 seconds. Once the caller stops speaking for five seconds, Twilio will post her transcribed speech to the action url."
I got the above code from the below link