public interface CallControl
Objects that implement this interface are able to support making a third party connection through a communications network, such as the telephone.
| Modifier and Type | Method and Description |
|---|---|
javax.sound.sampled.AudioFormat |
getRecordingAudioFormat()
Retrieves the audio format that should be used for file recording.
|
void |
hangup()
Generate an application driven hangup.
|
boolean |
isCallActive()
Checks if the call is currently active and outputs can be sent and inputs
can be retrieved.
|
void |
play(SystemOutput output,
CallControlProperties props)
Plays a stream from the given output device.
|
void |
record(UserInput input,
CallControlProperties props)
Starts recording to the given input device.
|
void |
startRecording(UserInput input,
java.io.OutputStream stream,
CallControlProperties props)
Starts recording to the given output stream.
|
void |
stopPlay()
Stops a previously started play.
|
void |
stopRecord()
Stops a previously started recording.
|
void |
transfer(java.lang.String dest)
Transfers the current call.
|
void play(SystemOutput output, CallControlProperties props) throws NoresourceError, java.io.IOException
The play method is expected to run asynchronously.
output - the output device delivering the output.props - parameters to use for playing.NoresourceError - Error accessing the terminaljava.io.IOException - Error accessing the given URI.void record(UserInput input, CallControlProperties props) throws NoresourceError, java.io.IOException
input - input device to use for recording.props - parameters to use for the recording.NoresourceError - Error accessing the terminaljava.io.IOException - Error accessing the given URI.javax.sound.sampled.AudioFormat getRecordingAudioFormat()
void startRecording(UserInput input, java.io.OutputStream stream, CallControlProperties props) throws NoresourceError, java.io.IOException
input - input device to use for recording. This can be used e.g. to
recognize the recorded data.stream - the stream where to store the recording.props - parameters to use for the recording.NoresourceError - Error accessing the terminaljava.io.IOException - Error accessing the given URI.void stopRecord()
throws NoresourceError
NoresourceError - Error accessing the terminalvoid stopPlay()
throws NoresourceError
NoresourceError - Error accessing the terminalvoid transfer(java.lang.String dest)
throws NoresourceError
dest - Platform specific destination addressNoresourceError - Error transferring the call.boolean isCallActive()
true after a call has started
and hangup() has not been called.true if the call is activevoid hangup()