Search in sources :

Example 1 with Queue

use of com.twilio.twiml.voice.Queue in project api-snippets by TwilioDevEd.

the class Example method service.

public void service(final HttpServletRequest request, final HttpServletResponse response) throws IOException {
    Dial dial = new Dial.Builder().queue(new Queue.Builder("Queue Demo").build()).build();
    VoiceResponse voiceResponse = new VoiceResponse.Builder().dial(dial).build();
    try {
        response.getWriter().print(voiceResponse.toXml());
    } catch (TwiMLException e) {
        e.printStackTrace();
    }
}
Also used : Dial(com.twilio.twiml.voice.Dial) VoiceResponse(com.twilio.twiml.VoiceResponse) Queue(com.twilio.twiml.voice.Queue) TwiMLException(com.twilio.twiml.TwiMLException)

Aggregations

TwiMLException (com.twilio.twiml.TwiMLException)1 VoiceResponse (com.twilio.twiml.VoiceResponse)1 Dial (com.twilio.twiml.voice.Dial)1 Queue (com.twilio.twiml.voice.Queue)1