public class HangupAction extends AbstractManagerAction
Hangup with a cause code is only supported by Asterisk versions later than 1.6.2.
Constructor and Description |
---|
HangupAction()
Creates a new empty HangupAction.
|
HangupAction(String channel)
Creates a new HangupAction that hangs up the given channel.
|
HangupAction(String channel,
int cause)
Creates a new HangupAction that hangs up the given channel with the given cause code.
|
Modifier and Type | Method and Description |
---|---|
String |
getAction()
Returns the name of this action, i.e.
|
Integer |
getCause()
Returns the hangup cause.
|
String |
getChannel()
Returns the name of the channel to hangup.
|
void |
setCause(Integer cause)
Sets the hangup cause.
|
void |
setChannel(String channel)
Sets the name of the channel to hangup.
|
getActionId, setActionId, toString
public HangupAction()
public HangupAction(String channel)
channel
- the name of the channel to hangup.public HangupAction(String channel, int cause)
channel
- the name of the channel to hangup.cause
- the cause code. The cause code must be >= 0 and <= 127.public String getAction()
getAction
in interface ManagerAction
getAction
in class AbstractManagerAction
public String getChannel()
public void setChannel(String channel)
This property is mandatory.
channel
- the name of the channel to hangup.public Integer getCause()
public void setCause(Integer cause)
This property is optional.
cause
- the hangup cause.Copyright © 2004–2016. All rights reserved.