Modifier and Type | Interface and Description |
---|---|
static class |
Call.Dir |
static class |
Call.State |
static class |
Call.Status |
Modifier and Type | Method and Description |
---|---|
int |
accept()
Accept an incoming call.
|
int |
acceptEarlyMedia()
Accept an early media session for an incoming call.
|
int |
acceptEarlyMediaWithParams(@Nullable CallParams params)
When receiving an incoming, accept to start a media session as early-media.
|
int |
acceptUpdate(@Nullable CallParams params)
Accept call modifications initiated by other end.
|
int |
acceptWithParams(@Nullable CallParams params)
Accept an incoming call, with parameters.
|
void |
addListener(CallListener listener) |
boolean |
askedToAutoanswer()
Tell whether a call has been asked to autoanswer.
|
boolean |
cameraEnabled()
Returns true if camera pictures are allowed to be sent to the remote party.
|
void |
cancelDtmfs()
Stop current DTMF sequence sending.
|
int |
decline(Reason reason)
Decline a pending incoming call, with a reason.
|
int |
declineWithErrorInfo(ErrorInfo ei)
Decline a pending incoming call, with a
ErrorInfo object. |
int |
deferUpdate()
When receiving a #LinphoneCallUpdatedByRemote state notification, prevent
Core from performing an automatic answer. |
boolean |
echoCancellationEnabled()
Returns true if echo cancellation is enabled.
|
boolean |
echoLimiterEnabled()
Returns true if echo limiter is enabled.
|
void |
enableCamera(boolean enabled)
Indicate whether camera input should be sent to remote end.
|
void |
enableEchoCancellation(boolean val)
Enables or disable echo cancellation for this call.
|
void |
enableEchoLimiter(boolean val)
Enables or disable echo limiter for this call.
|
java.lang.String |
getAuthenticationToken()
Returns the ZRTP authentication token to verify.
|
boolean |
getAuthenticationTokenVerified()
Returns whether ZRTP authentication token is verified.
|
float |
getAverageQuality()
Returns call quality averaged over all the duration of the call.
|
CallLog |
getCallLog()
Gets the call log associated to this call.
|
ChatRoom |
getChatRoom()
Create a new chat room for messaging from a call if not already existing, else
return existing one.
|
Conference |
getConference()
Return the associated conference object.
|
Core |
getCore()
Get the core that has created the specified call.
|
CallParams |
getCurrentParams()
Returns current parameters associated to the call.
|
float |
getCurrentQuality()
Obtain real-time quality rating of the call.
|
Call.Dir |
getDir()
Returns direction of the call (incoming or outgoing).
|
Address |
getDiversionAddress()
Returns the diversion address associated to this call.
|
int |
getDuration()
Returns call's duration in seconds.
|
ErrorInfo |
getErrorInfo()
Returns full details about call errors or termination reasons.
|
boolean |
getMicrophoneMuted()
Get microphone muted state.
|
float |
getMicrophoneVolumeGain()
Get microphone volume gain.
|
java.lang.Object |
getNativeVideoWindowId()
Get the native window handle of the video window, casted as an unsigned long.
|
CallParams |
getParams()
Returns local parameters associated with the call.
|
Player |
getPlayer()
Get a player associated with the call to play a local file and stream it to the
remote peer.
|
float |
getPlayVolume()
Get the mesured playback volume level (received from remote) in dbm0.
|
Reason |
getReason()
Returns the reason for a call termination (either error or normal termination)
|
float |
getRecordVolume()
Get the mesured record volume level (sent to remote) in dbm0.
|
java.lang.String |
getReferTo()
Gets the refer-to uri (if the call was transfered).
|
Address |
getRemoteAddress()
Returns the remote address associated to this call.
|
java.lang.String |
getRemoteAddressAsString()
Returns the remote address associated to this call as a string.
|
java.lang.String |
getRemoteContact()
Returns the far end's sip contact as a string, if available.
|
CallParams |
getRemoteParams()
Returns call parameters proposed by remote.
|
java.lang.String |
getRemoteUserAgent()
Returns the far end's user agent description string, if available.
|
Call |
getReplacedCall()
Returns the call object this call is replacing, if any.
|
boolean |
getSpeakerMuted()
Get speaker muted state.
|
float |
getSpeakerVolumeGain()
Get speaker volume gain.
|
Call.State |
getState()
Retrieves the call's current state.
|
CallStats |
getStats(StreamType type)
Return a copy of the call statistics for a particular stream type.
|
int |
getStreamCount()
Returns the number of stream for the given call.
|
Address |
getToAddress()
Returns the to address with its headers associated to this call.
|
java.lang.String |
getToHeader(java.lang.String name)
Returns the value of the header name.
|
Call |
getTransfererCall()
Gets the transferer if this call was started automatically as a result of an
incoming transfer request.
|
Call.State |
getTransferState()
Returns the current transfer state, if a transfer has been initiated from this
call.
|
Call |
getTransferTargetCall()
When this call has received a transfer request, returns the new call that was
automatically created as a result of the transfer.
|
java.lang.Object |
getUserData()
Gets the object stored in this object user's data
|
boolean |
hasTransferPending()
Returns true if this calls has received a transfer that has not been executed
yet.
|
boolean |
isRecording()
Returns whether or not the call is currently being recorded.
|
boolean |
mediaInProgress()
Indicates whether an operation is in progress at the media side.
|
void |
oglRender()
Call generic OpenGL render for a given call.
|
int |
pause()
Pauses the call.
|
int |
redirect(java.lang.String redirectUri)
Redirect the specified call to the given redirect URI.
|
void |
removeListener(CallListener listener) |
void |
requestNotifyNextVideoFrameDecoded()
Request the callback passed to linphone_call_cbs_set_next_video_frame_decoded
to be called the next time the video decoder properly decodes a video frame.
|
int |
resume()
Resumes a call.
|
int |
sendDtmf(char dtmf)
Send the specified dtmf.
|
int |
sendDtmfs(java.lang.String dtmfs)
Send a list of dtmf.
|
int |
sendInfoMessage(InfoMessage info)
Send a
InfoMessage through an established call. |
void |
sendVfuRequest()
Request remote side to send us a Video Fast Update.
|
void |
setAuthenticationTokenVerified(boolean verified)
Set the result of ZRTP short code verification by user.
|
void |
setMicrophoneMuted(boolean muted)
Set microphone muted state.
|
void |
setMicrophoneVolumeGain(float volume)
Set microphone volume gain.
|
void |
setNativeVideoWindowId(java.lang.Object id)
Set the native video window id where the video is to be displayed.
|
void |
setParams(CallParams params)
Set call parameters - advanced and not recommended feature - use with caution.
|
void |
setSpeakerMuted(boolean muted)
Set speaker muted state.
|
void |
setSpeakerVolumeGain(float volume)
Set speaker volume gain.
|
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
void |
startRecording()
Start call recording.
|
void |
stopRecording()
Stop call recording.
|
int |
takePreviewSnapshot(java.lang.String file)
Take a photo of currently captured video and write it into a jpeg file.
|
int |
takeVideoSnapshot(java.lang.String file)
Take a photo of currently received video and write it into a jpeg file.
|
int |
terminate()
Terminates a call.
|
int |
terminateWithErrorInfo(ErrorInfo ei)
Terminates a call.
|
int |
transfer(java.lang.String referTo)
Performs a simple call transfer to the specified destination.
|
int |
transferToAnother(Call dest)
Transfers a call to destination of another running call.
|
int |
update(@Nullable CallParams params)
Updates a running call according to supplied call parameters or parameters
changed in the LinphoneCore.
|
void |
zoom(float zoomFactor,
float cx,
float cy)
Perform a zoom of the video displayed during a call.
|
java.lang.String getAuthenticationToken()
boolean getAuthenticationTokenVerified()
setAuthenticationTokenVerified(boolean)
.void setAuthenticationTokenVerified(boolean verified)
verified
- whether the ZRTP SAS is verified.float getAverageQuality()
getCurrentQuality()
for more details about quality measurement.CallLog getCallLog()
boolean cameraEnabled()
void enableCamera(boolean enabled)
ChatRoom getChatRoom()
ChatRoom
where messaging can take place.Conference getConference()
Conference
or null if the call is not part of any
conference.Core getCore()
Core
object that has created the specified call.CallParams getCurrentParams()
float getCurrentQuality()
Call.Dir getDir()
Address getDiversionAddress()
int getDuration()
boolean echoCancellationEnabled()
void enableEchoCancellation(boolean val)
val
- boolean echoLimiterEnabled()
void enableEchoLimiter(boolean val)
val
- ErrorInfo getErrorInfo()
ErrorInfo
object holding the reason error.boolean isRecording()
boolean getMicrophoneMuted()
void setMicrophoneMuted(boolean muted)
muted
- The microphone muted state.float getMicrophoneVolumeGain()
void setMicrophoneVolumeGain(float volume)
volume
- Percentage of the max supported gain. Valid values are in [ 0.0 :
1.0 ].java.lang.Object getNativeVideoWindowId()
void setNativeVideoWindowId(java.lang.Object id)
CallParams getParams()
Core.inviteAddressWithParams(org.linphone.core.Address, org.linphone.core.CallParams)
or acceptWithParams(org.linphone.core.CallParams)
, or some default
parameters if no CallParams
was explicitely passed during call
initiation.void setParams(CallParams params)
Core.inviteAddressWithParams(org.linphone.core.Address, org.linphone.core.CallParams)
or acceptWithParams(org.linphone.core.CallParams)
. However, in some cases it might be desirable from a
software design standpoint to modify local parameters outside of the
application layer, typically in the purpose of implementing a custom logic
including special headers in INVITE or 200Ok requests, driven by a
call_state_changed listener method. This function accepts to assign a new
CallParams
only in #LinphoneCallOutgoingInit and
#LinphoneCallIncomingReceived states.float getPlayVolume()
Player getPlayer()
Player
objectReason getReason()
float getRecordVolume()
java.lang.String getReferTo()
Address getRemoteAddress()
java.lang.String getRemoteAddressAsString()
java.lang.String getRemoteContact()
CallParams getRemoteParams()
java.lang.String getRemoteUserAgent()
Call getReplacedCall()
boolean getSpeakerMuted()
void setSpeakerMuted(boolean muted)
muted
- The speaker muted state.float getSpeakerVolumeGain()
void setSpeakerVolumeGain(float volume)
volume
- Percentage of the max supported gain. Valid values are in [ 0.0 :
1.0 ].Call.State getState()
int getStreamCount()
Address getToAddress()
Call.State getTransferState()
Core.transferCall(org.linphone.core.Call, java.lang.String)
, Core.transferCallToAnother(org.linphone.core.Call, org.linphone.core.Call)
Call getTransferTargetCall()
Call getTransfererCall()
int accept()
Call
object.
The application can later accept the call using this method.int acceptEarlyMedia()
acceptEarlyMediaWithParams(org.linphone.core.CallParams)
with null
parameters.acceptEarlyMediaWithParams(org.linphone.core.CallParams)
int acceptEarlyMediaWithParams(@Nullable @Nullable CallParams params)
accept()
or acceptWithParams(org.linphone.core.CallParams)
.params
- The call parameters to use (can be null)int acceptUpdate(@Nullable @Nullable CallParams params)
deferUpdate()
so that it can have the time to prompt the user.
getRemoteParams()
can be used to get information about the call
parameters requested by the other party, such as whether a video stream is
requested.
When the user accepts or refuse the change, acceptUpdate(org.linphone.core.CallParams)
can be
done to answer to the other party. If params is null, then the same call
parameters established before the update request will continue to be used (no
change). If params is not null, then the update will be accepted according to
the parameters passed. Typical example is when a user accepts to start video,
then params should indicate that video stream should be used (see CallParams.enableVideo(boolean)
).params
- A CallParams
object describing the call parameters to
acceptint acceptWithParams(@Nullable @Nullable CallParams params)
Call
object.
The application can later accept the call using this method.params
- The specific parameters for this call, for example whether video
is accepted or not. Use null to use default parametersboolean askedToAutoanswer()
void cancelDtmfs()
int decline(Reason reason)
reason
- The reason for rejecting the call: LinphoneReasonDeclined or
LinphoneReasonBusyint declineWithErrorInfo(ErrorInfo ei)
ErrorInfo
object.ei
- ErrorInfo
containing more information on the call rejection.int deferUpdate()
Core
from performing an automatic answer.
When receiving a #LinphoneCallUpdatedByRemote state notification (ie an
incoming reINVITE), the default behaviour of Core
is defined by the
"defer_update_default" option of the "sip" section of the config. If this
option is 0 (the default) then the Core
automatically answers the
reINIVTE with call parameters unchanged. However when for example when the
remote party updated the call to propose a video stream, it can be useful to
prompt the user before answering. This can be achieved by calling Core.deferCallUpdate(org.linphone.core.Call)
during the call state notification, to deactivate the
automatic answer that would just confirm the audio but reject the video. Then,
when the user responds to dialog prompt, it becomes possible to call acceptUpdate(org.linphone.core.CallParams)
to answer the reINVITE, with eventually video enabled in the
CallParams
argument.
The #LinphoneCallUpdatedByRemote notification can also arrive when receiving an
INVITE without SDP. In such case, an unchanged offer is made in the 200Ok, and
when the ACK containing the SDP answer is received,
#LinphoneCallUpdatedByRemote is triggered to notify the application of possible
changes in the media session. However in such case defering the update has no
meaning since we just generating an offer.deferUpdate()
was done outside a
valid #LinphoneCallUpdatedByRemote notificationCallStats getStats(StreamType type)
type
- the stream typejava.lang.String getToHeader(java.lang.String name)
boolean hasTransferPending()
boolean mediaInProgress()
void oglRender()
int pause()
Core.setPlayFile(java.lang.String)
, this file will
be played to the remote user. The only way to resume a paused call is to call
resume()
.resume()
int redirect(java.lang.String redirectUri)
redirectUri
- The URI to redirect the call tovoid requestNotifyNextVideoFrameDecoded()
int resume()
pause()
.pause()
int sendDtmf(char dtmf)
dtmf
- The dtmf name specified as a char, such as '0', '#' etc...int sendDtmfs(java.lang.String dtmfs)
dtmfs
- A dtmf sequence such as '123#123123'int sendInfoMessage(InfoMessage info)
InfoMessage
through an established call.info
- the info messagevoid sendVfuRequest()
void startRecording()
CallParams.setRecordFile(java.lang.String)
.void stopRecording()
int takePreviewSnapshot(java.lang.String file)
file
- a path where to write the jpeg content.int takeVideoSnapshot(java.lang.String file)
file
- a path where to write the jpeg content.int terminate()
int terminateWithErrorInfo(ErrorInfo ei)
ei
- ErrorInfo
int transfer(java.lang.String referTo)
referTo
- The destination the call is to be refered toint transferToAnother(Call dest)
dest
- A running call whose remote person will receive the transferint update(@Nullable @Nullable CallParams params)
CallParams
argument, then this argument can be omitted and set to null. WARNING: Updating
a call in the #LinphoneCallPaused state will still result in a paused call even
if the media directions set in the params are sendrecv. To resume a paused
call, you need to call resume()
.params
- The new call parameters to use (may be null)void zoom(float zoomFactor, float cx, float cy)
cy
- a floating point number pointing the vertical center of the zoom to
be applied. This value should be between 0.0 and 1.0.void addListener(CallListener listener)
void removeListener(CallListener listener)
void setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()