SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.media
Class CallSessionImpl

java.lang.Object
  extended by net.java.sip.communicator.util.PropertyChangeNotifier
      extended by net.java.sip.communicator.impl.media.CallSessionImpl
All Implemented Interfaces:
EventListener, javax.media.ControllerListener, javax.media.rtp.ReceiveStreamListener, javax.media.rtp.SendStreamListener, javax.media.rtp.SessionListener, CallSession, CallChangeListener

public class CallSessionImpl
extends PropertyChangeNotifier
implements CallSession, CallChangeListener, javax.media.rtp.ReceiveStreamListener, javax.media.rtp.SendStreamListener, javax.media.rtp.SessionListener, javax.media.ControllerListener

Contains parameters associated with a particular Call such as media (audio video), a reference to the call itself, RTPManagers and others.

Currently the class works in the following way:

We create 2 rtp managers (one for video and one for audio) upon initialization of this call session and initialize/bind them on local addresses.

When we are asked to create an SDP offer we ask the MediaControl for the Formats/Encodings that we support and create a media description that would advertise these formats as well as the ports that our RTP managers are bound upon.

When we need to process an incoming offer we ask the MediaControl for the Formats/Encodings that we support, intersect them with those that were sent by the offerer and make MediaControl configure our source processor so that it would transmit in the format that it is expected to according to the format set that resulted from the intersection. We also prepare our RTPManager-s to send streams for every media type requested in the offer. (Note that these streams are not started until the associated call enters the CONNECTED state).

Processing an SDP answer is quite similar to processing an offer with the exception that the intersection of all supported formats has been performed bye the remote party and we only need to configure our processor and RTPManagers.

Author:
Emil Ivov, Damian Minkov, Ryan Ricard, Ken Larson, Dudek Przemyslaw, Lubomir Marinov, Emanuel Onica

Nested Class Summary
static class CallSessionImpl.ZRTPCustomInfoCodes
          Additional info codes for and data to support ZRTP4J.
 
Field Summary
static String AUDIO_SESSION
          Indicates an audio session type.
static String VIDEO_SESSION
          Indicates a video session type.
 
Fields inherited from interface net.java.sip.communicator.service.media.CallSession
LOCAL_VIDEO_STREAMING, ON_HOLD_REMOTELY, RECEIVE_AUDIO, RECEIVE_VIDEO
 
Constructor Summary
CallSessionImpl(Call call, MediaServiceImpl mediaServCallback)
          Creates a new session for the specified call.
CallSessionImpl(Call call, MediaServiceImpl mediaServCallback, URL dataSink)
          Creates a new session for the specified call with a custom destination for incoming data.
 
Method Summary
 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.
 void callPeerAdded(CallPeerEvent evt)
          Indicates that a new call peer has joined the source call.
 void callPeerRemoved(CallPeerEvent evt)
          Indicates that a call peer has left the source call.
 void callStateChanged(CallChangeEvent evt)
          Indicates that a change has occurred in the state of the source call.
 void controllerUpdate(javax.media.ControllerEvent ce)
          This method is called when an event is generated by a Controller that this listener is registered with.
 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 on)
          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 CallSession.createLocalVisualComponent(VideoListener).
protected  void fireVideoEvent(int type, Component visualComponent, int origin)
          Notifies the VideoListeners registered with this CallSession about a specific type of change in the availability of a specific visual Component depicting video.
 int getAudioPort()
          Returns the port that we are using for receiving audio data in this CallSession.
 javax.media.rtp.RTPManager getAudioRtpManager()
          Returns the rtp manager that we are using for audio streams.
 Call getCall()
          Returns the call associated with this Session.
 URL getCallInfoURL()
          RFC 4566 specifies that an SDP description may contain a URI (i.r.
 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()
          Method for getting the default secure status value for communication
 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.
 javax.media.rtp.RTPManager getVideoRtpManager()
          Returns the rtp manager that we are using for video streams.
 Component[] getVisualComponents()
          Gets the visual/video Components available in this CallSession.
 void initializeSupportedKeyProviders()
          Initializes the supported key management types and establishes default usage priorities for them.
 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 sdpAnswerStr)
          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 sdpOfferStr)
          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.
(package private) static void registerCustomCodecFormats(javax.media.rtp.RTPManager rtpManager)
          Registers the RTP formats which are supported by SIP Communicator in addition to the JMF standard formats.
