SIGN UP

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

void addCallListener(ICallListener listener)

Add ICallListener listener to handle call events.

Parameters

answer

Deprecated
void answer(String customData, VideoFlags videoFlags, Map<String,String> headers)

Starting 2.6.0 use ICall.answer(CallSettings)

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

Parameters

  • customData:

    String

    Custom string associated with the call session. It can be passed to the cloud to be obtained from the CallAlerting event or Call History using HTTP API. Maximum size is 200 bytes. Use the ICall.sendMessage(String) method to pass a string over the limit; in order to pass a large data use media_session_access_url on your backend

  • videoFlags:

    VideoFlags

    Specify video settings (send and receive) for the new call

  • headers:

    Map<String,String>

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

Throws

  • type:

    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.

answer

Since 2.6.0
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.

Throws

  • type:

    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.

long getCallDuration()

Get the call duration

Returns

  • Return:

    long

    the call duration in milliseconds

String getCallId()

Get the call id.

Returns

  • Return:

    String

    The call id

Map<QualityIssue,QualityIssueLevel> getCurrentQualityIssues()

Get current status for all quality issues.

Returns

List<IEndpoint> getEndpoints()

Get list of the endpoints associated with the call.

Returns

  • Return:

    List<IEndpoint>

    List of the endpoints associated with the call

List<IAudioStream> getLocalAudioStreams()

Get all active local audio streams of the call.

Returns

List<IVideoStream> getLocalVideoStreams()

Get all active local video streams of the call.

Returns

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

void hold(boolean enable, ICallCompletionHandler handler)

Hold or unhold the call

Parameters

boolean isVideoEnabled()

Check if video is enabled in the call.

Returns

  • Return:

    boolean

    True if video send or receive is enabled by current user, false otherwise

void receiveVideo(ICallCompletionHandler handler)

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

Parameters

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

Throws

  • type:

    CallException if the call is already answered or ended

void removeCallListener(ICallListener listener)

Remove previously added ICallListener

Parameters

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

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

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(Map) or ICall.answer(String, VideoFlags, Map) 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

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(Map) or ICall.answer(String, VideoFlags, Map) are called) or is established (i.e. ICallListener.onCallConnected(ICall, Map) is invoked.

Parameters

  • text:

    String

    Message text

void sendVideo(boolean enable, ICallCompletionHandler handler)

Start or stop sending video for the call.
For the non-conference video call stops or starts video send (video stream is removed or added).
Starting 2.5.0 for the conference video call mutes or un-mutes video send (video stream in the 'muted' state will still consume a small bandwidth).

Parameters

void setQualityIssueListener(IQualityIssueListener listener)

Set IQualityIssueListener to monitor issues that affect call quality.

Parameters

start

Deprecated
void start(Map<String,String> headers)

Starting 2.6.0 use ICall.start()

Start outgoing 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

Throws

  • type:

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

start

Since 2.6.0
void start()

Start outgoing call.

Throws

  • type:

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

void useCustomVideoSource(ICustomVideoSource videoSource)

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

Parameters