public class CallSipImpl extends MediaAwareCall<CallPeerSipImpl,OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl> implements CallPeerListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DS_SHARING_HEADER
Custom header included in initial desktop sharing call creation.
|
static java.lang.String |
EXTRA_HEADER_NAME
Custom header name prefix that can be added to the call instance.
|
static java.lang.String |
EXTRA_HEADER_VALUE
Custom header value prefix that can be added to the call instance.
|
DEFAULT_DEVICE, localVideoAllowed, mediaUseCase, parentOpSet
CONFERENCE, CONFERENCE_FOCUS, useTranslator
Modifier | Constructor and Description |
---|---|
protected |
CallSipImpl(OperationSetBasicTelephonySipImpl parentOpSet)
Crates a CallSipImpl instance belonging to sourceProvider and
initiated by CallCreator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
conferenceFocusChanged(boolean oldValue,
boolean newValue)
Notifies this instance that the value of its property
Call.CONFERENCE_FOCUS has changed from a specific old value to a
specific new value. |
boolean |
contains(javax.sip.Dialog dialog)
Returns true if dialog matches the jain sip dialog
established with one of the peers in this call.
|
CallPeerSipImpl |
findCallPeer(javax.sip.Dialog dialog)
Returns the call peer whose associated jain sip dialog matches
dialog.
|
protected void |
fireCallEvent(int eventID,
Call sourceCall,
java.util.Map<org.jitsi.service.neomedia.MediaType,org.jitsi.service.neomedia.MediaDirection> mediaDirections)
Creates and dispatches a CallEvent notifying registered
listeners that an event with id eventID has occurred on
sourceCall.
|
ProtocolProviderServiceSipImpl |
getProtocolProvider()
Returns a reference to the ProtocolProviderServiceSipImpl
instance that created this call.
|
CallPeerSipImpl |
invite(javax.sip.address.Address calleeAddress,
javax.sip.message.Message cause)
Creates a CallPeerSipImpl from calleeAddress and sends
them an invite request.
|
protected void |
processExtraHeaders(javax.sip.message.Message message)
A place where we can handle any headers we need for requests
and responses.
|
CallPeerSipImpl |
processInvite(javax.sip.SipProvider jainSipProvider,
javax.sip.ServerTransaction serverTran)
Creates a new call and sends a RINGING response.
|
void |
processReplacingInvite(javax.sip.SipProvider jainSipProvider,
javax.sip.ServerTransaction serverTransaction,
CallPeerSipImpl callPeerToReplace)
Processes an incoming INVITE that is meant to replace an existing
CallPeerSipImpl that is participating in this call.
|
void |
reInvite()
Sends a re-INVITE request to all CallPeers to reflect possible
changes in the media setup (video start/stop, ...).
|
void |
setInitialQualityPreferences(org.jitsi.service.neomedia.QualityPreset qualityPreferences)
Set a quality preferences we may use when we start the call.
|
addCallPeer, addLocalUserSoundLevelListener, addVideoPropertyChangeListener, createConference, createRecorder, firePropertyChange, getConference, getDefaultDevice, getMediaUseCase, getParentOperationSet, getRTPTranslator, isConferenceFocus, isLocalVideoAllowed, isLocalVideoStreaming, isMute, peerAddressChanged, peerDisplayNameChanged, peerImageChanged, peerStateChanged, peerTransportAddressChanged, propertyChange, removeLocalUserSoundLevelListener, removeVideoPropertyChangeListener, setAudioDevice, setCallState, setConference, setLocalVideoAllowed, setMute, setVideoDevice, toneReceived
addPropertyChangeListener, doAddCallPeer, doRemoveCallPeer, getCallPeerCount, getCallPeerList, getCallPeers, removePropertyChangeListener
addCallChangeListener, equals, fireCallChangeEvent, fireCallChangeEvent, fireCallPeerEvent, fireCallPeerEvent, getCallID, getCallState, hashCode, isAutoAnswer, isDefaultEncrypted, isSipZrtpAttribute, removeCallChangeListener, setAutoAnswer, setCallState, toString
getData, setData
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
peerAddressChanged, peerDisplayNameChanged, peerImageChanged, peerStateChanged, peerTransportAddressChanged
public static final java.lang.String DS_SHARING_HEADER
public static final java.lang.String EXTRA_HEADER_NAME
public static final java.lang.String EXTRA_HEADER_VALUE
protected CallSipImpl(OperationSetBasicTelephonySipImpl parentOpSet)
parentOpSet
- a reference to the operation set that's creating us
and that we would be able to use for even dispatching.protected void conferenceFocusChanged(boolean oldValue, boolean newValue)
Call.CONFERENCE_FOCUS
has changed from a specific old value to a
specific new value. Fires a PropertyChangeEvent to the
registered PropertyChangeListeners. Protocol implementations
which extend MediaAwareCall will likely want to override in
order to add notifying the associated CallPeers about the change
of the property value (e.g. SIP will want to include the
"isfocus" parameter in the Contact header while the local peer
is acting as a conference focus.)
Re-INVITEs the CallPeers associated with this
CallSipImpl in order to include/exclude the "isfocus"
parameter in the Contact header.conferenceFocusChanged
in class MediaAwareCall<CallPeerSipImpl,OperationSetBasicTelephonySipImpl,ProtocolProviderServiceSipImpl>
oldValue
- the value of the property CONFERENCE_FOCUS
before the changenewValue
- the value of the property CONFERENCE_FOCUS after
the changepublic boolean contains(javax.sip.Dialog dialog)
dialog
- the dialog whose corresponding peer we're looking for.protected void fireCallEvent(int eventID, Call sourceCall, java.util.Map<org.jitsi.service.neomedia.MediaType,org.jitsi.service.neomedia.MediaDirection> mediaDirections)
eventID
- the ID of the event to dispatchsourceCall
- the call on which the event has occurred.mediaDirections
- direction map for media typespublic CallPeerSipImpl findCallPeer(javax.sip.Dialog dialog)
dialog
- the jain sip dialog whose corresponding peer we're looking
for.public ProtocolProviderServiceSipImpl getProtocolProvider()
getProtocolProvider
in class AbstractCall<CallPeerSipImpl,ProtocolProviderServiceSipImpl>
public CallPeerSipImpl invite(javax.sip.address.Address calleeAddress, javax.sip.message.Message cause) throws OperationFailedException
calleeAddress
- the party that we would like to invite to this call.cause
- the message (e.g. a Refer request), that is the reason for
this invite or null if this is a user-initiated invitationOperationFailedException
- with the corresponding code if we fail
to create the call.public CallPeerSipImpl processInvite(javax.sip.SipProvider jainSipProvider, javax.sip.ServerTransaction serverTran)
jainSipProvider
- the provider containing
sourceTransaction.serverTran
- the transaction containing the received request.public void processReplacingInvite(javax.sip.SipProvider jainSipProvider, javax.sip.ServerTransaction serverTransaction, CallPeerSipImpl callPeerToReplace)
jainSipProvider
- the JAIN-SIP SipProvider that received
the request.serverTransaction
- the transaction containing the INVITE request.callPeerToReplace
- a reference to the CallPeer that this
INVITE is trying to replace.public void reInvite() throws OperationFailedException
OperationFailedException
- if a problem occurred during the SDP
generation or there was a network problempublic void setInitialQualityPreferences(org.jitsi.service.neomedia.QualityPreset qualityPreferences)
qualityPreferences
- the initial quality preferences.protected void processExtraHeaders(javax.sip.message.Message message) throws java.text.ParseException
message
- the SIP Message in which a header change
is to be reflectedjava.text.ParseException
- if modifying the specified SIP
Message to reflect the header change fails
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.