(package private) static void registerCustomVideoCodecFormats(javax.media.rtp.RTPManager rtpManager)
           
 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.
 KeyProviderAlgorithm selectDefaultKeyProviderAlgorithm()
          Selects a default key management type to use in securing based on which the actual implementation for that solution will be started This part should be further developed (by adding a more detailed priority choosing mechanism in case of addition of other security providers).
 KeyProviderAlgorithm selectKeyProviderAlgorithm(int priority)
          Selects a key management type to use in securing based on priority For now the priorities are equal with the position in the Vector holding the keymanagement types.
 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 CallSession.getSdpOfferMediaFlags(String).
 void setSessionCreatorCallback(SessionCreatorCallback securityCallback)
          Sets a SessionCreatorCallback that will listen for security events.
 boolean setZrtpSASVerification(boolean verified)
          Sets the SAS verification
 void startStreaming()
          Opens all streams that have been initialized for local RTP managers.
 void startStreamingAndProcessingMedia()
          Calls CallSession.startStreaming() in order to start the streaming of the local media and then begins processing the received and sent media streams.
 int startZrtpMultiStreams()
          Start multi-stream ZRTP sessions.
 boolean stopStreaming()
          Stops and closes all streams that have been initialized for local RTP managers and disposes of the local RTP managers.
 void update(javax.media.rtp.event.ReceiveStreamEvent evt)
          Method called back in the RTPSessionListener to notify listener of all ReceiveStream Events.
 void update(javax.media.rtp.event.SendStreamEvent event)
          Method called back in the RTPSessionListener to notify listener of all SendStream Events.
 void update(javax.media.rtp.event.SessionEvent event)
          Method called back in the SessionListener to notify listener of all Session Events.SessionEvents could be one of NewParticipantEvent or LocalCollisionEvent.
 
Methods inherited from class net.java.sip.communicator.util.PropertyChangeNotifier
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.sip.communicator.service.media.CallSession
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

AUDIO_SESSION

public static final String AUDIO_SESSION
Indicates an audio session type.

See Also:
Constant Field Values

VIDEO_SESSION

public static final String VIDEO_SESSION
Indicates a video session type.

See Also:
Constant Field Values
Constructor Detail

CallSessionImpl

public CallSessionImpl(Call call,
                       MediaServiceImpl mediaServCallback,
                       URL dataSink)
Creates a new session for the specified call with a custom destination for incoming data.

Parameters:
call - The call associated with this session.
mediaServCallback - the media service instance that created us.
dataSink - the place to send incoming data.

CallSessionImpl

public CallSessionImpl(Call call,
                       MediaServiceImpl mediaServCallback)
Creates a new session for the specified call.

Parameters:
call - The call associated with this session.
mediaServCallback - the media service instance that created us.
Method Detail

getCall

public Call getCall()
Returns the call associated with this Session.

Specified by:
getCall in interface CallSession
Returns:
the Call associated with this session.

getVideoPort

public int getVideoPort()
Returns the port that we are using for receiving video data in this CallSession.

Specified by:
getVideoPort in interface CallSession
Returns:
the port number we are using for receiving video data in this CallSession.

getAudioPort

public int getAudioPort()
Returns the port that we are using for receiving audio data in this CallSession.

Specified by:
getAudioPort in interface CallSession
Returns:
the port number we are using for receiving audio data in this CallSession.

getAudioRtpManager

public javax.media.rtp.RTPManager getAudioRtpManager()
Returns the rtp manager that we are using for audio streams.

Returns:
the RTPManager instance that we are using for audio streams.

getVideoRtpManager

public javax.media.rtp.RTPManager getVideoRtpManager()
Returns the rtp manager that we are using for video streams.

Returns:
the RTPManager instance that we are using for audio streams.

startStreaming

public void startStreaming()
                    throws MediaException
Opens all streams that have been initialized for local RTP managers.

Specified by:
startStreaming in interface CallSession
Throws:
MediaException - if start() fails for all send streams.

startStreamingAndProcessingMedia

public void startStreamingAndProcessingMedia()
                                      throws MediaException
Description copied from interface: CallSession
Calls CallSession.startStreaming() in order to start the streaming of the local media and then begins processing the received and sent media streams.

Specified by:
startStreamingAndProcessingMedia in interface CallSession
Throws:
MediaException

stopStreaming

public boolean stopStreaming()
Stops and closes all streams that have been initialized for local RTP managers and disposes of the local RTP managers.

