Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetBasicTelephony<T extends ProtocolProviderService>

Type Parameters:
T - the provider extension class like for example ProtocolProviderServiceSipImpl or ProtocolProviderServiceJabberImpl
All Superinterfaces:
OperationSet
All Known Subinterfaces:
OperationSetAdvancedTelephony<T>
All Known Implementing Classes:
AbstractOperationSetBasicTelephony, MockOperationSetBasicTelephony, OperationSetBasicTelephonyGibberishImpl, OperationSetBasicTelephonyJabberImpl, OperationSetBasicTelephonySipImpl

public interface OperationSetBasicTelephony<T extends ProtocolProviderService>
extends OperationSet

An Operation Set defining all basic telephony operations such as conducting simple calls and etc. Note that video is not considered as a part of a supplementary operation set and if included in the service should be available behind the basic telephony set.

Author:
Emil Ivov, Lyubomir Marinov

Field Summary
static int HANGUP_REASON_ENCRYPTION_REQUIRED
          Reason code used to hangup peer if call was not encrypted.
static int HANGUP_REASON_NORMAL_CLEARING
          Reason code used to hangup peer, indicates normal hangup.
static int HANGUP_REASON_TIMEOUT
          Reason code used to hangup peer when we wait for some event and it timeouted.
static String MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME
          The name of the property that contains the maximum port number that we'd like our RTP managers to bind upon.
static String MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME
          The name of the property that contains the minimum port number that we'd like our RTP managers to bind upon.
 
Method Summary
 void addCallListener(CallListener listener)
          Registers the specified CallListener with this provider so that it could be notified when incoming calls are received.
 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 uri)
          Creates a new Call and invites a specific CallPeer to it given by her String URI.
 Call createCall(String uri, CallGroup group)
          Creates a new Call and invites a specific CallPeer to it given by her String URI.
 Recorder createRecorder(Call call)
          Creates a new Recorder which is to record the specified Call (into a file which is to be specified when starting the returned Recorder).
 Iterator<? extends Call> getActiveCalls()
          Returns an iterator over all currently active calls.
 T getProtocolProvider()
          Returns the protocol provider that this operation set belongs to.
 void hangupCallPeer(CallPeer peer)
          Indicates a user request to end a call with the specified call peer.
 void hangupCallPeer(CallPeer peer, int reasonCode, String reason)
          Ends the call with the specified peer.
 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 removeCallListener(CallListener listener)
          Removes the specified listener from the list of call listeners.
 void setMute(Call call, boolean mute)
          Sets the mute state of the Call.
 

Field Detail

MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME

static final String MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME
The name of the property that contains the minimum port number that we'd like our RTP managers to bind upon.

See Also:
Constant Field Values

MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME

static final String MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME
The name of the property that contains the maximum port number that we'd like our RTP managers to bind upon.

See Also:
Constant Field Values

HANGUP_REASON_NORMAL_CLEARING

static final int HANGUP_REASON_NORMAL_CLEARING
Reason code used to hangup peer, indicates normal hangup.

See Also:
Constant Field Values

HANGUP_REASON_TIMEOUT

static final int HANGUP_REASON_TIMEOUT
Reason code used to hangup peer when we wait for some event and it timeouted.

See Also:
Constant Field Values

HANGUP_REASON_ENCRYPTION_REQUIRED

static final int HANGUP_REASON_ENCRYPTION_REQUIRED
Reason code used to hangup peer if call was not encrypted.

See Also:
Constant Field Values
Method Detail

addCallListener

void addCallListener(CallListener listener)
Registers the specified CallListener with this provider so that it could be notified when incoming calls are received. This method is called by the implementation of the PhoneUI service.

Parameters:
listener - the listener to register with this provider.

removeCallListener

void removeCallListener(CallListener listener)
Removes the specified listener from the list of call listeners.

Parameters:
listener - the listener to unregister.

createCall

Call createCall(String uri)
                throws OperationFailedException,
                       ParseException
Creates a new Call and invites a specific CallPeer to it given by her String URI.

