net.sf.asterisk.manager.action
Class AbsoluteTimeoutAction

java.lang.Object
  extended by net.sf.asterisk.manager.action.AbstractManagerAction
      extended by net.sf.asterisk.manager.action.AbsoluteTimeoutAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class AbsoluteTimeoutAction
extends AbstractManagerAction

The AbsoluteTimeoutAction sets the absolute maximum amount of time permitted for a call on a given channel.
Note that the timeout is set from the current time forward, not counting the number of seconds the call has already been up.
When setting a new timeout all previous absolute timeouts are cancelled.
When the timeout is reached the call is returned to the T extension so that you can playback an explanatory note to the calling party (the called party will not hear that).
This action corresponds the the AbsoluteTimeout command used in the dialplan.

Version:
$Id: AbsoluteTimeoutAction.java,v 1.4 2005/08/07 00:09:42 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
AbsoluteTimeoutAction()
          Creates a new empty AbsoluteTimeoutAction.
AbsoluteTimeoutAction(java.lang.String channel, java.lang.Integer timeout)
          Creates a new AbsoluteTimeoutAction with the given channel and timeout.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getChannel()
          Returns the name of the channel.
 java.lang.Integer getTimeout()
          Returns the timeout (in seconds) to set.
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setTimeout(java.lang.Integer timeout)
          Sets the timeout (in seconds) to set on channel.
Setting the timeout to 0 cancels the timeout.
 
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsoluteTimeoutAction

public AbsoluteTimeoutAction()
Creates a new empty AbsoluteTimeoutAction.


AbsoluteTimeoutAction

public AbsoluteTimeoutAction(java.lang.String channel,
                             java.lang.Integer timeout)
Creates a new AbsoluteTimeoutAction with the given channel and timeout.

Parameters:
channel - the name of the channel
timeout - the timeout in seconds or 0 to cancel the AbsoluteTimeout
Since:
0.2
Method Detail

getAction

public java.lang.String getAction()
Returns the name of this action, i.e. "AbsoluteTimeout".

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction

getChannel

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


setChannel

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


getTimeout

public java.lang.Integer getTimeout()
Returns the timeout (in seconds) to set.


setTimeout

public void setTimeout(java.lang.Integer timeout)
Sets the timeout (in seconds) to set on channel.
Setting the timeout to 0 cancels the timeout.



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