Asterisk-Java

org.asteriskjava.manager.action
Class BridgeAction

java.lang.Object
  extended by org.asteriskjava.manager.action.AbstractManagerAction
      extended by org.asteriskjava.manager.action.BridgeAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class BridgeAction
extends AbstractManagerAction

The BridgeAction bridges two channels that are currently active on the system.

It is definied in res/res_features.c.

Available since Asterisk 1.6

Since:
1.0.0
Version:
$Id: BridgeAction.java 938 2007-12-31 03:23:38Z srt $
Author:
srt
See Also:
Serialized Form

Constructor Summary
BridgeAction()
          Creates a new empty BridgeAction.
BridgeAction(java.lang.String channel1, java.lang.String channel2)
          Creates a new BridgeAction that bridges the two given channels.
BridgeAction(java.lang.String channel1, java.lang.String channel2, java.lang.Boolean tone)
          Creates a new BridgeAction that bridges the two given channels.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getChannel1()
          Returns the name of the channel to bridge to channel2.
 java.lang.String getChannel2()
          Returns the name of the channel to bridge to channel1.
 java.lang.Boolean getTone()
          Returns whether a courtesy tone will be played to channel2.
 void setChannel1(java.lang.String channel1)
          Sets the name of the channel to bridge to channel2.
 void setChannel2(java.lang.String channel2)
          Sets the name of the channel to bridge to channel1.
 void setTone(java.lang.Boolean tone)
          Sets whether a courtesy tone will be played to channel2.
 
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

BridgeAction

public BridgeAction()
Creates a new empty BridgeAction.


BridgeAction

public BridgeAction(java.lang.String channel1,
                    java.lang.String channel2)
Creates a new BridgeAction that bridges the two given channels.

Parameters:
channel1 - the name of the channel to bridge to channel2.
channel2 - the name of the channel to bridge to channel1.

BridgeAction

public BridgeAction(java.lang.String channel1,
                    java.lang.String channel2,
                    java.lang.Boolean tone)
Creates a new BridgeAction that bridges the two given channels.

Parameters:
channel1 - the name of the channel to bridge to channel2.
channel2 - the name of the channel to bridge to channel1.
tone - true to play a courtesy tone to channel2, false otherwise.
Method Detail

getAction

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

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

getChannel1

public java.lang.String getChannel1()
Returns the name of the channel to bridge to channel2.

Returns:
the name of the channel to bridge to channel2.

setChannel1

public void setChannel1(java.lang.String channel1)
Sets the name of the channel to bridge to channel2.

Parameters:
channel1 - the name of the channel to bridge to channel2.

getChannel2

public java.lang.String getChannel2()
Returns the name of the channel to bridge to channel1.

Returns:
the name of the channel to bridge to channel1.

setChannel2

public void setChannel2(java.lang.String channel2)
Sets the name of the channel to bridge to channel1.

Parameters:
channel2 - the name of the channel to bridge to channel1.

getTone

public java.lang.Boolean getTone()
Returns whether a courtesy tone will be played to channel2.

Returns:
true to play a courtesy tone to channel2, false or null (if not set) otherwise.

setTone

public void setTone(java.lang.Boolean tone)
Sets whether a courtesy tone will be played to channel2.

Parameters:
tone - true to play a courtesy tone to channel2, false otherwise.

Asterisk-Java

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