Parameters:
uri - the address of the callee who we should invite to a new Call
Returns:
a newly created Call. The specified callee is available in the Call as a CallPeer
Throws:
OperationFailedException - with the corresponding code if we fail to create the call
ParseException - if callee is not a valid SIP address String

createCall

Call createCall(Contact callee)
                throws OperationFailedException
Creates a new Call and invites a specific CallPeer to it given by her Contact.

Parameters:
callee - the address of the callee who we should invite to a new call
Returns:
a newly created Call. The specified callee is available in the Call as a CallPeer
Throws:
OperationFailedException - with the corresponding code if we fail to create the call

createCall

Call createCall(String uri,
                CallGroup group)
                throws OperationFailedException,
                       ParseException
Creates a new Call and invites a specific CallPeer to it given by her String URI.

Parameters:
uri - the address of the callee who we should invite to a new Call
group - CallGroup from which the Call will belong
Returns:
a newly created Call. The specified callee is available in the Call as a CallPeer
Throws:
OperationFailedException - with the corresponding code if we fail to create the call
ParseException - if callee is not a valid SIP address String

createCall

Call createCall(Contact callee,
                CallGroup group)
                throws OperationFailedException
Creates a new Call and invites a specific CallPeer to it given by her Contact.

Parameters:
callee - the address of the callee who we should invite to a new call
group - CallGroup from which the Call will belong
Returns:
a newly created Call. The specified callee is available in the Call as a CallPeer
Throws:
OperationFailedException - with the corresponding code if we fail to create the call

answerCallPeer

void answerCallPeer(CallPeer peer)
                    throws OperationFailedException
Indicates a user request to answer an incoming call from the specified CallPeer.

Parameters:
peer - the call peer that we'd like to answer.
Throws:
OperationFailedException - with the corresponding code if we encounter an error while performing this operation.

putOnHold

void putOnHold(CallPeer peer)
               throws OperationFailedException
Puts the specified CallPeer "on hold". In other words incoming media flows are not played and outgoing media flows are either muted or stopped, without actually interrupting the session.

Parameters:
peer - the peer that we'd like to put on hold.
Throws:
OperationFailedException - with the corresponding code if we encounter an error while performing this operation.

putOffHold

void putOffHold(CallPeer peer)
                throws OperationFailedException
Resumes communication with a call peer previously put on hold. If the specified peer is not "On Hold" at the time putOffHold is called, the method has no effect.

Parameters:
peer - the call peer to put on hold.
Throws:
OperationFailedException - with the corresponding code if we encounter an error while performing this operation

hangupCallPeer

void hangupCallPeer(CallPeer peer)
                    throws OperationFailedException
Indicates a user request to end a call with the specified call peer.

Parameters:
peer - the peer that we'd like to hang up on.
Throws:
OperationFailedException - with the corresponding code if we encounter an error while performing this operation.

hangupCallPeer

void hangupCallPeer(CallPeer peer,
                    int reasonCode,
                    String reason)
                    throws OperationFailedException
Ends the call with the specified peer.

Parameters:
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
Throws:
OperationFailedException - if we fail to terminate the call.

getActiveCalls

Iterator<? extends Call> getActiveCalls()
Returns an iterator over all currently active calls.

Returns:
Iterator

setMute

void setMute(Call call,
             boolean mute)
Sets the mute state of the Call.

Muting audio streams sent from the call is implementation specific and one of the possible approaches to it is sending silence.

Parameters:
call - the Call whos mute state is set
mute - true to mute the call streams being sent to peers; otherwise, false

getProtocolProvider

T getProtocolProvider()
Returns the protocol provider that this operation set belongs to.

Returns:
a reference to the ProtocolProviderService that created this operation set.

createRecorder

Recorder createRecorder(Call call)
                        throws OperationFailedException
Creates a new Recorder which is to record the specified Call (into a file which is to be specified when starting the returned Recorder).

Parameters:
call - the Call which is to be recorded by the returned Recorder when the latter is started
Returns:
a new Recorder which is to record the specified call (into a file which is to be specified when starting the returned Recorder)
Throws:
OperationFailedException - if anything goes wrong while creating the new Recorder for the specified call

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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