Specified by:
stopStreaming in interface CallSession
Returns:
true if there was an actual change in the streaming i.e. the streaming wasn't already stopped before this request; false, otherwise

createSdpOffer

public String createSdpOffer()
                      throws MediaException
The method is meant for use by protocol service implementations when willing to send an invitation to a remote callee. The resources (address and port) allocated for the callPeer should be kept by the media service implementation until the originating callPeer enters the DISCONNECTED state. Subsequent sdp offers/answers requested for the Call that the original callPeer belonged to MUST receive the same IP/port couple as the first one in order to allow for conferencing. The associated port will be released once the call has ended.

Specified by:
createSdpOffer in interface CallSession
Returns:
a new SDP description String advertising all params of callSession.
Throws:
MediaException - code SERVICE_NOT_STARTED if this method is called before the service was started.
To do:
implement ice.

createSdpOffer

public String createSdpOffer(InetAddress intendedDestination)
                      throws MediaException
The method is meant for use by protocol service implementations when willing to send an invitation to a remote callee. The intendedDestination parameter, may contain the address that the offer is to be sent to. In case it is null we'll try our best to determine a default local address.

Specified by:
createSdpOffer in interface CallSession
Parameters:
intendedDestination - the address of the call peer that the descriptions is to be sent to.
Returns:
a new SDP description String advertising all params of callSession.
Throws:
MediaException - code SERVICE_NOT_STARTED if this method is called before the service was started.

createSdpOffer

public String createSdpOffer(String peerSdpDescription)
                      throws MediaException
Description copied from interface: CallSession
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).

Specified by:
createSdpOffer in interface CallSession
Parameters:
peerSdpDescription - the SDP description (of a call peer) to have the created SDP description in accord with
Returns:
a SDP description including the current state of the local media setup and in accord with the specified SDP description of a call peer
Throws:
MediaException

createSdpDescriptionForHold

public String createSdpDescriptionForHold(String peerSdpDescription,
                                          boolean on)
                                   throws MediaException
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.

Specified by:
createSdpDescriptionForHold in interface CallSession
Parameters:
peerSdpDescription - the last SDP description of the remote callee
on - 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
Returns:
a SDP description String which offers the remote callee to be put her on/off hold or answers an offer from the remote callee to be put on/off hold
Throws:
MediaException

getSdpOfferMediaFlags

public int getSdpOfferMediaFlags(String sdpOffer)
                          throws MediaException
Description copied from interface: CallSession
Determines whether a specific SDP description String offers this party to be put on hold and which media types are offered to be received.

Specified by:
getSdpOfferMediaFlags in interface CallSession
Parameters:
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
Returns:
an int bit mask containing 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
Throws:
MediaException

putOnHold

public void putOnHold(boolean on,
                      boolean here)
Puts the media of this CallSession on/off hold depending on the origin of the request.

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.

Specified by:
putOnHold in interface CallSession
Parameters:
on - true to request the media of this CallSession be put on hold; false, otherwise
here - 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

processSdpAnswer

public void processSdpAnswer(CallPeer responder,
                             String sdpAnswerStr)
                      throws MediaException,
                             ParseException
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.

Specified by:
processSdpAnswer in interface CallSession
Parameters:
sdpAnswerStr - the SDP answer that we'd like to handle.
responder - the peer that has sent the answer.
Throws:
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.

processSdpOffer

public String processSdpOffer(CallPeer offerer,
                              String sdpOfferStr)
                       throws MediaException,
                              ParseException
The method is meant for use by protocol service implementations when willing to respond to an invitation received from a remote caller. Apart from simply generating an SDP response description, the method records details

Specified by:
processSdpOffer in interface CallSession
Parameters:
sdpOfferStr - the SDP offer that we'd like to create an answer for.
offerer - the peer that has sent the offer.
Returns:
a String containing an SDP answer describing parameters of the Call associated with this session and matching those advertised by the caller in their sdpOffer.
Throws:
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.

getCallInfoURL

public URL getCallInfoURL()
RFC 4566 specifies that an SDP description may contain a URI (i.r. a "u=" param ) with additional call information. Some servers, such as SEMS use this URI to deliver a link to a call control page. This method returns this call URL or null if the call session description did not contain a "u=" parameter.

Specified by:
getCallInfoURL in interface CallSession
Returns:
a call URL as indicated by the "u=" parameter of the call session description or null if there was no such parameter.

