Asterisk-Java

org.asteriskjava.manager.event
Class AgentCalledEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.asteriskjava.manager.event.ManagerEvent
          extended by org.asteriskjava.manager.event.AgentCalledEvent
All Implemented Interfaces:
java.io.Serializable

public class AgentCalledEvent
extends ManagerEvent

An AgentCalledEvent is triggered when an agent is rung.

To enable AgentCalledEvents you have to set eventwhencalled = yes in queues.conf.

This event is implemented in apps/app_queue.c

Version:
$Id: AgentCalledEvent.java 1154 2008-08-24 02:05:26Z srt $
Author:
srt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AgentCalledEvent(java.lang.Object source)
           
 
Method Summary
 java.lang.String getAgentCalled()
          Returns the member interface of the agent that has been called.
 java.lang.String getAgentName()
          Returns the name of the agent that has been called.
 java.lang.String getCallerId()
          Deprecated. as of 1.0.0, use getCallerIdNum() instead.
 java.lang.String getCallerIdName()
          Returns the Caller ID name of the caller's channel.
 java.lang.String getCallerIdNum()
          Returns the Caller ID number of the caller's channel.
 java.lang.String getChannelCalling()
          Returns the name of the caller's channel that is about to be handled by the agent.
 java.lang.String getContext()
           
 java.lang.String getDestinationChannel()
          Returns the name of the channel calling the agent.
 java.lang.String getExtension()
           
 java.lang.String getPriority()
           
 java.lang.String getQueue()
          Returns the name of the queue.
 java.lang.String getUniqueId()
          Returns the unique id of the caller's channel that is about to be handled by the agent.
 java.util.Map<java.lang.String,java.lang.String> getVariables()
          Returns the channel variables if eventwhencalled is set to vars in queues.conf.
 void setAgentCalled(java.lang.String agentCalled)
          Sets the member interface of the agent that has been called.
 void setAgentName(java.lang.String agentName)
           
 void setCallerId(java.lang.String callerId)
          Sets the Caller ID number of the caller's channel.
 void setCallerIdName(java.lang.String callerIdName)
          Sets the Caller ID name of the caller's channel.
 void setCallerIdNum(java.lang.String callerIdNum)
           
 void setChannelCalling(java.lang.String channelCalling)
          Sets the name of the caller's channel.
 void setContext(java.lang.String context)
           
 void setDestinationChannel(java.lang.String destinationChannel)
           
 void setExtension(java.lang.String extension)
           
 void setPriority(java.lang.String priority)
           
 void setQueue(java.lang.String queue)
           
 void setUniqueId(java.lang.String uniqueId)
           
 void setVariables(java.util.Map<java.lang.String,java.lang.String> variables)
          Sets the channel variables.
 
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent
appendPropertyIfNotNull, getDateReceived, getFile, getFunc, getLine, getPrivilege, getSequenceNumber, getServer, getTimestamp, setDateReceived, setFile, setFunc, setLine, setPrivilege, setSequenceNumber, setServer, setTimestamp, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentCalledEvent

public AgentCalledEvent(java.lang.Object source)
Parameters:
source -
Method Detail

getQueue

public java.lang.String getQueue()
Returns the name of the queue.

Available since Asterisk 1.6.

Returns:
the name of the queue.
Since:
1.0.0

setQueue

public void setQueue(java.lang.String queue)

getAgentCalled

public java.lang.String getAgentCalled()
Returns the member interface of the agent that has been called.

Returns:
the member interface of the agent that has been called.
See Also:
QueueMemberEvent.getLocation()

setAgentCalled

public void setAgentCalled(java.lang.String agentCalled)
Sets the member interface of the agent that has been called.

Parameters:
agentCalled - the member interface of the agent that has been called.

getAgentName

public java.lang.String getAgentName()
Returns the name of the agent that has been called.

Available since Asterisk 1.6.

Returns:
the name of the agent that has been called.
Since:
1.0.0

setAgentName

public void setAgentName(java.lang.String agentName)

getChannelCalling

public java.lang.String getChannelCalling()
Returns the name of the caller's channel that is about to be handled by the agent.

Returns:
the name of the caller's channel.

setChannelCalling

public void setChannelCalling(java.lang.String channelCalling)
Sets the name of the caller's channel.

Parameters:
channelCalling - the name of the caller's channel.

getDestinationChannel

public java.lang.String getDestinationChannel()
Returns the name of the channel calling the agent.

Available since Asterisk 1.6

Returns:
the name of the channel calling the agent.
Since:
1.0.0

setDestinationChannel

public void setDestinationChannel(java.lang.String destinationChannel)

getCallerIdNum

public java.lang.String getCallerIdNum()
Returns the Caller ID number of the caller's channel.

Returns:
the Caller ID number of the caller's channel or "unknown" of none has been set.
Since:
1.0.0

setCallerIdNum

public void setCallerIdNum(java.lang.String callerIdNum)

getCallerId

public java.lang.String getCallerId()
Deprecated. as of 1.0.0, use getCallerIdNum() instead.

Returns the Caller ID number of the caller's channel.

Returns:
the Caller ID number of the caller's channel.

setCallerId

public void setCallerId(java.lang.String callerId)
Sets the Caller ID number of the caller's channel.

Parameters:
callerId - the Caller ID number of the caller's channel.

getCallerIdName

public java.lang.String getCallerIdName()
Returns the Caller ID name of the caller's channel.

Returns:
the Caller ID name of the caller's channel or "unknown" if none has been set.
Since:
0.2

setCallerIdName

public void setCallerIdName(java.lang.String callerIdName)
Sets the Caller ID name of the caller's channel.

Parameters:
callerIdName - the Caller ID name of the caller's channel.
Since:
0.2

getContext

public java.lang.String getContext()

setContext

public void setContext(java.lang.String context)

getExtension

public java.lang.String getExtension()

setExtension

public void setExtension(java.lang.String extension)

getPriority

public java.lang.String getPriority()

setPriority

public void setPriority(java.lang.String priority)

getUniqueId

public java.lang.String getUniqueId()
Returns the unique id of the caller's channel that is about to be handled by the agent. This corresponds to getChannelCalling().

Available since Asterisk 1.6

Returns:
the unique id of the caller's channel.
Since:
1.0.0

setUniqueId

public void setUniqueId(java.lang.String uniqueId)

getVariables

public java.util.Map<java.lang.String,java.lang.String> getVariables()
Returns the channel variables if eventwhencalled is set to vars in queues.conf.

Available since Asterisk 1.6

Returns:
the channel variables.
Since:
1.0.0

setVariables

public void setVariables(java.util.Map<java.lang.String,java.lang.String> variables)
Sets the channel variables.

Available since Asterisk 1.6

Parameters:
variables - the channel variables.
Since:
1.0.0

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.