001
002/*
003 * Copyright (C) 2011 Archie L. Cobbs. All rights reserved.
004 *
005 * $Id$
006 */
007
008package org.dellroad.jibxbindings.twilio.twiml;
009
010import java.net.URI;
011import java.util.ArrayList;
012import java.util.List;
013
014import org.dellroad.jibxbindings.twilio.Method;
015
016/**
017 * TwiML <code>&lt;Dial&gt;</code> verb.
018 */
019public class Dial implements Verb {
020
021    public static final int DEFAULT_TIMEOUT = 30;
022    public static final int DEFAULT_TIME_LIMIT = 4 * 60 * 60;
023
024    private URI action;
025    private Method method = Method.POST;
026    private int timeout = DEFAULT_TIMEOUT;
027    private boolean hangupOnStar;
028    private int timeLimit = DEFAULT_TIME_LIMIT;
029    private String callerId;
030    private List<Number> numbers = new ArrayList<Number>();
031    private Conference conference;
032
033    public Dial() {
034    }
035
036    public Dial(Number number) {
037        this.numbers.add(number);
038    }
039
040    public URI getAction() {
041        return this.action;
042    }
043    public void setAction(URI action) {
044        this.action = action;
045    }
046
047    public Method getMethod() {
048        return this.method;
049    }
050    public void setMethod(Method method) {
051        this.method = method;
052    }
053
054    public int getTimeout() {
055        return this.timeout;
056    }
057    public void setTimeout(int timeout) {
058        this.timeout = timeout;
059    }
060
061    public boolean isHangupOnStar() {
062        return this.hangupOnStar;
063    }
064    public void setHangupOnStar(boolean hangupOnStar) {
065        this.hangupOnStar = hangupOnStar;
066    }
067
068    public int getTimeLimit() {
069        return this.timeLimit;
070    }
071    public void setTimeLimit(int timeLimit) {
072        this.timeLimit = timeLimit;
073    }
074
075    public String getCallerId() {
076        return this.callerId;
077    }
078    public void setCallerId(String callerId) {
079        this.callerId = callerId;
080    }
081
082    public List<Number> getNumbers() {
083        return this.numbers;
084    }
085    public void setNumbers(List<Number> numbers) {
086        this.numbers = numbers;
087    }
088
089    public Conference getConference() {
090        return this.conference;
091    }
092    public void setConference(Conference conference) {
093        this.conference = conference;
094    }
095}
096