|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.asteriskjava.manager.action.AbstractManagerAction
org.asteriskjava.manager.action.RedirectAction
public class RedirectAction
Redirects a given channel (and an optional additional channel) to a new extension.
The additional channel is usually used when redirecting two bridged channel for example to a MeetMe room.
Note that BRIstuffed versions of Asterisk behave slightly different: While the standard version only allows redirecting the two channels to the same context, extension, priority the BRIstuffed version uses context, extension, priority only for the first channel and extraContext, extraExtension, extraPriority for the second channel. The standard version ignores the extraContext, extraExtension, extraPriority properties.
Constructor Summary | |
---|---|
RedirectAction()
Creates a new empty RedirectAction. |
|
RedirectAction(java.lang.String channel,
java.lang.String context,
java.lang.String exten,
java.lang.Integer priority)
Creates a new RedirectAction that redirects the given channel to the given context, extension, priority triple. |
|
RedirectAction(java.lang.String channel,
java.lang.String extraChannel,
java.lang.String context,
java.lang.String exten,
java.lang.Integer priority)
Creates a new RedirectAction that redirects the given channels to the given context, extension, priority triple. |
|
RedirectAction(java.lang.String channel,
java.lang.String extraChannel,
java.lang.String context,
java.lang.String exten,
java.lang.Integer priority,
java.lang.String extraContext,
java.lang.String extraExten,
java.lang.Integer extraPriority)
Creates a new RedirectAction that redirects the given channels to the given context, extension, priority triples. |
Method Summary | |
---|---|
java.lang.String |
getAction()
Returns the name of this action, i.e. |
java.lang.String |
getChannel()
Returns name of the channel to redirect. |
java.lang.String |
getContext()
Returns the destination context. |
java.lang.String |
getExten()
Returns the destination extension. |
java.lang.String |
getExtraChannel()
Returns the name of the additional channel to redirect. |
java.lang.String |
getExtraContext()
Returns the destination context for the additional channel. |
java.lang.String |
getExtraExten()
Sets the destination extension for the additional channel. |
java.lang.Integer |
getExtraPriority()
Returns the destination priority for the additional channel. |
java.lang.Integer |
getPriority()
Returns the destination priority. |
void |
setChannel(java.lang.String channel)
Sets the name of the channel to redirect. |
void |
setContext(java.lang.String context)
Sets the destination context. |
void |
setExten(java.lang.String exten)
Sets the destination extension. |
void |
setExtraChannel(java.lang.String extraChannel)
Sets the name of the additional channel to redirect. |
void |
setExtraContext(java.lang.String extraContext)
Sets the destination context for the additional channel. |
void |
setExtraExten(java.lang.String extraExten)
Sets the destination extension for the additional channel. |
void |
setExtraPriority(java.lang.Integer extraPriority)
Sets the destination priority for the additional channel. |
void |
setPriority(java.lang.Integer priority)
Sets the destination priority. |
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 |
---|
public RedirectAction()
public RedirectAction(java.lang.String channel, java.lang.String context, java.lang.String exten, java.lang.Integer priority)
channel
- the name of the channel to redirectcontext
- the destination contextexten
- the destination extensionpriority
- the destination prioritypublic RedirectAction(java.lang.String channel, java.lang.String extraChannel, java.lang.String context, java.lang.String exten, java.lang.Integer priority)
This constructor only works standard versions of Asterisk, i.e. non-BRIstuffed versions. When used with a BRIstuffed version (and not setting extraContext, extraExten and extraPriority) the second channel is just hung up.
channel
- the name of the first channel to redirectextraChannel
- the name of the second channel to redirectcontext
- the destination contextexten
- the destination extensionpriority
- the destination prioritypublic RedirectAction(java.lang.String channel, java.lang.String extraChannel, java.lang.String context, java.lang.String exten, java.lang.Integer priority, java.lang.String extraContext, java.lang.String extraExten, java.lang.Integer extraPriority)
This constructor works for BRIstuffed versions of Asterisk, if used with a standard version the extraContext, extraExten and extraPriroity attributes are ignored.
channel
- the name of the first channel to redirectextraChannel
- the name of the second channel to redirectcontext
- the destination context for the first channelexten
- the destination extension for the first channelpriority
- the destination priority for the first channelextraContext
- the destination context for the second channelextraExten
- the destination extension for the second channelextraPriority
- the destination priority for the second channelMethod Detail |
---|
public java.lang.String getAction()
getAction
in interface ManagerAction
getAction
in class AbstractManagerAction
public java.lang.String getChannel()
public void setChannel(java.lang.String channel)
channel
- the name of the channel to redirectpublic java.lang.String getExtraChannel()
public void setExtraChannel(java.lang.String extraChannel)
extraChannel
- the name of the additional channel to redirectpublic java.lang.String getContext()
public void setContext(java.lang.String context)
context
- the destination contextpublic java.lang.String getExten()
public void setExten(java.lang.String exten)
exten
- the destination extensionpublic java.lang.Integer getPriority()
public void setPriority(java.lang.Integer priority)
priority
- the destination prioritypublic java.lang.String getExtraContext()
This property is only used by BRIstuffed Asterisk servers.
public void setExtraContext(java.lang.String extraContext)
This property is only used by BRIstuffed Asterisk servers.
extraContext
- the destination context for the additional channel.public java.lang.String getExtraExten()
This property is only used by BRIstuffed Asterisk servers.
public void setExtraExten(java.lang.String extraExten)
This property is only used by BRIstuffed Asterisk servers.
extraExten
- the destination extension for the additional channel.public java.lang.Integer getExtraPriority()
This property is only used by BRIstuffed Asterisk servers.
public void setExtraPriority(java.lang.Integer extraPriority)
This property is only used by BRIstuffed Asterisk servers.
extraPriority
- the destination priority for the additional channel.
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |