View Javadoc

1   /*
2    * Copyright  2004-2005 Stefan Reuter
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *
16   */
17  package net.sf.asterisk.manager.event;
18  
19  /***
20   * A dial event is triggered whenever a phone attempts to dial someone.<br>
21   * This event is implemented in <code>apps/app_dial.c</code>.<br>
22   * Available since Asterisk 1.2.
23   * 
24   * @author Asteria Solutions Group, Inc. <http://www.asteriasgi.com/>
25   * @version $Id: DialEvent.java,v 1.4 2005/07/26 11:35:58 srt Exp $
26   * @since 0.2
27   */
28  public class DialEvent extends ManagerEvent
29  {
30      /***
31       * Serializable version identifier
32       */
33      private static final long serialVersionUID = 3258130241292417336L;
34  
35      /***
36       * The name of the source channel.
37       */
38      private String src;
39  
40      /***
41       * The name of the destination channel.
42       */
43      private String destination;
44  
45      /***
46       * The new Caller*ID.
47       */
48      private String callerId;
49  
50      /***
51       * The new Caller*ID Name.
52       */
53      private String callerIdName;
54  
55      /***
56       * The unique id of the source channel.
57       */
58      private String srcUniqueId;
59  
60      /***
61       * The unique id of the destination channel.
62       */
63      private String destUniqueId;
64  
65      /***
66       * Creates a new DialEvent.
67       * 
68       * @param source
69       */
70      public DialEvent(Object source)
71      {
72          super(source);
73      }
74  
75      /***
76       * Returns the name of the source channel.
77       * 
78       * @return the name of the source channel.
79       */
80      public String getSrc()
81      {
82          return src;
83      }
84  
85      /***
86       * Sets the name of the source channel.
87       * 
88       * @param src the name of the source channel.
89       */
90      public void setSrc(String src)
91      {
92          this.src = src;
93      }
94  
95      /***
96       * Returns the name of the destination channel.
97       * 
98       * @return the name of the destination channel.
99       */
100     public String getDestination()
101     {
102         return destination;
103     }
104 
105     /***
106      * Sets the name of the destination channel.
107      * 
108      * @param destination the name of the destination channel.
109      */
110     public void setDestination(String destination)
111     {
112         this.destination = destination;
113     }
114 
115     /***
116      * Returns the Caller*ID.
117      * 
118      * @return the Caller*ID or "<unknown>" if none has been set.
119      */
120     public String getCallerId()
121     {
122         return callerId;
123     }
124 
125     /***
126      * Sets the caller*ID.
127      * 
128      * @param callerId the caller*ID.
129      */
130     public void setCallerId(String callerId)
131     {
132         this.callerId = callerId;
133     }
134 
135     /***
136      * Returns the Caller*ID Name.
137      * 
138      * @return the Caller*ID Name or "<unknown>" if none has been set.
139      */
140     public String getCallerIdName()
141     {
142         return callerIdName;
143     }
144 
145     /***
146      * Sets the Caller*Id Name.
147      * 
148      * @param callerIdName the Caller*Id Name to set.
149      */
150     public void setCallerIdName(String callerIdName)
151     {
152         this.callerIdName = callerIdName;
153     }
154 
155     /***
156      * Returns the unique ID of the source channel.
157      * 
158      * @return the unique ID of the source channel.
159      */
160     public String getSrcUniqueId()
161     {
162         return srcUniqueId;
163     }
164 
165     /***
166      * Sets the unique ID of the source channel.
167      * 
168      * @param srcUniqueId the unique ID of the source channel.
169      */
170     public void setSrcUniqueId(String srcUniqueId)
171     {
172         this.srcUniqueId = srcUniqueId;
173     }
174 
175     /***
176      * Returns the unique ID of the distination channel.
177      * 
178      * @return the unique ID of the distination channel.
179      */
180     public String getDestUniqueId()
181     {
182         return destUniqueId;
183     }
184 
185     /***
186      * Sets the unique ID of the distination channel.
187      * 
188      * @param destUniqueId the unique ID of the distination channel.
189      */
190     public void setDestUniqueId(String destUniqueId)
191     {
192         this.destUniqueId = destUniqueId;
193     }
194 }