Asterisk-Java

org.asteriskjava.manager.event
Class HoldEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.asteriskjava.manager.event.ManagerEvent
          extended by org.asteriskjava.manager.event.HoldEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UnholdEvent

public class HoldEvent
extends ManagerEvent

A HoldEvent is triggered when a channel is put on hold (or no longer on hold).

It is implemented in channels/chan_sip.c.

Available since Asterisk 1.2 for SIP channels, as of Asterisk 1.6 this event is also supported for IAX2 channels.

To receive HoldEvents for SIP channels you must set callevents = yes in sip.conf.

Since:
0.2
Version:
$Id: HoldEvent.java 1228 2009-01-20 14:54:31Z srt $
Author:
srt
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
HoldEvent(java.lang.Object source)
          Creates a new HoldEvent.
 
Method Summary
 java.lang.String getChannel()
          Returns the name of the channel.
 java.lang.Boolean getStatus()
          Returns whether this is a hold or unhold event.
 java.lang.String getUniqueId()
          Returns the unique id of the channel.
 boolean isHold()
          Returns whether this is a hold event.
 boolean isUnhold()
          Returns whether this is an unhold event.
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setStatus(java.lang.Boolean status)
          Returns whether this is a hold or unhold event.
 void setUniqueId(java.lang.String uniqueId)
          Sets the unique id of the channel.
 
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

HoldEvent

public HoldEvent(java.lang.Object source)
Creates a new HoldEvent.

Parameters:
source -
Method Detail

getChannel

public java.lang.String getChannel()
Returns the name of the channel.

Returns:
channel the name of the channel.

setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel.

Parameters:
channel - the name of the channel.

getUniqueId

public java.lang.String getUniqueId()
Returns the unique id of the channel.

Returns:
the unique id of the channel.

setUniqueId

public void setUniqueId(java.lang.String uniqueId)
Sets the unique id of the channel.

Parameters:
uniqueId - the unique id of the channel.

getStatus

public java.lang.Boolean getStatus()
Returns whether this is a hold or unhold event.

Returns:
true if this a hold event, false if it's an unhold event.
Since:
1.0.0

setStatus

public void setStatus(java.lang.Boolean status)
Returns whether this is a hold or unhold event.

Parameters:
status - true if this a hold event, false if it's an unhold event.
Since:
1.0.0

isHold

public boolean isHold()
Returns whether this is a hold event.

Returns:
true if this a hold event, false if it's an unhold event.
Since:
1.0.0

isUnhold

public boolean isUnhold()
Returns whether this is an unhold event.

Returns:
true if this an unhold event, false if it's a hold event.
Since:
1.0.0

Asterisk-Java

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