public class AbsoluteTimeoutAction extends AbstractManagerAction
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
Constructor and Description |
---|
AbsoluteTimeoutAction()
Creates a new empty AbsoluteTimeoutAction.
|
AbsoluteTimeoutAction(String channel,
Integer timeout)
Creates a new AbsoluteTimeoutAction with the given channel and timeout.
|
Modifier and Type | Method and Description |
---|---|
String |
getAction()
Returns the name of this action, i.e.
|
String |
getChannel()
Returns the name of the channel.
|
Integer |
getTimeout()
Returns the the maximum duation of the call (in seconds) to set.
|
void |
setChannel(String channel)
Sets the name of the channel.
|
void |
setTimeout(Integer timeout)
Sets the the maximum duation of the call (in seconds) to set on channel.
|
getActionId, setActionId, toString
public AbsoluteTimeoutAction()
public AbsoluteTimeoutAction(String channel, Integer timeout)
channel
- the name of the channeltimeout
- the maximum duation of the call in seconds or 0 to cancel the AbsoluteTimeoutpublic String getAction()
getAction
in interface ManagerAction
getAction
in class AbstractManagerAction
public String getChannel()
public void setChannel(String channel)
public Integer getTimeout()
public void setTimeout(Integer timeout)
Setting the timeout to 0 cancels the timeout.
Copyright © 2004–2016. All rights reserved.