|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony<ProtocolProviderServiceSipImpl>
net.java.sip.communicator.impl.protocol.sip.OperationSetBasicTelephonySipImpl
public class OperationSetBasicTelephonySipImpl
Implements all call management logic and exports basic telephony support by implementing OperationSetBasicTelephony.
| Field Summary |
|---|
| Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicTelephony |
|---|
HANGUP_REASON_ENCRYPTION_REQUIRED, HANGUP_REASON_NORMAL_CLEARING, HANGUP_REASON_TIMEOUT, MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME, MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
OperationSetBasicTelephonySipImpl(ProtocolProviderServiceSipImpl protocolProvider)
Creates a new instance and adds itself as an INVITE method handler in the creating protocolProvider. |
|
| Method Summary | |
|---|---|
void |
answerCallPeer(CallPeer peer)
Indicates a user request to answer an incoming call from the specified CallPeer. |
Call |
createCall(Contact callee)
Creates a new Call and invites a specific CallPeer to it given by her Contact. |
Call |
createCall(Contact callee,
CallGroup group)
Creates a new Call and invites a specific CallPeer to it given by her Contact. |
Call |
createCall(String callee)
Creates a new Call and invites a specific CallPeer to it given by her String URI. |
Call |
createCall(String callee,
CallGroup group)
Creates a new Call and invites a specific CallPeer to it given by her String URI. |
protected CallSipImpl |
createOutgoingCall()
Initializes a new outgoing Call with no peers in it. |
Iterator<CallSipImpl> |
getActiveCalls()
Returns an iterator over all currently active calls. |
protected ActiveCallsRepositorySipImpl |
getActiveCallsRepository()
Returns a reference to the ActiveCallsRepositorySipImpl that we are
currently using. |
ProtocolProviderServiceSipImpl |
getProtocolProvider()
Returns the protocol provider that this operation set belongs to. |
void |
hangupCallPeer(CallPeer peer)
Ends the call with the specified peer. |
void |
hangupCallPeer(CallPeer peer,
int reasonCode,
String reason)
Ends the call with the specified peer. |
boolean |
isSecure(CallPeer peer)
Returns true to indicate that the call associated with the given peer is secured, otherwise returns false. |
boolean |
processDialogTerminated(javax.sip.DialogTerminatedEvent dialogTerminatedEvent)
Process an asynchronously reported DialogTerminatedEvent. |
boolean |
processIOException(javax.sip.IOExceptionEvent exceptionEvent)
Process an asynchronously reported IO Exception. |
boolean |
processRequest(javax.sip.RequestEvent requestEvent)
Processes a Request received on a SipProvider upon which this SipListener is registered. |
boolean |
processResponse(javax.sip.ResponseEvent responseEvent)
Analyzes the incoming responseEvent and then forwards it to the proper event handler. |
boolean |
processTimeout(javax.sip.TimeoutEvent timeoutEvent)
Processes a retransmit or expiration Timeout of an underlying Transactionhandled by this SipListener. |
boolean |
processTransactionTerminated(javax.sip.TransactionTerminatedEvent transactionTerminatedEvent)
Process an asynchronously reported TransactionTerminatedEvent. |
void |
putOffHold(CallPeer peer)
Resumes communication with a call peer previously put on hold. |
void |
putOnHold(CallPeer peer)
Puts the specified CallPeer "on hold". |
void |
setMute(Call call,
boolean mute)
Sets the mute state of the Call. |
void |
setTransferAuthority(TransferAuthority authority)
Transfer authority used for interacting with user for unknown calls and the requests for transfer. |
void |
shutdown()
Closes all active calls. |
String |
toString()
Returns a string representation of this OperationSetBasicTelephony instance including information that would permit to distinguish it among other instances when reading a log file. |
void |
transfer(CallPeer transferee,
CallPeer transferTarget)
Transfers the call we have with transferee to transferTarget. |
void |
transfer(CallPeer peer,
String target)
Transfers (in the sense of call transfer) a specific CallPeer to a specific callee address which already participates in an active Call. |
| Methods inherited from class net.java.sip.communicator.service.protocol.media.AbstractOperationSetBasicTelephony |
|---|
addCallListener, createRecorder, fireCallEvent, fireCallEvent, removeCallListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicTelephony |
|---|
addCallListener, createRecorder, removeCallListener |
| Constructor Detail |
|---|
public OperationSetBasicTelephonySipImpl(ProtocolProviderServiceSipImpl protocolProvider)
protocolProvider - a reference to the
ProtocolProviderServiceSipImpl instance that created
us.| Method Detail |
|---|
public Call createCall(String callee)
throws OperationFailedException,
ParseException
createCall in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>callee - the address of the callee who we should invite to a new
Call
OperationFailedException - with the corresponding code if we fail
to create the call
ParseException - if callee is not a valid SIP address
StringOperationSetBasicTelephony.createCall(String)
public Call createCall(Contact callee)
throws OperationFailedException
createCall in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>callee - the address of the callee who we should invite to a new
call
OperationFailedException - with the corresponding code if we fail
to create the callOperationSetBasicTelephony.createCall(Contact)
public Call createCall(String callee,
CallGroup group)
throws OperationFailedException,
ParseException
createCall in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>callee - the address of the callee who we should invite to a new
Callgroup - CallGroup from which the Call will belong
OperationFailedException - with the corresponding code if we fail
to create the call
ParseException - if callee is not a valid SIP address
String
public Call createCall(Contact callee,
CallGroup group)
throws OperationFailedException
createCall in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>callee - the address of the callee who we should invite to a new
callgroup - CallGroup from which the Call will belong
OperationFailedException - with the corresponding code if we fail
to create the call
protected CallSipImpl createOutgoingCall()
throws OperationFailedException
createOutgoingCall(Address,
javax.sip.message.Message,CallGroup).
OperationFailedException - if initializing the new outgoing
Call failspublic Iterator<CallSipImpl> getActiveCalls()
getActiveCalls in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>protected ActiveCallsRepositorySipImpl getActiveCallsRepository()
ActiveCallsRepositorySipImpl that we are
currently using.
ActiveCallsRepositorySipImpl that we are
currently using.
public void putOffHold(CallPeer peer)
throws OperationFailedException
putOffHold in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>peer - the call peer to put on hold.
OperationFailedException - if we fail to construct or send the
INVITE request putting the remote side on/off hold.
public void putOnHold(CallPeer peer)
throws OperationFailedException
putOnHold in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>peer - the peer that we'd like to put on hold.
OperationFailedException - if we fail to construct or send the
INVITE request putting the remote side on/off hold.public boolean processRequest(javax.sip.RequestEvent requestEvent)
processRequest in interface MethodProcessorrequestEvent - requestEvent fired from the SipProvider to the
SipListener representing a Request received from the network.
public boolean processTransactionTerminated(javax.sip.TransactionTerminatedEvent transactionTerminatedEvent)
processTransactionTerminated in interface MethodProcessortransactionTerminatedEvent - -- an event that indicates that the
transaction has transitioned into the terminated state.
public boolean processResponse(javax.sip.ResponseEvent responseEvent)
processResponse in interface MethodProcessorresponseEvent - the responseEvent that we received
ProtocolProviderService.
public boolean processTimeout(javax.sip.TimeoutEvent timeoutEvent)
Transactionhandled by this SipListener. This Event notifies the
application that a retransmission or transaction Timer expired in the
SipProvider's transaction state machine. The TimeoutEvent encapsulates
the specific timeout type and the transaction identifier either client or
server upon which the timeout occurred. The type of Timeout can by
determined by:
timeoutType = timeoutEvent.getTimeout().getValue();
processTimeout in interface MethodProcessortimeoutEvent - the timeoutEvent received indicating either the
message retransmit or transaction timed out.
public boolean processIOException(javax.sip.IOExceptionEvent exceptionEvent)
processIOException in interface MethodProcessorexceptionEvent - The Exception event that is reported to the
application.
public boolean processDialogTerminated(javax.sip.DialogTerminatedEvent dialogTerminatedEvent)
processDialogTerminated in interface MethodProcessordialogTerminatedEvent - -- an event that indicates that the dialog
has transitioned into the terminated state.
public void hangupCallPeer(CallPeer peer)
throws ClassCastException,
OperationFailedException
hangupCallPeer in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>peer - the peer that we'd like to hang up on.
ClassCastException - if peer is not an instance of this
CallPeerSipImpl.
OperationFailedException - if we fail to terminate the call.
public void hangupCallPeer(CallPeer peer,
int reasonCode,
String reason)
throws ClassCastException,
OperationFailedException
hangupCallPeer in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>peer - the peer that we'd like to hang up on.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 failure
ClassCastException - if peer is not an instance of this
CallPeerSipImpl.
OperationFailedException - if we fail to terminate the call.
public void answerCallPeer(CallPeer peer)
throws OperationFailedException,
ClassCastException
answerCallPeer in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>peer - the call peer that we need to send the ok to.
OperationFailedException - if we fail to create or send the
response.
ClassCastException - if peer is not an instance of a
CallPeerSipImplpublic String toString()
toString in class Objectpublic void shutdown()
public void setMute(Call call,
boolean mute)
Muting audio streams sent from the call is implementation specific and one of the possible approaches to it is sending silence.
setMute in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>setMute in class AbstractOperationSetBasicTelephony<ProtocolProviderServiceSipImpl>call - the Call whose mute state is setmute - true to mute the call streams being sent to
peers; otherwise, falsepublic boolean isSecure(CallPeer peer)
isSecure in interface OperationSetSecureTelephonypeer - the CallPeer whose security we'd like to check.
public void transfer(CallPeer transferee,
CallPeer transferTarget)
throws OperationFailedException
transfer in interface OperationSetAdvancedTelephony<ProtocolProviderServiceSipImpl>transferee - the CallPeer that we are about to transfer.transferTarget - the CallPeer that we are about to direct
transferee to.
OperationFailedException - if the transfer fails.
public void transfer(CallPeer peer,
String target)
throws OperationFailedException
The method is suitable for providing the implementation of attended call transfer (though no such requirement is imposed).
transfer in interface OperationSetAdvancedTelephony<ProtocolProviderServiceSipImpl>peer - the CallPeer to be transfered to the specified
callee addresstarget - the address in the form of CallPeer of the callee
to transfer peer to
OperationFailedException - if creating or sending the transferring
INVITE request fails.public ProtocolProviderServiceSipImpl getProtocolProvider()
getProtocolProvider in interface OperationSetBasicTelephony<ProtocolProviderServiceSipImpl>public void setTransferAuthority(TransferAuthority authority)
setTransferAuthority in interface OperationSetAdvancedTelephony<ProtocolProviderServiceSipImpl>authority - transfer authority.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||