Asterisk-Java

org.asteriskjava.manager.action
Class AbsoluteTimeoutAction

java.lang.Object
  extended by org.asteriskjava.manager.action.AbstractManagerAction
      extended by org.asteriskjava.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, it hangs up the channel after a certain time.

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.

Implemented in manager.c

Version:
$Id: AbsoluteTimeoutAction.java 938 2007-12-31 03:23:38Z srt $
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 the maximum duation of the call (in seconds) to set.
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setTimeout(java.lang.Integer timeout)
          Sets the the maximum duation of the call (in seconds) to set on channel.
 
Methods inherited from class org.asteriskjava.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 maximum duation of the call 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 the maximum duation of the call (in seconds) to set.


setTimeout

public void setTimeout(java.lang.Integer timeout)
Sets the the maximum duation of the call (in seconds) to set on channel.

Setting the timeout to 0 cancels the timeout.


Asterisk-Java

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