public class BridgeEvent extends ManagerEvent
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()
.
It is implemented in channel.c
Modifier and Type | Field and Description |
---|---|
static String |
BRIDGE_STATE_LINK |
static String |
BRIDGE_STATE_UNLINK |
static String |
BRIDGE_TYPE_CORE
A
channel.c bridge. |
static String |
BRIDGE_TYPE_RTP_DIRECT
An RTP peer-2-peer bridge (NAT support only).
|
static String |
BRIDGE_TYPE_RTP_NATIVE
An RTP native bridge.
|
static String |
BRIDGE_TYPE_RTP_REMOTE
A remote (re-invite) bridge.
|
callerIdName, callerIdNum, channelState, channelStateDesc, connectedLineName, connectedLineNum, context, exten, priority
source
Constructor and Description |
---|
BridgeEvent(Object source) |
Modifier and Type | Method and Description |
---|---|
String |
getBridgeState()
Returns the bridge state.
|
String |
getBridgeType()
Returns the bridge type.
|
String |
getCallerId1()
Returns the Caller*Id number of the first channel.
|
String |
getCallerId2()
Returns the Caller*Id number of the second channel.
|
String |
getChannel1()
Returns the name of the first channel.
|
String |
getChannel2()
Returns the name of the second channel.
|
String |
getUniqueId1()
Returns the unique id of the first channel.
|
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(String bridgeState)
Sets the bridge state.
|
void |
setBridgeType(String bridgeType)
Sets the bridge type.
|
void |
setCallerId1(String callerId1)
Sets the Caller*Id number of the first channel.
|
void |
setCallerId2(String callerId2)
Sets the Caller*Id number of the second channel.
|
void |
setChannel1(String channel1)
Sets the name of the first channel.
|
void |
setChannel2(String channel2)
Sets the name of the second channel.
|
void |
setUniqueId1(String uniqueId1)
Sets the unique id of the first channel.
|
void |
setUniqueId2(String uniqueId2)
Sets the unique id of the second channel.
|
appendPropertyIfNotNull, getCallerIdName, getCallerIdNum, getChannelState, getChannelStateDesc, getConnectedLineName, getConnectedLineNum, getContext, getDateReceived, getExten, getFile, getFunc, getLine, getPriority, getPrivilege, getSequenceNumber, getServer, getSystemName, getTimestamp, setCallerIdName, setCallerIdNum, setChannelState, setChannelStateDesc, setConnectedLineName, setConnectedLineNum, setContext, setDateReceived, setExten, setFile, setFunc, setLine, setPriority, setPrivilege, setSequenceNumber, setServer, setSystemName, setTimestamp, toString
getSource
public static final String BRIDGE_STATE_LINK
public static final String BRIDGE_STATE_UNLINK
public static final String BRIDGE_TYPE_CORE
channel.c
bridge.public static final String BRIDGE_TYPE_RTP_NATIVE
public static final String BRIDGE_TYPE_RTP_DIRECT
public static final String BRIDGE_TYPE_RTP_REMOTE
public BridgeEvent(Object source)
public String getBridgeState()
BRIDGE_STATE_LINK
,
BRIDGE_STATE_UNLINK
public void setBridgeState(String bridgeState)
bridgeState
- "Link" if the two channels have been linked, "Unlink" if they have been unlinked.public 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(String bridgeType)
bridgeType
- the bridge type.public String getUniqueId1()
public void setUniqueId1(String uniqueId1)
uniqueId1
- the unique id of the first channel.public String getUniqueId2()
public void setUniqueId2(String uniqueId2)
uniqueId2
- the unique id of the second channel.public String getChannel1()
public void setChannel1(String channel1)
channel1
- the name of the first channel.public String getChannel2()
public void setChannel2(String channel2)
channel2
- the name of the second channel.public String getCallerId1()
public void setCallerId1(String callerId1)
callerId1
- the Caller*Id number of the first channel.public String getCallerId2()
public void setCallerId2(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.Copyright © 2004–2017. All rights reserved.