T
- the implementation specific provider class like for example
ProtocolProviderServiceSipImpl.public abstract class AbstractOperationSetBasicTelephony<T extends ProtocolProviderService> extends java.lang.Object implements OperationSetBasicTelephony<T>
HANGUP_REASON_BUSY_HERE, HANGUP_REASON_ENCRYPTION_REQUIRED, HANGUP_REASON_NORMAL_CLEARING, HANGUP_REASON_TIMEOUT, MAX_AUDIO_PORT_NUMBER_PROPERTY_NAME, MAX_DATA_CHANNEL_PORT_NUMBER_PROPERTY_NAME, MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME, MAX_VIDEO_PORT_NUMBER_PROPERTY_NAME, MIN_AUDIO_PORT_NUMBER_PROPERTY_NAME, MIN_DATA_CHANNEL_PORT_NUMBER_PROPERTY_NAME, MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME, MIN_VIDEO_PORT_NUMBER_PROPERTY_NAME
Constructor and Description |
---|
AbstractOperationSetBasicTelephony() |
Modifier and Type | Method and Description |
---|---|
void |
addCallListener(CallListener listener)
Registers listener with this provider so that it
could be notified when incoming calls are received.
|
Call |
createCall(ConferenceDescription cd,
ChatRoom chatRoom)
Creates a new Call and sends an invite to the conference
described in cd.
|
Call |
createCall(Contact callee)
Creates a new Call and invites a specific CallPeer
to it given by her Contact.
|
Call |
createCall(Contact callee,
CallConference conference)
Creates a new Call and invites a specific CallPeer
to it given by her Contact.
|
Call |
createCall(java.lang.String uri)
Creates a new Call and invites a specific CallPeer to
it given by her String URI.
|
org.jitsi.service.neomedia.recording.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).
|
void |
fireCallEvent(CallEvent event)
Creates and dispatches a CallEvent notifying registered
listeners that an event with id eventID has occurred on
sourceCall.
|
void |
fireCallEvent(int eventID,
Call sourceCall)
Creates and dispatches a CallEvent notifying registered
listeners that an event with id eventID has occurred on
sourceCall.
|
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.
|
void |
removeCallListener(CallListener listener)
Removes the listener from the list of call listeners.
|
void |
setMute(Call call,
boolean mute)
Sets the mute state of the Call.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
answerCallPeer, createCall, getActiveCalls, getProtocolProvider, hangupCallPeer, hangupCallPeer, putOffHold, putOnHold
public void addCallListener(CallListener listener)
addCallListener
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
listener
- the listener to register with this provider.public Call createCall(Contact callee) throws OperationFailedException
OperationSetBasicTelephony.createCall(Contact, CallConference)
with null as the CallConference argument.createCall
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
callee
- the address of the callee who we should invite to a new
callOperationFailedException
- with the corresponding code if we fail
to create the callpublic Call createCall(Contact callee, CallConference conference) throws OperationFailedException
OperationSetBasicTelephony.createCall(String, CallConference)
with Contact.getAddress()
as the String argument.createCall
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
callee
- the address of the callee who we should invite to a new
callconference
- the CallConference in which the newly-created
Call is to participateOperationFailedException
- with the corresponding code if we fail
to create the callpublic Call createCall(java.lang.String uri) throws OperationFailedException, java.text.ParseException
OperationSetBasicTelephony.createCall(String, CallConference)
with null as the CallConference argument.createCall
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
uri
- the address of the callee who we should invite to a new
CallOperationFailedException
- with the corresponding code if we fail
to create the calljava.text.ParseException
- if callee is not a valid SIP address
Stringpublic Call createCall(ConferenceDescription cd, ChatRoom chatRoom) throws OperationFailedException
createCall
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
cd
- the conference to send an invite tochatRoom
- the chat room associated with the call.OperationFailedException
public void fireCallEvent(int eventID, Call sourceCall)
eventID
- the ID of the event to dispatchsourceCall
- the call on which the event has occurred.public 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 void fireCallEvent(CallEvent event)
event
- the event to dispatchpublic void removeCallListener(CallListener listener)
removeCallListener
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
listener
- the listener to unregister.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<T extends ProtocolProviderService>
call
- the Call whose mute state is to be setmute
- true to mute the call streams being sent to
peers; otherwise, falsepublic org.jitsi.service.neomedia.recording.Recorder createRecorder(Call call) throws OperationFailedException
AbstractOperationSetBasicTelephony implements the described functionality for MediaAwareCall only; otherwise, does nothing and just returns null.
createRecorder
in interface OperationSetBasicTelephony<T extends ProtocolProviderService>
call
- the Call which is to be recorded by the returned
Recorder when the latter is startedOperationFailedException
- if anything goes wrong while creating
the new Recorder for the specified callOperationSetBasicTelephony.createRecorder(Call)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.