1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.manager.action;
18
19 /***
20 * The ZapDialOffhookAction dials a number on a zap channel while offhook.
21 *
22 * @author srt
23 * @version $Id: ZapDialOffhookAction.java,v 1.4 2005/08/07 17:10:29 srt Exp $
24 */
25 public class ZapDialOffhookAction extends AbstractManagerAction
26 {
27 /***
28 * Serializable version identifier
29 */
30 private static final long serialVersionUID = -4708738122184810899L;
31 private Integer zapChannel;
32 private String number;
33
34 /***
35 * Creates a new empty ZapDialOffhookAction.
36 */
37 public ZapDialOffhookAction()
38 {
39
40 }
41
42 /***
43 * Creates a new ZapDialOffhookAction that dials the given number on the
44 * given zap channel.
45 *
46 * @param zapChannel the number of the zap channel
47 * @param number the number to dial
48 * @since 0.2
49 */
50 public ZapDialOffhookAction(Integer zapChannel, String number)
51 {
52 this.zapChannel = zapChannel;
53 this.number = number;
54 }
55
56 /***
57 * Returns the name of this action, i.e. "ZapDialOffhook".
58 */
59 public String getAction()
60 {
61 return "ZapDialOffhook";
62 }
63
64 /***
65 * Returns the number of the zap channel.
66 */
67 public Integer getZapChannel()
68 {
69 return zapChannel;
70 }
71
72 /***
73 * Sets the number of the zap channel.<br>
74 * This property is mandatory.
75 */
76 public void setZapChannel(Integer channel)
77 {
78 this.zapChannel = channel;
79 }
80
81 /***
82 * Returns the number to dial.
83 */
84 public String getNumber()
85 {
86 return number;
87 }
88
89 /***
90 * Sets the number to dial.<br>
91 * This property is mandatory.
92 */
93 public void setNumber(String number)
94 {
95 this.number = number;
96 }
97 }