|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cnrg.itx.gtwy.ChannelControl
This is the building block interface between a class and a Gateway channel hardware control. NOTE: This accesses the native C code
Constructor Summary | |
ChannelControl()
|
Method Summary | |
protected void |
channelOffHook(int chDev)
Sets the channel off hook to allow for passing voice data through. |
protected void |
channelOnHook(int chDev)
Sets the channel on hook. |
protected int |
channelSetUp(int channelNum,
int xferFactor)
Used for channel initialization. |
protected boolean |
dialPhone(java.lang.String digits,
int chDev)
Dials a phone. |
protected void |
endPlayConnection(int lineNumber)
Stops audio playout from computer to phone |
protected void |
endRecordConnection(int lineNumber)
Terminates the data flow from phone to computer. |
protected java.lang.String |
getExtension(int chDev,
boolean isSecondTime)
This is where the channel gets the phone's requested extension number. |
protected void |
initialize(int numLines,
int bufferSize,
int dataSize,
int pXferFactor)
Initializes parameters in the .cpp file. |
protected void |
playDTMF(java.lang.String digits,
int chDev)
Plays DTMF tones to the telephone connected to the line. |
protected void |
playPacket(int chDev,
int lineNumber)
Plays voice data from a buffer to a phone. |
protected java.lang.String |
recordPacket(RecordSource dataChannel,
int chDev,
int lineNumber)
Sends voice data from phone to computer. |
protected void |
rejectCallMessage(int chDev)
Plays out a message to a phone when a call has been rejected. |
protected void |
reroute(int chDev,
int secDev)
Reroutes the second channel's playout to the primary channel's playout. |
protected void |
resetPlaySequence(int lineNumber,
boolean isStartCall)
Resets handlers for a playout on a phone. |
protected void |
resetRecordSequence(int lineNumber,
boolean isStartCall)
Resets handlers for sending data from phone to computer. |
protected void |
shutDown(int[] chDevArray)
Closes all Gateway channels and cleans up memory. |
protected void |
unroute(int chDev)
"Releases" the second channel from playing out on the primary channel. |
protected void |
waitForCall(int chDev)
Sets up the channel to wait for a phone to dial in. |
protected void |
writeToPlay(int lineNumber,
byte[] data)
Writes voice data from computer to buffers in native code. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ChannelControl()
Method Detail |
protected void initialize(int numLines, int bufferSize, int dataSize, int pXferFactor)
numLines
- the number of lines in the gateway.bufferSize
- the packet transfer rate between the gateway and phone.dataSize
- the packet transfer rate of data exchange.pXferFactor
- factor bufferSize is multiplied by to define size of packets played to phone.Gateway#Gateway(boolean)
protected void shutDown(int[] chDevArray)
chDevArray
- array of all channel device handlers.protected int channelSetUp(int channelNum, int xferFactor)
channelNum
- the channel's designated number.xferFactor
- to be multiplied with the packet transfer rate. Meant to increase transfer
rate if desired.Gateway#Gateway(boolean)
protected void reroute(int chDev, int secDev)
chDev
- the primary channel's device handler.secDev
- the second channel's device handler. This channel is responsible for playout.Gateway.setUpConnection(Line, Connection)
protected void unroute(int chDev)
chDev
- the primary channel's device handler.protected void channelOnHook(int chDev)
chDev
- the channel's device handler.protected void channelOffHook(int chDev)
chDev
- the channel's device handler.Gateway.setUpConnection(Line, Connection)
protected void waitForCall(int chDev)
chDev
- the channel's device handler.ListenChannel.run()
protected java.lang.String getExtension(int chDev, boolean isSecondTime)
chDev
- the channel's device handler.isSecondTime
- true if this is not the first call to getExtension during session.ListenChannel.run()
protected void rejectCallMessage(int chDev)
chDev
- the channel's device handler.ListenChannel.run()
protected boolean dialPhone(java.lang.String digits, int chDev)
digits
- the phone number being dialed.chDev
- the channel's device handler.Gateway.dialPhone(String, Line)
protected void playDTMF(java.lang.String digits, int chDev)
digits
- the DTMF digits being played.chDev
- the channel's device handler.Gateway.playDTMF(String, Line, Connection)
protected java.lang.String recordPacket(RecordSource dataChannel, int chDev, int lineNumber)
dataChannel
- the object whose methods are used to send data to a PC.chDev
- the channel's device handler.lineNumber
- the channel's corresponding line number.RecordChannel.run()
protected void playPacket(int chDev, int lineNumber)
chDev
- the channel's device handler.lineNumber
- the channel's corresponding line number.PlayChannel.run()
protected void writeToPlay(int lineNumber, byte[] data)
playPacket
plays out the
data in the buffers.lineNumber
- the line's designated number.data
- the data being sent.playPacket(int, int)
,
PlayDestination.write(byte[])
protected void resetRecordSequence(int lineNumber, boolean isStartCall)
lineNumber
- the channel's corresponding line number.isStartCall
- true if this is the beginning of a connection session; false otherwise.protected void resetPlaySequence(int lineNumber, boolean isStartCall)
lineNumber
- the channel's corresponding line number.isStartCall
- true if this is the beginning of a connection session; false otherwise.protected void endRecordConnection(int lineNumber)
lineNumber
- the channel's corresponding line number.protected void endPlayConnection(int lineNumber)
lineNumber
- the channel's corresponding line number.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |