Rate this page:

VICall

Represents a call.

Methods

answer

Copy URL

Future<void>

answer([

VICallSettings

callSettings]
)

Answers the incoming call.

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

Throws VIException, if an error occurred.

Errors:

Parameters

  • callSettings:

    VICallSettings

    Optional

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

Returns

  • type:

    Future<void>

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 can't answer the call right now, and VoxEngine will terminate 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

    True if the call should be put on hold, false for unhold

Returns

  • type:

    Future<void>

receiveVideo

Copy URL

Future<void>

receiveVideo()

Starts to receive video if video receive was disabled before.

Stop 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

    True if audio should be sent, false otherwise

Returns

  • type:

    Future<void>

sendInfo

Copy URL

Future<void>

sendInfo(

String

mimeType,

String

body,

Map<String, String>

headers
)

Send INFO message within the call.

INFO message will be 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 [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 will still consume a small bandwidth).

Throws VIException, if an error occurred.

Errors:

Parameters

  • enable:

    bool

    True if video should be sent, false otherwise

Returns

  • type:

    Future<void>

Props

callId

Copy URL

String

callId

The call id.

Returns

  • type:

    String

callKitUUID

Copy URL

String

callKitUUID

The 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

The endpoints associated with the call.

Returns

localVideoStream

Copy URL

VIVideoStream

localVideoStream

The active local video stream.

Returns

onCallAudioStarted

Copy URL

VICallAudioStarted

onCallAudioStarted

Callback for getting notified when the endpoint answered the call.

Returns

onCallConnected

Copy URL

VICallConnected

onCallConnected

Callback for getting notified when the call is connected.

Returns

onCallDisconnected

Copy URL

VICallDisconnected

onCallDisconnected

Callback for getting notified when the call is disconnected.

Returns

onCallFailed

Copy URL

VICallFailed

onCallFailed

Callback for getting notified when the call is failed.

Returns

onCallRinging

Copy URL

VICallRinging

onCallRinging

Callback for getting notified when progress signal is received from the endpoint.

Returns

onEndpointAdded

Copy URL

VIEndpointAdded

onEndpointAdded

Callback for getting notified when new endpoint is added to the call.

Returns

onICECompleted

Copy URL

VIICECompleted

onICECompleted

Callback for getting notified when 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

Callback for getting notified when local video is added to the call.

onLocalVideoStreamRemoved

Copy URL

VILocalVideoStreamRemoved

onLocalVideoStreamRemoved

Callback for getting notified when local video is removed from the call.

onMessageReceived

Copy URL

VIMessageReceived

onMessageReceived

Callback for getting notified when message is received.

Returns

onSIPInfoReceived

Copy URL

VISIPInfoReceived

onSIPInfoReceived

Callback for getting notified when INFO message in received.

Returns