registerCustomCodecFormats

static void registerCustomCodecFormats(javax.media.rtp.RTPManager rtpManager)
Registers the RTP formats which are supported by SIP Communicator in addition to the JMF standard formats. This has to be done for every RTP Manager instance.

JMF stores this statically, so it only has to be done once. FMJ does it dynamically (per instance, so it needs to be done for each instance.

Parameters:
rtpManager - The manager with which to register the formats.
See Also:
EncodingConfiguration.registerCustomCodecs()

registerCustomVideoCodecFormats

static void registerCustomVideoCodecFormats(javax.media.rtp.RTPManager rtpManager)

callStateChanged

public void callStateChanged(CallChangeEvent evt)
Indicates that a change has occurred in the state of the source call.

Specified by:
callStateChanged in interface CallChangeListener
Parameters:
evt - the CallChangeEvent instance containing the source calls and its old and new state.

callPeerAdded

public void callPeerAdded(CallPeerEvent evt)
Indicates that a new call peer has joined the source call.

Specified by:
callPeerAdded in interface CallChangeListener
Parameters:
evt - the CallPeerEvent containing the source call and call peer.

callPeerRemoved

public void callPeerRemoved(CallPeerEvent evt)
Indicates that a call peer has left the source call.

Specified by:
callPeerRemoved in interface CallChangeListener
Parameters:
evt - the CallPeerEvent containing the source call and call peer.

update

public void update(javax.media.rtp.event.SessionEvent event)
Method called back in the SessionListener to notify listener of all Session Events.SessionEvents could be one of NewParticipantEvent or LocalCollisionEvent.

Specified by:
update in interface javax.media.rtp.SessionListener
Parameters:
event - the newly received SessionEvent

update

public void update(javax.media.rtp.event.SendStreamEvent event)
Method called back in the RTPSessionListener to notify listener of all SendStream Events.

Specified by:
update in interface javax.media.rtp.SendStreamListener
Parameters:
event - the newly received SendStreamEvent

update

public void update(javax.media.rtp.event.ReceiveStreamEvent evt)
Method called back in the RTPSessionListener to notify listener of all ReceiveStream Events.

Specified by:
update in interface javax.media.rtp.ReceiveStreamListener
Parameters:
evt - the newly received ReceiveStreamEvent

controllerUpdate

public void controllerUpdate(javax.media.ControllerEvent ce)
This method is called when an event is generated by a Controller that this listener is registered with.

Specified by:
controllerUpdate in interface javax.media.ControllerListener
Parameters:
ce - The event generated.

getSecureCommunicationStatus

public boolean getSecureCommunicationStatus()
Method for getting the default secure status value for communication

Specified by:
getSecureCommunicationStatus in interface CallSession
Returns:
the default enabled/disabled status value for secure communication

setZrtpSASVerification

public boolean setZrtpSASVerification(boolean verified)
Description copied from interface: CallSession
Sets the SAS verification

Specified by:
setZrtpSASVerification in interface CallSession
Returns:
True if SAS functions were called in ZrtpEngine

startZrtpMultiStreams

public int startZrtpMultiStreams()
Start multi-stream ZRTP sessions. After the ZRTP Master (DH) session reached secure state the SCCallback calls this method to start the multi-stream ZRTP sessions. First get the multi-stream data from the ZRTP DH session. Then iterate over all known connectors, set multi-stream mode data, and enable auto-start mode (auto-sensing).

Returns:
Number of started ZRTP multi-stream mode sessions

initializeSupportedKeyProviders

public void initializeSupportedKeyProviders()
Initializes the supported key management types and establishes default usage priorities for them. This part should be further developed (by adding a more detailed priority setting mechanism in case of addition of other security providers).


selectDefaultKeyProviderAlgorithm

public KeyProviderAlgorithm selectDefaultKeyProviderAlgorithm()
Selects a default key management type to use in securing based on which the actual implementation for that solution will be started This part should be further developed (by adding a more detailed priority choosing mechanism in case of addition of other security providers).

Returns:
the default keymanagement type used in securing

selectKeyProviderAlgorithm

public KeyProviderAlgorithm selectKeyProviderAlgorithm(int priority)
Selects a key management type to use in securing based on priority For now the priorities are equal with the position in the Vector holding the keymanagement types. This part should be further developed (by adding a more detailed priority choosing mechanism in case of addition of other security providers).

Parameters:
priority - the priority of the selected key management type with 0 indicating top priority
Returns:
the selected key management type

isMute

public boolean isMute()
Determines whether the audio of this session is (set to) mute.

Specified by:
isMute in interface CallSession
Returns:
true if the audio of this session is (set to) mute; otherwise, false

setMute

public void setMute(boolean mute)
Sets the mute state of the audio of this session.

Specified by:
setMute in interface CallSession
Parameters:
mute - true to mute the audio of this session; otherwise, false

addVideoListener

public void addVideoListener(VideoListener listener)
Description copied from interface: CallSession
Adds a specific VideoListener to this CallSession in order to receive notifications when visual/video Components are being added and removed.

Specified by:
addVideoListener in interface CallSession
Parameters:
listener - the VideoListener to be notified when visual/video Components are being added or removed in this CallSession

createLocalVisualComponent

public Component createLocalVisualComponent(VideoListener listener)
                                     throws MediaException
Description copied from interface: CallSession
Creates a visual 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.

Specified by:
createLocalVisualComponent in interface CallSession
Parameters:
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
Returns:
a visual 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
Throws:
MediaException

disposeLocalVisualComponent

public void disposeLocalVisualComponent(Component component)
Description copied from interface: CallSession
Disposes of a specific visual Component representing local video which has been created by this instance with CallSession.createLocalVisualComponent(VideoListener).

Specified by:
disposeLocalVisualComponent in interface CallSession
Parameters:
component - the visual Component representing local video to be disposed

getVisualComponents

public Component[] getVisualComponents()
Description copied from interface: CallSession
Gets the visual/video Components available in this CallSession.

Specified by:
getVisualComponents in interface CallSession
Returns:
an array of the visual Components available in this CallSession

removeVideoListener

public void removeVideoListener(VideoListener listener)
Description copied from interface: CallSession
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.

Specified by:
removeVideoListener in interface CallSession
Parameters:
listener - the VideoListener to no longer be notified when visual/video Components are being added or removed in this CallSession

fireVideoEvent

protected void fireVideoEvent(int type,
                              Component visualComponent,
                              int origin)
Notifies the VideoListeners registered with this CallSession about a specific type of change in the availability of a specific visual Component depicting video.

Parameters:
type - the type of change as defined by VideoEvent in the availability of the specified visual Component depciting video
visualComponent - the visual Component depicting video which has been added or removed in this CallSession
origin -

setLocalVideoAllowed

public void setLocalVideoAllowed(boolean allowed)
                          throws MediaException
Description copied from interface: CallSession
Sets the indicator which determines whether the streaming of local video in this 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.

Specified by:
setLocalVideoAllowed in interface CallSession
Parameters:
allowed - true to allow the streaming of local video for this CallSession; false to disallow it
Throws:
MediaException

isLocalVideoAllowed

public boolean isLocalVideoAllowed()
Description copied from interface: CallSession
Gets the indicator which determines whether the streaming of local video in this 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.

Specified by:
isLocalVideoAllowed in interface CallSession
Returns:
true if the streaming of local video in this CallSession is allowed; otherwise, false

isLocalVideoStreaming

public boolean isLocalVideoStreaming()
Description copied from interface: CallSession
Gets the indicator which determines whether this CallSession is currently streaming the local video (to a remote destination).

Specified by:
isLocalVideoStreaming in interface CallSession
Returns:
true if this CallSession is currently streaming the local video (to a remote destination); otherwise, false

setReceiveStreaming

public void setReceiveStreaming(int mediaFlags)
Description copied from interface: CallSession
Modifies the current setup of the stream receiving in accord with a specific set of media flags (which are usually obtained through CallSession.getSdpOfferMediaFlags(String). For example, if RECEIVE_VIDEO isn't present and video is currently being received and played, stops its receiving and playback.

Specified by:
setReceiveStreaming in interface CallSession
Parameters:
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

setSessionCreatorCallback

public void setSessionCreatorCallback(SessionCreatorCallback securityCallback)
Sets a SessionCreatorCallback that will listen for security events.

Specified by:
setSessionCreatorCallback in interface CallSession
Parameters:
securityCallback - the SessionCreatorCallback to set

getSessionCreatorCallback

public SessionCreatorCallback getSessionCreatorCallback()
Returns the SessionCreatorCallback which listens for security events.

Specified by:
getSessionCreatorCallback in interface CallSession
Returns:
the SessionCreatorCallback which listens for security events

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.