public class CallPeerSipImpl extends MediaAwareCallPeer<CallSipImpl,CallPeerMediaHandlerSipImpl,ProtocolProviderServiceSipImpl>
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
PICTURE_FAST_UPDATE_CONTENT_SUB_TYPE
The sub-type of the content carried by SIP INFO Requests for the
purposes of picture_fast_update.
|
callPeerConferenceListeners, callPeerListeners, callPeerSecurityListeners, NO_CONFERENCE_MEMBERS
ERROR, INFORMATION, SEVERE, WARNING
MAX_LEVEL, MIN_LEVEL
CALL_DURATION_START_TIME_UNKNOWN, MUTE_PROPERTY_NAME
Constructor and Description |
---|
CallPeerSipImpl(javax.sip.address.Address peerAddress,
CallSipImpl owningCall,
javax.sip.Transaction containingTransaction,
javax.sip.SipProvider sourceProvider)
Creates a new call peer with address peerAddress.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addMethodProcessorListener(MethodProcessorListener listener)
Registers a specific MethodProcessorListener with this
CallPeer so that it gets notified by this instance about the
processing of SIP signaling.
|
void |
answer()
Indicates a user request to answer an incoming call from this
CallPeer.
|
protected void |
fireRequestProcessed(javax.sip.message.Request request,
javax.sip.message.Response response)
Notifies the MethodProcessorListeners registered with this
CallPeer that it has processed a specific SIP Request
by sending a specific SIP Response.
|
protected void |
fireResponseProcessed(javax.sip.message.Response response,
javax.sip.message.Request request)
Notifies the MethodProcessorListeners registered with this
CallPeer that it has processed a specific SIP Response
by sending a specific SIP Request.
|
java.lang.String |
getAddress()
Returns a String locator for that peer.
|
java.net.URL |
getCallInfoURL()
Returns a URL pointing to a location with call control information for
this peer or null if no such URL is available for this
call peer.
|
Contact |
getContact()
Returns the contact corresponding to this peer or null if no
particular contact has been associated.
|
javax.sip.Dialog |
getDialog()
Returns the JAIN SIP dialog that has been created by the application for
communication with this call peer.
|
org.jitsi.service.neomedia.MediaDirection |
getDirection(org.jitsi.service.neomedia.MediaType mediaType)
Returns the direction of the session for media of type mediaType
that we have with this CallPeer.
|
java.lang.String |
getDisplayName()
Returns a human readable name representing this peer.
|
java.lang.String |
getEntity()
Gets the String to be used for this CallPeer when
we describe it in a ConferenceInfoDocument (e.g.
|
javax.sip.SipProvider |
getJainSipProvider()
Returns the jain sip provider instance that is responsible for sending
and receiving requests and responses related to this call peer.
|
javax.sip.Transaction |
getLatestInviteTransaction()
Returns the transaction instance that contains the INVITE which started
this call.
|
javax.sip.address.Address |
getPeerAddress()
Returns the address of the remote party (making sure that it corresponds
to the latest address we've received) and caches it.
|
java.lang.String |
getURI()
Returns full URI of the address.
|
void |
handleAuthenticationChallenge(javax.sip.ClientTransaction retryTran)
Updates this call so that it would record a new transaction and dialog
that have been recreated because of a re-authentication.
|
void |
hangup()
Ends the call with for this CallPeer.
|
void |
hangup(int reasonCode,
java.lang.String reason)
Ends the call with for this CallPeer.
|
void |
invite()
Creates a CallPeerSipImpl from calleeAddress and sends
them an invite request.
|
void |
processAck(javax.sip.ServerTransaction serverTransaction,
javax.sip.message.Request ack)
Updates the session description and sends the state of the corresponding
call peer to CONNECTED.
|
void |
processBye(javax.sip.ServerTransaction byeTran)
Sets the state of the corresponding call peer to DISCONNECTED and
sends an OK response.
|
void |
processCancel(javax.sip.ServerTransaction serverTransaction)
Sets the state of the specifies call peer as DISCONNECTED.
|
protected void |
processExtraHeaders(javax.sip.message.Message message)
A place where we can handle any headers we need for requests
and responses.
|
void |
processInviteOK(javax.sip.ClientTransaction clientTransaction,
javax.sip.message.Response ok)
Sets our state to CONNECTED, sends an ACK and processes the SDP
description in the ok Response.
|
(package private) void |
processPictureFastUpdate(javax.sip.ClientTransaction clientTransaction,
javax.sip.message.Response response) |
(package private) boolean |
processPictureFastUpdate(javax.sip.ServerTransaction serverTransaction,
javax.sip.message.Request request) |
void |
processReInvite(javax.sip.ServerTransaction serverTransaction)
Reinitializes the media session of the CallPeer that this
INVITE request is destined to.
|
void |
processSessionProgress(javax.sip.ClientTransaction tran,
javax.sip.message.Response response)
Handles early media in 183 Session Progress responses.
|
void |
putOnHold(boolean onHold)
Puts the CallPeer represented by this instance on or off hold.
|
(package private) void |
removeMethodProcessorListener(MethodProcessorListener listener)
Unregisters a specific MethodProcessorListener from this
CallPeer so that it no longer gets notified by this instance
about the processing of SIP signaling.
|
(package private) void |
sendReInvite()
Sends a reINVITE request to this CallPeer within its current
Dialog.
|
void |
setDialog(javax.sip.Dialog dialog)
Sets the JAIN SIP dialog that has been created by the application for
communication with this call peer.
|
void |
setDisplayName(java.lang.String displayName)
Sets a human readable name representing this peer.
|
void |
setJainSipProvider(javax.sip.SipProvider jainSipProvider)
Sets the jain sip provider instance that is responsible for sending and
receiving requests and responses related to this call peer.
|
void |
setLatestInviteTransaction(javax.sip.Transaction transaction)
Sets the transaction instance that contains the INVITE which started
this call.
|
void |
setTransportAddress(java.net.InetSocketAddress transportAddress)
The address that we have used to contact this peer.
|
addConferenceMembersSoundLevelListener, addStreamSoundLevelListener, addVideoPropertyChangeListener, audioLevelChanged, audioLevelsReceived, callPeerAdded, callPeerRemoved, conferenceFocusChanged, conferenceMemberAdded, conferenceMemberErrorReceived, conferenceMemberRemoved, getCall, getImage, getLastConferenceInfoReceived, getLastConferenceInfoReceivedVersion, getLastConferenceInfoSent, getLastConferenceInfoSentTimestamp, getMediaHandler, getPeerID, getProtocolProvider, isConfInfoScheduled, isJitsiVideobridge, isLocalVideoStreaming, isMute, logAndFail, reevalLocalHoldStatus, reevalRemoteHoldStatus, removeConferenceMember, removeConferenceMembersSoundLevelListener, removeStreamSoundLevelListener, removeVideoPropertyChangeListener, securityMessageReceived, securityNegotiationStarted, securityTimeout, securityTurnedOff, securityTurnedOn, setCall, setConfInfoScheduled, setImage, setLastConferenceInfoReceived, setLastConferenceInfoSent, setLastConferenceInfoSentTimestamp, setLocalVideoAllowed, setMediaHandler, setMute, setPeerID, setState
addCallPeerConferenceListener, addCallPeerListener, addCallPeerSecurityListener, addConferenceMember, findConferenceMember, fireCallPeerChangeEvent, fireCallPeerChangeEvent, fireCallPeerChangeEvent, fireCallPeerConferenceEvent, fireCallPeerSecurityMessageEvent, fireCallPeerSecurityNegotiationStartedEvent, fireCallPeerSecurityOffEvent, fireCallPeerSecurityOnEvent, fireCallPeerSecurityTimeoutEvent, fireConferenceMemberErrorEvent, getAlternativeIMPPAddress, getCallDurationStartTime, getConferenceMemberCount, getConferenceMembers, getCurrentSecuritySettings, getState, isConferenceFocus, removeCallPeerConferenceListener, removeCallPeerListener, removeCallPeerSecurityListener, setAlternativeIMPPAddress, setConferenceFocus, setState, setState, toString
addPropertyChangeListener, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, removePropertyChangeListener
static final java.lang.String PICTURE_FAST_UPDATE_CONTENT_SUB_TYPE
public CallPeerSipImpl(javax.sip.address.Address peerAddress, CallSipImpl owningCall, javax.sip.Transaction containingTransaction, javax.sip.SipProvider sourceProvider)
peerAddress
- the JAIN SIP Address of the new call peer.owningCall
- the call that contains this call peer.containingTransaction
- the transaction that created the call peer.sourceProvider
- the provider that the containingTransaction belongs
to.public java.lang.String getAddress()
public java.lang.String getURI()
public javax.sip.address.Address getPeerAddress()
public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String displayName)
displayName
- the peer's display namepublic void setDialog(javax.sip.Dialog dialog)
dialog
- the JAIN SIP dialog that has been created by the
application for this call.public javax.sip.Dialog getDialog()
public void setLatestInviteTransaction(javax.sip.Transaction transaction)
transaction
- the Transaction that initiated this call.public javax.sip.Transaction getLatestInviteTransaction()
public void setJainSipProvider(javax.sip.SipProvider jainSipProvider)
jainSipProvider
- the SipProvider that serves this call
peer.public javax.sip.SipProvider getJainSipProvider()
public void setTransportAddress(java.net.InetSocketAddress transportAddress)
transportAddress
- The address that we have used to contact this
peer.public Contact getContact()
public java.net.URL getCallInfoURL()
getCallInfoURL
in interface CallPeer
getCallInfoURL
in class AbstractCallPeer<CallSipImpl,ProtocolProviderServiceSipImpl>
void processPictureFastUpdate(javax.sip.ClientTransaction clientTransaction, javax.sip.message.Response response)
boolean processPictureFastUpdate(javax.sip.ServerTransaction serverTransaction, javax.sip.message.Request request) throws OperationFailedException
OperationFailedException
public void processReInvite(javax.sip.ServerTransaction serverTransaction)
serverTransaction
- a reference to the ServerTransaction
that contains the reINVITE request.public void processBye(javax.sip.ServerTransaction byeTran)
byeTran
- the ServerTransaction the the BYE request arrived in.public void processCancel(javax.sip.ServerTransaction serverTransaction)
serverTransaction
- the transaction that the cancel was received in.public void processAck(javax.sip.ServerTransaction serverTransaction, javax.sip.message.Request ack)
serverTransaction
- the transaction that the ACK was received in.ack
- the ACK Request we need to processpublic void processSessionProgress(javax.sip.ClientTransaction tran, javax.sip.message.Response response)
tran
- the ClientTransaction that the response
arrived in.response
- the 183 Response to processpublic void processInviteOK(javax.sip.ClientTransaction clientTransaction, javax.sip.message.Response ok)
clientTransaction
- the ClientTransaction that the response
arrived in.ok
- the OK Response to processpublic void hangup() throws OperationFailedException
OperationFailedException
- if we fail to terminate the call.public void hangup(int reasonCode, java.lang.String reason) throws OperationFailedException
reasonCode
- indicates if the hangup is following to a call failure
or simply a disconnect indicate by the reason.reason
- the reason of the hangup. If the hangup is due to a call
failure, then this string could indicate the reason of the failureOperationFailedException
- if we fail to terminate the call.public void answer() throws OperationFailedException
OperationFailedException
- if we fail to create or send the
response.public void putOnHold(boolean onHold) throws OperationFailedException
onHold
- true to have the CallPeer put on hold;
false, otherwiseOperationFailedException
- if we fail to construct or send the
INVITE request putting the remote side on/off hold.void sendReInvite() throws OperationFailedException
OperationFailedException
- if sending the reINVITE request failspublic void invite() throws OperationFailedException
OperationFailedException
- with the corresponding code if we fail
to create the call or in case we someone calls us mistakenly while we
are actually wrapped around an invite transaction.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 failsvoid addMethodProcessorListener(MethodProcessorListener listener)
listener
- the MethodProcessorListener to be registered
with this CallPeer so that it gets notified by this instance
about the processing of SIP signalingprotected void fireRequestProcessed(javax.sip.message.Request request, javax.sip.message.Response response)
request
- the SIP Request processed by this
CallPeerresponse
- the SIP Response this CallPeer sent as
part of its processing of the specified requestprotected void fireResponseProcessed(javax.sip.message.Response response, javax.sip.message.Request request)
response
- the SIP Response processed by this
CallPeerrequest
- the SIP Request this CallPeer sent as
part of its processing of the specified responsevoid removeMethodProcessorListener(MethodProcessorListener listener)
listener
- the MethodProcessorListener to be unregistered
from this CallPeer so that it no longer gets notified by this
instance about the processing of SIP signalingpublic void handleAuthenticationChallenge(javax.sip.ClientTransaction retryTran)
retryTran
- the new transactionpublic java.lang.String getEntity()
getEntity
in class MediaAwareCallPeer<CallSipImpl,CallPeerMediaHandlerSipImpl,ProtocolProviderServiceSipImpl>
public org.jitsi.service.neomedia.MediaDirection getDirection(org.jitsi.service.neomedia.MediaType mediaType)
getDirection
in class MediaAwareCallPeer<CallSipImpl,CallPeerMediaHandlerSipImpl,ProtocolProviderServiceSipImpl>
mediaType
- the MediaType to use
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.