public class ChannelImpl extends Object implements Channel
| Modifier and Type | Field and Description |
|---|---|
static String[] |
_actions |
static String |
MASQ |
static String |
UNKNOWN_UNIQUE_ID |
static String |
ZOMBIE |
| Modifier and Type | Method and Description |
|---|---|
void |
addHangupListener(ChannelHangupListener listener)
Adds a listener to the channel.
|
boolean |
canDetectHangup() |
CallerID |
getCallerID()
Returns the current callerid for this channel.
|
long |
getChannelId()
Each channel is assigned a unique PBX independent id to help track the
channels when logging.
|
String |
getChannelName()
returns a fully qualifed channel name which includes the tech.
|
AgiChannelActivityAction |
getCurrentActivityAction() |
EndPoint |
getEndPoint() |
String |
getExtendedChannelName()
Returns the full channel name including the masquerade prefix and the
zombie suffix.
|
String |
getUniqueId() |
boolean |
hasCallerID() |
boolean |
isConnectedTo(EndPoint endPoint)
Returns true if the given endpont is currently connected to this channel.
|
boolean |
isConsole() |
boolean |
isInAgi() |
boolean |
isLive()
Returns true if the channel is alive.
|
boolean |
isLocal()
In Asterisk speak, this method returns true if it is a LOCAL/ channel Not
quite certain how this will map to other pbx's
|
boolean |
isMute()
Checks if this channel is currently mute.
|
boolean |
isParked() |
boolean |
isQuiescent()
Returns true if the channel is quiescent.
|
boolean |
isSame(Channel _rhs)
*************************************************************************
************************** The remaining methods are bridging methods to
the new abstract PBX classes.
|
boolean |
isSame(String extendedChannelName,
String uniqueID) |
boolean |
isZombie()
Returns true if the channel has been marked as in a zombie state.
|
void |
masquerade(Channel channel)
designed for use by the ChannelProxy when a channel is being cloned as a
result of Asterisk undertaking an Masquerade.
|
void |
notifyHangupListeners(Integer cause,
String causeText)
Called by Peer when we have been hungup.
|
void |
removeListener(ChannelHangupListener listener) |
void |
rename(String newName,
String uniqueId)
Called to rename a channel
|
boolean |
sameEndPoint(Channel rhs) |
boolean |
sameEndPoint(EndPoint rhs) |
boolean |
sameExtenededChannelName(String extendedChannelName)
Compares if this channel is the same as the named channel.
|
boolean |
sameUniqueID(String uniqueID)
Try to match a channel based solely on its unique ID
|
void |
setCallerId(CallerID callerId) |
void |
setCurrentActivityAction(AgiChannelActivityAction action) |
void |
setIsInAgi(boolean b) |
void |
setMute(boolean mutedState)
This method does not actually change the state of the channel, rather it
is intended to be used to record the fact that the state has changed.
|
void |
setParked(boolean parked)
This method does not actually change the state of the channel, rather it
is intended to be used to record the fact that the state has changed.
|
String |
toString() |
boolean |
waitForChannelToReachAgi(long timeout,
TimeUnit timeunit) |
public static final String ZOMBIE
public static final String MASQ
public static final String UNKNOWN_UNIQUE_ID
public static final String[] _actions
public void masquerade(Channel channel)
public void rename(String newName, String uniqueId) throws InvalidChannelName
Channelrename in interface ChannelInvalidChannelNamepublic String getChannelName()
ChannelgetChannelName in interface Channelpublic EndPoint getEndPoint()
getEndPoint in interface Channelpublic void setCallerId(CallerID callerId)
setCallerId in interface Channelpublic boolean isSame(Channel _rhs)
public boolean sameExtenededChannelName(String extendedChannelName)
ChannelsameExtenededChannelName in interface Channelpublic boolean sameUniqueID(String uniqueID)
uniqueID - public boolean sameEndPoint(Channel rhs)
sameEndPoint in interface Channelpublic boolean sameEndPoint(EndPoint rhs)
sameEndPoint in interface Channelpublic long getChannelId()
ChannelgetChannelId in interface Channelpublic boolean isLive()
Channelpublic void addHangupListener(ChannelHangupListener listener)
ChanneladdHangupListener in interface Channelpublic void removeListener(ChannelHangupListener listener)
removeListener in interface Channelpublic void notifyHangupListeners(Integer cause, String causeText)
notifyHangupListeners in interface Channelpublic boolean isConnectedTo(EndPoint endPoint)
ChannelisConnectedTo in interface Channelpublic boolean isMute()
Channelpublic void setMute(boolean mutedState)
Channelpublic void setParked(boolean parked)
Channelpublic boolean isParked()
public String getExtendedChannelName()
getExtendedChannelName in interface Channelpublic boolean isLocal()
Channelpublic boolean isZombie()
Channelpublic boolean isConsole()
public boolean hasCallerID()
hasCallerID in interface Channelpublic CallerID getCallerID()
ChannelgetCallerID in interface Channelpublic String getUniqueId()
getUniqueId in interface Channelpublic boolean canDetectHangup()
canDetectHangup in interface Channelpublic boolean isQuiescent()
isQuiescent in interface Channelpublic AgiChannelActivityAction getCurrentActivityAction()
getCurrentActivityAction in interface Channelpublic void setCurrentActivityAction(AgiChannelActivityAction action)
setCurrentActivityAction in interface Channelpublic void setIsInAgi(boolean b)
setIsInAgi in interface Channelpublic boolean waitForChannelToReachAgi(long timeout,
TimeUnit timeunit)
throws InterruptedException
waitForChannelToReachAgi in interface ChannelInterruptedExceptionCopyright © 2004–2021. All rights reserved.