Rate this page:

VICall

Represents a call.

Methods

answer

Copy URL

Future<void>

answer({

VICallSettings?

settings
}
)

Answers the incoming call.

Additional call parameters are set up via [settings]: video direction for the call, preferred video codec, custom data.

Throws VIException, if an error occurred.

Errors:

Parameters

  • settings:

    VICallSettings?

    Optional

    Additional call parameters like video direction for the call, preferred video codec, custom data.

Returns

  • type:

    Future<void>

currentQualityIssues

Copy URL

Future<Map<VIQualityIssueType, VIQualityIssueLevel>>

currentQualityIssues()

Returns current status for all quality issues.

Returns

decline

Copy URL

Future<void>

decline([

Map<String, String>?

headers]
)

Declines the incoming call.

Should be used only for incoming calls.

Indicates that the user cannot answer the call right now, and VoxEngine terminates the call and any pending calls to other devices of the current user.

Throws VIException, if an error occurred.

Errors:

Parameters

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers

Returns

  • type:

    Future<void>

getCallDuration

Copy URL

Future<int?>

getCallDuration()

Returns the call duration in milliseconds.

Returns

  • type:

    Future<int?>

hangup

Copy URL

Future<void>

hangup([

Map<String, String>?

headers]
)

Disconnects the call.

Parameters

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers

Returns

  • type:

    Future<void>

hold

Copy URL

Future<void>

hold(

bool

enable
)

Puts the call on/off hold.

Throws VIException, if an error occurred.

Errors:

Parameters

  • enable:

    bool

    Whether the call should be hold/unhold.

Returns

  • type:

    Future<void>

receiveVideo

Copy URL

Future<void>

receiveVideo()

Starts receiving video if video receive has been disabled before.

Stops receiving video during the call is not supported.

Throws VIException, if an error occurred.

Errors:

Returns

  • type:

    Future<void>

reject

Copy URL

Future<void>

reject([

Map<String, String>?

headers]
)

Rejects the incoming call.

Should be used only for incoming calls.

Indicates that the user is not available only at a particular device.

Throws VIException, if an error occurred.

Errors:

Parameters

  • headers:

    Map<String, String>?

    Optional

    Optional SIP headers

Returns

  • type:

    Future<void>

sendAudio

Copy URL

Future<void>

sendAudio(

bool

enable
)

Enables or disables audio transfer from microphone into the call.

Parameters

  • enable:

    bool

    Whether the audio should be sent

Returns

  • type:

    Future<void>

sendInfo

Copy URL

Future<void>

sendInfo(

String

mimeType,

String

body,

Map<String, String>?

headers
)

Sends an INFO message within the call.

INFO message is sent, if the call is establishing or established.

Parameters

  • mimeType:

    String

    MIME type of info

  • body:

    String

    Custom string data

  • headers:

    Map<String, String>?

    Optional SIP headers

Returns

  • type:

    Future<void>

sendMessage

Copy URL

Future<void>

sendMessage(

String

message
)

Sends a [message] within the call.

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

Parameters

  • message:

    String

    Message text

Returns

  • type:

    Future<void>

sendTone

Copy URL

Future<void>

sendTone(

String

key
)

Sends DTMFs in the call.

DTMFs can be sent only if the call is connected.

Parameters

  • key:

    String

    DTMFs

Returns

  • type:

    Future<void>

sendVideo

Copy URL

Future<void>

sendVideo(

bool

enable
)

Starts or stops sending video for the call.

Fot the non-conference video call it stops or starts video send (video stream is removed or added).

For the conference call it mutes or un-mutes video send (video stream in the 'muted' state still consumes a small bandwidth).

Throws VIException, if an error occurred.

Errors:

Parameters

  • enable:

    bool

    Whether the video should be sent

Returns

  • type:

    Future<void>

Props

callId

Copy URL

String

callId

Call ID.

Returns

  • type:

    String

callKitUUID

Copy URL

String?

callKitUUID

CallKit UUID that may be used to match an incoming call with a push notification received before.

Implemented for iOS only.

Always null for outgoing call on VICall instance creation.

For outgoing calls it is recommended to set CXStartCallAction.callUUID value to this property on handling CXStartCallAction.

Returns

  • type:

    String?

endpoints

Copy URL

List<VIEndpoint>

endpoints

Endpoints associated with the call.

Returns

localVideoStream

Copy URL

VIVideoStream?

localVideoStream

Active local video stream.

Returns

onCallAudioStarted

Copy URL

VICallAudioStarted?

onCallAudioStarted

Triggered when the endpoint answered the call.

Returns

onCallConnected

Copy URL

VICallConnected?

onCallConnected

Triggered when the call is connected.

Returns

onCallDisconnected

Copy URL

VICallDisconnected?

onCallDisconnected

Triggered when the call is disconnected.

Returns

onCallFailed

Copy URL

VICallFailed?

onCallFailed

Triggered when the call is failed.

Returns

onCallReconnected

Copy URL

VICallReconnected?

onCallReconnected

Triggered when the call is reconnected.

Returns

onCallReconnecting

Copy URL

VICallReconnecting?

onCallReconnecting

Triggered when the call is currently reconnecting.

Returns

onCallRinging

Copy URL

VICallRinging?

onCallRinging

Triggered when a progress tone is received from the endpoint.

Returns

onEndpointAdded

Copy URL

VIEndpointAdded?

onEndpointAdded

Triggered when a new endpoint is added to the call.

Returns

onICECompleted

Copy URL

VIICECompleted?

onICECompleted

Triggered when the ICE connection is completed.

Returns

onICETimeout

Copy URL

VIICETimeout?

onICETimeout

Callback for getting notified about failure to connect peers.

Returns

onLocalVideoStreamAdded

Copy URL

VILocalVideoStreamAdded?

onLocalVideoStreamAdded

Triggered when the local video is added to the call.

onLocalVideoStreamRemoved

Copy URL

VILocalVideoStreamRemoved?

onLocalVideoStreamRemoved

Triggered when the local video is removed from the call.

onMessageReceived

Copy URL

VIMessageReceived?

onMessageReceived

Triggered when a message is received.

Returns

onSIPInfoReceived

Copy URL

VISIPInfoReceived?

onSIPInfoReceived

Triggered when an INFO message in received.

Returns

qualityIssuesStream

Copy URL

Stream<VIQualityIssue>

qualityIssuesStream

Stream to monitor issues that affect call quality.

Quality issues are detected only if a call is connected. If a call is reconnecting, all previously detected issues (if any) are reset, their issue level is changed to None

Returns