use of com.twilio.twiml.voice.Enqueue in project api-snippets by TwilioDevEd.
the class Example method service.
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
Enqueue enqueue = new Enqueue.Builder().name("Queue Demo").build();
VoiceResponse twiml = new VoiceResponse.Builder().enqueue(enqueue).build();
response.setContentType("application/xml");
try {
response.getWriter().print(twiml.toXml());
} catch (TwiMLException e) {
e.printStackTrace();
}
}
Aggregations