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   * An AgentCalledEvent is triggered when an agent is rung.<br>
21   * To enable AgentCalledEvents you have to set
22   * <code>eventwhencalled = yes</code> in <code>queues.conf</code>.<br>
23   * This event is implemented in <code>apps/app_queue.c</code>
24   * 
25   * @author srt
26   * @version $Id: AgentCalledEvent.java,v 1.3 2005/08/27 03:22:32 srt Exp $
27   */
28  public class AgentCalledEvent extends ManagerEvent
29  {
30      /***
31       * Serializable version identifier
32       */
33      private static final long serialVersionUID = -8736410893935374606L;
34      private String agentCalled;
35      private String channelCalling;
36      private String callerId;
37      private String callerIdName;
38      private String context;
39      private String extension;
40      private String priority;
41  
42      /***
43       * @param source
44       */
45      public AgentCalledEvent(Object source)
46      {
47          super(source);
48      }
49  
50      public String getAgentCalled()
51      {
52          return agentCalled;
53      }
54  
55      public void setAgentCalled(String agentCalled)
56      {
57          this.agentCalled = agentCalled;
58      }
59  
60      public String getChannelCalling()
61      {
62          return channelCalling;
63      }
64  
65      public void setChannelCalling(String channelCalling)
66      {
67          this.channelCalling = channelCalling;
68      }
69  
70      public String getCallerId()
71      {
72          return callerId;
73      }
74  
75      public void setCallerId(String callerId)
76      {
77          this.callerId = callerId;
78      }
79  
80      /***
81       * Returns the Caller*ID name of the calling channel.
82       * 
83       * @return the Caller*ID name of the calling channel or "unknown" if no
84       *         Caller*Id has been set.
85       * @since 0.2
86       */
87      public String getCallerIdName()
88      {
89          return callerIdName;
90      }
91  
92      /***
93       * Sets the Caller*ID name of the calling channel.
94       * 
95       * @param callerIdName the Caller*ID name of the calling channel.
96       * @since 0.2
97       */
98      public void setCallerIdName(String callerIdName)
99      {
100         this.callerIdName = callerIdName;
101     }
102 
103     public String getContext()
104     {
105         return context;
106     }
107 
108     public void setContext(String context)
109     {
110         this.context = context;
111     }
112 
113     public String getExtension()
114     {
115         return extension;
116     }
117 
118     public void setExtension(String extension)
119     {
120         this.extension = extension;
121     }
122 
123     public String getPriority()
124     {
125         return priority;
126     }
127 
128     public void setPriority(String priority)
129     {
130         this.priority = priority;
131     }
132 }