public class ChannelProxy extends Object implements Channel, ChannelHangupListener
| Constructor and Description |
|---|
ChannelProxy(ChannelImpl channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHangupListener(ChannelHangupListener listener)
Adds a listener to the channel.
|
boolean |
canDetectHangup() |
void |
channelHangup(Channel channel,
Integer cause,
String causeText) |
boolean |
equals(Object obj) |
CallerID |
getCallerID()
Returns the current callerid for this channel.
|
Channel |
getChannel()
returns the current 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 a PBX specific version of the Channel name.
|
int |
getIdentity() |
ChannelImpl |
getRealChannel() |
String |
getUniqueId() |
boolean |
hasCallerID() |
int |
hashCode() |
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() |
boolean |
isSame(Channel rhs)
Compares if two channels are the same logical channel on the pbx.
|
boolean |
isSame(String extendedChannelName,
String uniqueID) |
boolean |
isZombie()
Returns true if the channel has been marked as in a zombie state.
|
void |
masquerade(ChannelProxy cloneProxy)
Used to handle a MasqueradeEvent.
|
void |
notifyHangupListeners(Integer cause,
String causeText) |
void |
removeListener(ChannelHangupListener listener) |
void |
rename(String newName,
String uniqueId)
Called to rename a channel
|
boolean |
sameEndPoint(Channel rhs) |
boolean |
sameEndPoint(EndPoint extensionRoaming) |
boolean |
sameExtenededChannelName(String channelName)
Compares if this channel is the same as the named channel.
|
boolean |
sameUniqueID(String uniqueID) |
void |
setCallerId(CallerID callerId) |
void |
setCurrentActivityAction(AgiChannelActivityAction action) |
void |
setIsInAgi(boolean b) |
void |
setMute(boolean muteState)
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 ChannelProxy(ChannelImpl channel)
public Channel getChannel()
public boolean isSame(Channel rhs)
Channelpublic boolean sameUniqueID(String uniqueID)
public boolean sameEndPoint(Channel rhs)
sameEndPoint in interface Channelpublic boolean sameEndPoint(EndPoint extensionRoaming)
sameEndPoint in interface Channelpublic boolean sameExtenededChannelName(String channelName)
ChannelsameExtenededChannelName in interface Channelpublic void setParked(boolean parked)
Channelpublic void setMute(boolean muteState)
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 boolean isConnectedTo(EndPoint endPoint)
ChannelisConnectedTo in interface Channelpublic String getChannelName()
ChannelgetChannelName in interface Channelpublic EndPoint getEndPoint()
getEndPoint in interface Channelpublic boolean isMute()
Channelpublic boolean isLocal()
Channelpublic boolean isZombie()
Channelpublic boolean isConsole()
public CallerID getCallerID()
ChannelgetCallerID in interface Channelpublic void rename(String newName, String uniqueId) throws InvalidChannelName
Channelrename in interface ChannelInvalidChannelNamepublic boolean isParked()
public void masquerade(ChannelProxy cloneProxy) throws InvalidChannelName
cloneProxy - InvalidChannelNamepublic ChannelImpl getRealChannel()
public String getExtendedChannelName()
ChannelgetExtendedChannelName in interface Channelpublic void notifyHangupListeners(Integer cause, String causeText)
notifyHangupListeners in interface Channelpublic void channelHangup(Channel channel, Integer cause, String causeText)
channelHangup in interface ChannelHangupListenerpublic boolean canDetectHangup()
canDetectHangup in interface Channelpublic boolean isQuiescent()
isQuiescent in interface Channelpublic boolean hasCallerID()
hasCallerID 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 ChannelInterruptedExceptionpublic String getUniqueId()
getUniqueId in interface Channelpublic int getIdentity()
public void setCallerId(CallerID callerId)
setCallerId in interface ChannelCopyright © 2004–2020. All rights reserved.