|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.asteriskjava.manager.event.ManagerEvent
org.asteriskjava.manager.event.BridgeEvent
public class BridgeEvent
A BridgeEvent is triggered when a link between two voice channels is established ("Link") or discontinued ("Unlink").
As of Asterisk 1.6 the Bridge event is reported directly by Asterisk. Asterisk versions up to
1.4 report individual events: LinkEvent
and
UnlinkEvent
.For maximum compatibily do not use the Link and Unlink
events in your code. Just use the Bridge event and check for isLink()
and isUnlink()
.
channel.c
Field Summary | |
---|---|
static java.lang.String |
BRIDGE_STATE_LINK
|
static java.lang.String |
BRIDGE_STATE_UNLINK
|
static java.lang.String |
BRIDGE_TYPE_CORE
A channel.c bridge. |
static java.lang.String |
BRIDGE_TYPE_RTP_DIRECT
An RTP peer-2-peer bridge (NAT support only). |
static java.lang.String |
BRIDGE_TYPE_RTP_NATIVE
An RTP native bridge. |
static java.lang.String |
BRIDGE_TYPE_RTP_REMOTE
A remote (re-invite) bridge. |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
BridgeEvent(java.lang.Object source)
|
Method Summary | |
---|---|
java.lang.String |
getBridgeState()
Returns the bridge state. |
java.lang.String |
getBridgeType()
Returns the bridge type. |
java.lang.String |
getCallerId1()
Returns the Caller*Id number of the first channel. |
java.lang.String |
getCallerId2()
Returns the Caller*Id number of the second channel. |
java.lang.String |
getChannel1()
Returns the name of the first channel. |
java.lang.String |
getChannel2()
Returns the name of the second channel. |
java.lang.String |
getUniqueId1()
Returns the unique id of the first channel. |
java.lang.String |
getUniqueId2()
Returns the unique id of the second channel. |
boolean |
isLink()
Returns whether the two channels have been linked. |
boolean |
isUnlink()
Returns whether the two channels have been unlinked. |
void |
setBridgeState(java.lang.String bridgeState)
Sets the bridge state. |
void |
setBridgeType(java.lang.String bridgeType)
Sets the bridge type. |
void |
setCallerId1(java.lang.String callerId1)
Sets the Caller*Id number of the first channel. |
void |
setCallerId2(java.lang.String callerId2)
Sets the Caller*Id number of the second channel. |
void |
setChannel1(java.lang.String channel1)
Sets the name of the first channel. |
void |
setChannel2(java.lang.String channel2)
Sets the name of the second channel. |
void |
setUniqueId1(java.lang.String uniqueId1)
Sets the unique id of the first channel. |
void |
setUniqueId2(java.lang.String uniqueId2)
Sets the unique id of the second channel. |
Methods inherited from class org.asteriskjava.manager.event.ManagerEvent |
---|
appendPropertyIfNotNull, getDateReceived, getFile, getFunc, getLine, getPrivilege, getSequenceNumber, getServer, getTimestamp, setDateReceived, setFile, setFunc, setLine, setPrivilege, setSequenceNumber, setServer, setTimestamp, toString |
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BRIDGE_STATE_LINK
public static final java.lang.String BRIDGE_STATE_UNLINK
public static final java.lang.String BRIDGE_TYPE_CORE
channel.c
bridge.
public static final java.lang.String BRIDGE_TYPE_RTP_NATIVE
public static final java.lang.String BRIDGE_TYPE_RTP_DIRECT
public static final java.lang.String BRIDGE_TYPE_RTP_REMOTE
Constructor Detail |
---|
public BridgeEvent(java.lang.Object source)
Method Detail |
---|
public java.lang.String getBridgeState()
BRIDGE_STATE_LINK
,
BRIDGE_STATE_UNLINK
public void setBridgeState(java.lang.String bridgeState)
bridgeState
- "Link" if the two channels have been linked, "Unlink" if they have been unlinked.public java.lang.String getBridgeType()
Available since Asterisk 1.6.
BRIDGE_TYPE_CORE
,
BRIDGE_TYPE_RTP_NATIVE
,
BRIDGE_TYPE_RTP_DIRECT
,
BRIDGE_TYPE_RTP_REMOTE
public void setBridgeType(java.lang.String bridgeType)
bridgeType
- the bridge type.public java.lang.String getUniqueId1()
public void setUniqueId1(java.lang.String uniqueId1)
uniqueId1
- the unique id of the first channel.public java.lang.String getUniqueId2()
public void setUniqueId2(java.lang.String uniqueId2)
uniqueId2
- the unique id of the second channel.public java.lang.String getChannel1()
public void setChannel1(java.lang.String channel1)
channel1
- the name of the first channel.public java.lang.String getChannel2()
public void setChannel2(java.lang.String channel2)
channel2
- the name of the second channel.public java.lang.String getCallerId1()
public void setCallerId1(java.lang.String callerId1)
callerId1
- the Caller*Id number of the first channel.public java.lang.String getCallerId2()
public void setCallerId2(java.lang.String callerId2)
callerId2
- the Caller*Id number of the second channel.public boolean isLink()
true
the two channels have been linked, false
if they have been unlinked.public boolean isUnlink()
true
the two channels have been unlinked, false
if they have been linked.
|
Asterisk-Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |