Rate this page:

ICall

Interface that may be used for call operations like answer, reject, hang up and mid-call operations like hold, start/stop video and others.

Methods

addCallListener

Copy URL

void

addCallListener(

ICallListener

listener
)

Add ICallListener listener to handle call events.

Parameters

Returns

  • type:

    void

answer

Copy URL

void

answer(

CallSettings

callSettings
)

Answer the call. Should be used only for incoming call.

Parameters

  • callSettings:

    CallSettings

    Call settings with additional call parameters, such as preferred video codec, custom data, extra headers etc.

Returns

  • type:

    void

Throws

CallException if the call is already answered or in case if RECORD_AUDIO (for audio and video call) or CAMERA (for video call) permissions are not granted.

getCallDuration

Copy URL

long

getCallDuration()

Get the call duration

Returns

  • type:

    long

getCallId

Copy URL

String

getCallId()

Get the call id.

Returns

  • type:

    String

getCurrentQualityIssues

Since ver. 2.6.0
Copy URL

Map<QualityIssue, QualityIssueLevel>

getCurrentQualityIssues()

Get current status for all quality issues.

getEndpoints

Copy URL

List<IEndpoint>

getEndpoints()

Get list of the endpoints associated with the call.

Returns

getLocalAudioStreams

Copy URL

List<IAudioStream>

getLocalAudioStreams()

Get all active local audio streams of the call.

Returns

getLocalVideoStreams

Copy URL

List<IVideoStream>

getLocalVideoStreams()

Get all active local video streams of the call.

Returns

hangup

Copy URL

void

hangup(

Map<String, String>

headers
)

Hang up the call.

Parameters

  • headers:

    Map<String, String>

    Optional set of headers to be sent to Voximplant Cloud. Names must begin with "X-" to be processed by SDK

Returns

  • type:

    void

hold

Copy URL

void

hold(

boolean

enable,

ICallCompletionHandler

handler
)

Hold or unhold the call

Parameters

Returns

  • type:

    void

isVideoEnabled

Copy URL

boolean

isVideoEnabled()

Check if video is enabled in the call.

Returns

  • type:

    boolean

receiveVideo

Copy URL

void

receiveVideo(

ICallCompletionHandler

handler
)

Start receive video if video receive was disabled before. Stop receiving video during the call is not supported.

Parameters

Returns

  • type:

    void

reject

Copy URL

void

reject(

RejectMode

mode,

Map<String, String>

headers
)

Reject the call. Should be used only for incoming call.

Parameters

  • Specify RejectMode

  • headers:

    Map<String, String>

    Optional set of headers to be sent to Voximplant Cloud. Names must begin with "X-" to be processed by SDK

Returns

  • type:

    void

Throws

CallException if the call is already answered or ended

removeCallListener

Copy URL

void

removeCallListener(

ICallListener

listener
)

Remove previously added ICallListener

Parameters

Returns

  • type:

    void

sendAudio

Copy URL

void

sendAudio(

boolean

enable
)

Enables or disables audio transfer from microphone into the call.

Parameters

  • enable:

    boolean

    True if audio should be sent, false otherwise

Returns

  • type:

    void

sendDTMF

Copy URL

void

sendDTMF(

String

tone
)

Send DTMFs in the call. DTMFs will be sent only if the call is established, i.e. ICallListener.onCallConnected(ICall, Map) is invoked

Parameters

  • tone:

    String

    DTMFs

Returns

  • type:

    void

sendInfo

Copy URL

void

sendInfo(

String

mimeType,

String

content,

Map<String, String>

headers
)

Send INFO message within the call.

INFO message will be sent if the call is establishing (i.e. ICall.start() or ICall.answer(CallSettings) are called) or is established (i.e. ICallListener.onCallConnected(ICall, Map) is invoked.

Parameters

  • mimeType:

    String

    MIME type of info

  • content:

    String

    Custom string data

  • headers:

    Map<String, String>

    Optional set of headers to be sent with message. Names must begin with "X-" to be processed by SDK

Returns

  • type:

    void

sendMessage

Copy URL

void

sendMessage(

String

text
)

Send message within the call.

Implemented atop SIP INFO for communication between call endpoint and Voximplant cloud, and is separated from Voximplant messaging API.

The message will be sent if the call is establishing (i.e. ICall.start() or ICall.answer(CallSettings) are called) or is established (i.e. ICallListener.onCallConnected(ICall, Map) is invoked.

Parameters

  • text:

    String

    Message text

Returns

  • type:

    void

sendVideo

Copy URL

void

sendVideo(

boolean

enable,

ICallCompletionHandler

handler
)

Start or stop sending video for the call.

Other call participants will receive IEndpointListener.onRemoteVideoStreamAdded(IEndpoint, IVideoStream) or IEndpointListener.onRemoteVideoStreamRemoved(IEndpoint, IVideoStream) events.

Starting the version 2.20.4 the API behaves the same way for conference and video calls.

For the version 2.20.3 and below for the conference video call mutes or un-mutes video send (video stream in the 'muted' state will still consume a small bandwidth).

Parameters

Returns

  • type:

    void

setQualityIssueListener

Since ver. 2.6.0
Copy URL

void

setQualityIssueListener(

IQualityIssueListener

listener
)

Set IQualityIssueListener to monitor issues that affect call quality.

Parameters

Returns

  • type:

    void

start

Since ver. 2.6.0
Copy URL

void

start()

Start outgoing call.

Returns

  • type:

    void

Throws

CallException if the call is already started, if RECORD_AUDIO (for audio and video call) or CAMERA (for video call) permissions are not granted, if the method is called for incoming call

startScreenSharing

Since ver. 2.18.0
Copy URL

void

startScreenSharing(

Intent

permissionResultData,

ICallCompletionHandler

handler
)

Start sharing screen.

Requires Android API 21.

Before calling this method, it is required to get user permission to start screen sharing using ScreenCaptureIntent.

Video of the screen is sent in HD quality (720p).

Use ICall.sendVideo(boolean, ICallCompletionHandler) to stop screen sharing:

  1. with "enable" parameter as "true" - will start sending video from camera or ICustomVideoSource
  2. with "enable" parameter as "false" - will stop sending video within the call

Parameters

  • permissionResultData:

    Intent

    Intent that return result data of screen capture request

  • Object to receive the result of this operation.

Returns

  • type:

    void

useCustomVideoSource

Copy URL

void

useCustomVideoSource(

ICustomVideoSource

videoSource
)

Set ICustomVideoSource instance for the call to send video frames. It will be used instead of camera.

Parameters

Returns

  • type:

    void