|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CallSession
A CallSession contains parameters associated with a particular Call such as ports used for transmitting and sending media (audio video), a reference to the call itself and others. Call session instances are created through the openCallSession(Call) method of the MediaService.
One CallSession pertains to a single Call instance and a single Call may only be associated one CallSession instance.
A call session also allows signaling protocols to generate SDP offers and construct sdp answers.
| Field Summary | |
|---|---|
static String |
LOCAL_VIDEO_STREAMING
The property which indicates whether a CallSession is
currently streaming the local video (to a remote destination). |
static byte |
ON_HOLD_REMOTELY
The media flag which signals that the other side of the call has put this on hold. |
static byte |
RECEIVE_AUDIO
The media flag which signals that audio streams being received are to be handled (e.g. |
static byte |
RECEIVE_VIDEO
The media flag which signals that video streams being received are to be handled (e.g. |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a specific PropertyChangeListener to the list of
listeners which get notified when the properties (e.g. |
void |
addVideoListener(VideoListener listener)
Adds a specific VideoListener to this
CallSession in order to receive notifications when
visual/video Components are being added and removed. |
Component |
createLocalVisualComponent(VideoListener listener)
Creates a visual Component which represents the local video
streamed by this CallSession (to remote destinations). |
String |
createSdpDescriptionForHold(String peerSdpDescription,
boolean onHold)
The method is meant for use by protocol service implementations when willing to send an in-dialog invitation to a remote callee to put her on/off hold or to send an answer to an offer to be put on/off hold. |
String |
createSdpOffer()
The method is meant for use by protocol service implementations when willing to send an invitation to a remote callee. |
String |
createSdpOffer(InetAddress intendedDestination)
The method is meant for use by protocol service implementations when willing to send an invitation to a remote callee. |
String |
createSdpOffer(String peerSdpDescription)
Creates a SDP description including the current state of the local media setup and in accord with a specific SDP description of a call peer (who is to be offered the created SDP description, for example, as part of a re-INVITE). |
void |
disposeLocalVisualComponent(Component component)
Disposes of a specific visual Component representing local
video which has been created by this instance with
createLocalVisualComponent(VideoListener). |
int |
getAudioPort()
Returns the port that we are using for receiving audio data in this CallSession. |
Call |
getCall()
Gets the call associated with this session |
URL |
getCallInfoURL()
Returns a URL pointing to a location with call control information for this call or null if no such URL is available. |
int |
getSdpOfferMediaFlags(String sdpOffer)
Determines whether a specific SDP description String offers this party to be put on hold and which media types are offered to be received. |
boolean |
getSecureCommunicationStatus()
Gets the default secure/unsecure communication status for the supported call sessions. |
SessionCreatorCallback |
getSessionCreatorCallback()
Returns the SessionCreatorCallback which listens for security events. |
int |
getVideoPort()
Returns the port that we are using for receiving video data in this CallSession. |
Component[] |
getVisualComponents()
Gets the visual/video Components available in this
CallSession. |
boolean |
isLocalVideoAllowed()
Gets the indicator which determines whether the streaming of local video in this CallSession is allowed. |
boolean |
isLocalVideoStreaming()
Gets the indicator which determines whether this CallSession
is currently streaming the local video (to a remote destination). |
boolean |
isMute()
Determines whether the audio of this session is (set to) mute. |
void |
processSdpAnswer(CallPeer responder,
String sdpAnswer)
The method is meant for use by protocol service implementations upon reception of an SDP answer in response to an offer sent by us earlier. |
String |
processSdpOffer(CallPeer offerer,
String sdpOffer)
The method is meant for use by protocol service implementations when willing to respond to an invitation received from a remote caller. |
void |
putOnHold(boolean on,
boolean here)
Puts the media of this CallSession on/off hold depending on the origin of the request. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a specific PropertyChangeListener from the list of
listeners which get notified when the properties (e.g. |
void |
removeVideoListener(VideoListener listener)
Removes a specific VideoListener from this
CallSession in order to no longer have it receive
notifications when visual/video Components are being added
and removed. |
void |
setLocalVideoAllowed(boolean allowed)
Sets the indicator which determines whether the streaming of local video in this CallSession is allowed. |
void |
setMute(boolean mute)
Sets the mute state of the audio of this session. |
void |
setReceiveStreaming(int mediaFlags)
Modifies the current setup of the stream receiving in accord with a specific set of media flags (which are usually obtained through getSdpOfferMediaFlags(String). |
void |
setSessionCreatorCallback(SessionCreatorCallback sessionCreatorCallBack)
Sets a SessionCreatorCallback that will listen for security events. |
boolean |
setZrtpSASVerification(boolean verified)
Sets the SAS verification |
void |
startStreaming()
Starts the streaming of the local media (to the remote destinations). |
void |
startStreamingAndProcessingMedia()
Calls startStreaming() in order to start the streaming of the
local media and then begins processing the received and sent media
streams. |
boolean |
stopStreaming()
Stops and closes the audio and video streams flowing through this session. |
| Field Detail |
|---|
static final byte ON_HOLD_REMOTELY
static final byte RECEIVE_AUDIO
static final byte RECEIVE_VIDEO
static final String LOCAL_VIDEO_STREAMING
CallSession is
currently streaming the local video (to a remote destination).
| Method Detail |
|---|
String createSdpOffer()
throws MediaException
MediaException - code INTERNAL_ERROR if generating the offer fails
for some reason.
String createSdpOffer(InetAddress intendedDestination)
throws MediaException
intendedDestination - the address of the call peer that the
descriptions is to be sent to.
MediaException - code SERVICE_NOT_STARTED if this method is called
before the service was started.
String createSdpOffer(String peerSdpDescription)
throws MediaException
peerSdpDescription - the SDP description (of a call
peer) to have the created SDP description in accord
with
MediaException
String createSdpDescriptionForHold(String peerSdpDescription,
boolean onHold)
throws MediaException
peerSdpDescription - the last SDP description of the remote
calleeonHold - true if the SDP description should offer the remote
callee to be put on hold or answer an offer from the remote
callee to be put on hold; false to work in the
context of a put-off-hold offer
MediaException
int getSdpOfferMediaFlags(String sdpOffer)
throws MediaException
sdpOffer - the SDP description String to be examined for
an offer to this party to be put on hold and media types to be
received
ON_HOLD_REMOTELY if the specified SDP description
offers this party to be put on hold, RECEIVE_AUDIO
and/or RECEIVE_VIDEO if audio and/or video,
respectively, are to be received
MediaExceptionvoid setReceiveStreaming(int mediaFlags)
getSdpOfferMediaFlags(String). For example, if
RECEIVE_VIDEO isn't present and video is currently being
received and played, stops its receiving and playback.
mediaFlags - an int bit mask containing any of the
media-related flags such as RECEIVE_AUDIO and
RECEIVE_VIDEO and thus specifying which media
types are to be received
void putOnHold(boolean on,
boolean here)
For example, a remote request to have this party put off hold cannot override an earlier local request to put the remote party on hold.
on - true to request the media of this
CallSession be put on hold; false,
otherwisehere - true if the request comes from this side of the
call; false if the remote party is the issuer of
the request i.e. it's the result of a remote offer
String processSdpOffer(CallPeer offerer,
String sdpOffer)
throws MediaException,
ParseException
sdpOffer - the SDP offer that we'd like to create an answer for.offerer - the peer that has sent the offer.
MediaException - code INTERNAL_ERROR if processing the offer and/or
generating the answer fail for some reason.
ParseException - if sdpOfferStr does not contain a valid
sdp string.
void processSdpAnswer(CallPeer responder,
String sdpAnswer)
throws MediaException,
ParseException
sdpAnswer - the SDP answer that we'd like to handle.responder - the peer that has sent the answer.
MediaException - code SERVICE_NOT_STARTED if this method is called
before the service was started.
ParseException - if sdpAnswerStr does not contain a valid
sdp string.int getVideoPort()
int getAudioPort()
URL getCallInfoURL()
boolean isMute()
void setMute(boolean mute)
mute - true to mute the audio of this session; otherwise,
false
void startStreaming()
throws MediaException
MediaException
void startStreamingAndProcessingMedia()
throws MediaException
startStreaming() in order to start the streaming of the
local media and then begins processing the received and sent media
streams.
MediaExceptionboolean stopStreaming()
boolean getSecureCommunicationStatus()
boolean setZrtpSASVerification(boolean verified)
Call getCall()
void addVideoListener(VideoListener listener)
VideoListener to this
CallSession in order to receive notifications when
visual/video Components are being added and removed.
listener - the VideoListener to be notified when
visual/video Components are being added or
removed in this CallSession
Component createLocalVisualComponent(VideoListener listener)
throws MediaException
Component which represents the local video
streamed by this CallSession (to remote destinations). If
the synchronous creation of the Component isn't supported,
it will be carried out asynchronously and the progress of the operation
and its result will be delivered through a specific
VideoListener.
listener - the VideoListener to track the progress of
the creation and deliver its result in case the operation is
carried out asynchronously by this implementation
Component which represents the local video
if this implementation creates it synchronously; null if
this implementation attempts asynchronous creation in which case
the result will be delivered to the specified
VideoListener
MediaExceptionvoid disposeLocalVisualComponent(Component component)
Component representing local
video which has been created by this instance with
createLocalVisualComponent(VideoListener).
component - the visual Component representing local
video to be disposedComponent[] getVisualComponents()
Components available in this
CallSession.
Components available in this
CallSessionvoid removeVideoListener(VideoListener listener)
VideoListener from this
CallSession in order to no longer have it receive
notifications when visual/video Components are being added
and removed.
listener - the VideoListener to no longer be notified
when visual/video Components are being added or
removed in this CallSession
void setLocalVideoAllowed(boolean allowed)
throws MediaException
CallSession is allowed. The setting does not reflect
the availability of actual video capture devices, it just expresses the
desire of the user to have the local video streamed in the case the
system is actually able to do so.
allowed - true to allow the streaming of local video for
this CallSession; false to disallow it
MediaExceptionboolean isLocalVideoAllowed()
CallSession is allowed. The setting does not reflect
the availability of actual video capture devices, it just expresses the
desire of the user to have the local video streamed in the case the
system is actually able to do so.
CallSession is allowed; otherwise, falsevoid setSessionCreatorCallback(SessionCreatorCallback sessionCreatorCallBack)
sessionCreatorCallBack - the SessionCreatorCallback to
setSessionCreatorCallback getSessionCreatorCallback()
boolean isLocalVideoStreaming()
CallSession
is currently streaming the local video (to a remote destination).
CallSession is currently
streaming the local video (to a remote destination); otherwise,
falsevoid addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the list of
listeners which get notified when the properties (e.g.
LOCAL_VIDEO_STREAMING) associated with this
CallSession change their values.
listener - the PropertyChangeListener to be notified
when the properties associated with this
CallSession change their valuesvoid removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the list of
listeners which get notified when the properties (e.g.
LOCAL_VIDEO_STREAMING) associated with this
CallSession change their values.
listener - the PropertyChangeListener to no longer be
notified when the properties associated with this
CallSession change their values
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||