Rate this page:

Call

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

Methods

answer

Copy URL
answer(callSettings: 

CallSettings

):

void

Answer the incoming call.

Parameters

  • callSettings:

    CallSettings

    Optional

    Optional set of call settings.

Returns

  • type:

    void

currentQualityIssues

Copy URL
currentQualityIssues(): 

Promise<{QualityEventTypes: QualityIssueLevel}[],CallError>

Returns current status for all quality issues.

Returns

decline

Copy URL
decline(headers: 

object

):

void

Reject incoming call on all devices, where this user logged in.

Parameters

  • headers:

    object

    Optional

    Optional custom parameters (SIP headers) that should be sent after rejecting incoming call. Parameter names must start with "X-" to be processed by application

Returns

  • type:

    void

getDuration

Copy URL
getDuration(): 

Promise<number,CallError>

Get the call duration in seconds

Returns

getEndpoints

Copy URL
getEndpoints(): 

Endpoint[]

Get all current Endpoints in the call.

Returns

hangup

Copy URL
hangup(headers: 

object

):

void

Hangup the call

Parameters

  • headers:

    object

    Optional

    Optional custom parameters (SIP headers) that should be sent after disconnecting/cancelling call. Parameter names must start with "X-" to be processed by application

Returns

  • type:

    void

hold

Copy URL
hold(enable: 

boolean

):

Promise<void,CallEventTypes.CallOperationFailed>

Hold or unhold the call

Parameters

  • enable:

    boolean

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

Returns

off

Copy URL
off(eventType: 

CallEventTypes

,
event:

Function

):

void

Remove a handler for the specified call event.

Parameters

  • eventType:

    CallEventTypes

  • event:

    Function

    Optional

    Handler function. If not specified, all handlers for the event will be removed.

Returns

  • type:

    void

on

Copy URL
on(eventType: 

CallEventTypes

,
event:

Function

):

void

Register a handler for the specified call event. One event can have more than one handler. Use the Call.off method to delete a handler.

Parameters

  • eventType:

    CallEventTypes

  • event:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • type:

    void

receiveVideo

Copy URL
receiveVideo(): 

Promise<void,CallEventTypes.CallOperationFailed>

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

Returns

reject

Copy URL
reject(headers: 

object

):

void

Reject incoming call on the part of React Native SDK. If a call is initiated from the PSTN, the network will receive "reject" command. In case of a call from another React Native SDK client, it will receive the CallEventTypes.Failed event with the 603 code.

Parameters

  • headers:

    object

    Optional

    Optional custom parameters (SIP headers) that should be sent after rejecting incoming call. Parameter names must start with "X-" to be processed by application

Returns

  • type:

    void

sendAudio

Copy URL
sendAudio(enable: 

boolean

):

void

Enables or disables audio transfer from microphone into the call.

Parameters

  • enable:

    boolean

    True if audio should be sent, false otherwise

Returns

  • type:

    void

sendInfo

Copy URL
sendInfo(mimeType: 

string

,
body:

string

,
extraHeaders:

object

):

void

Send Info (SIP INFO) message inside the call. You can get this message via the Voxengine CallEventTypes.InfoReceived event in the Voximplant cloud. You can get this message in React Native SDK on other side via the CallEventTypes.InfoReceived event; see the similar events for the Web, iOS and Android SDKs.

Parameters

  • mimeType:

    string

    MIME type of the message, for example "text/plain", "multipart/mixed" etc.

  • body:

    string

    Message content

  • extraHeaders:

    object

    Optional

    Optional custom parameters (SIP headers) that should be sent after rejecting incoming call. Parameter names must start with "X-" to be processed by application

Returns

  • type:

    void

sendMessage

Copy URL
sendMessage(message: 

string

):

void

Send text message. It is a special case of the Call.sendInfo method as it allows to send messages only of "text/plain" type. You can get this message via the Voxengine CallEventTypes.MessageReceived event in our cloud. You can get this message in React Native SDK on other side via the CallEventTypes.MessageReceived event; see the similar events for the Web, iOS and Android SDKs.

Parameters

  • message:

    string

    Message text

Returns

  • type:

    void

sendTone

Copy URL
sendTone(key: 

string

):

void

Send tone (DTMF). It triggers the CallEventTypes.ToneReceived event in the Voximplant cloud.

Parameters

  • key:

    string

    Send tone according to pressed key: 0-9 , * , #

Returns

  • type:

    void

sendVideo

Copy URL
sendVideo(enable: 

boolean

):

Promise<void,CallEventTypes.CallOperationFailed>

Start/stop sending video from a call. In case of a remote participant uses a React Native SDK client, it will receive either the EndpointEventTypes.RemoteVideoStreamAdded or EndpointEventTypes.RemoteVideoStreamRemoved event accordingly.

Parameters

  • enable:

    boolean

    True if video should be sent, false otherwise

Returns

Props

callId

Copy URL
callId: 

string

The call id

callKitUUID

Copy URL
IOS
callKitUUID: 

string

|

null

The CallKit UUID that may be used to match an incoming call with a push notification received before. Always null for outgoing calls on Call instance creation.

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

localVideoStreams

Copy URL
localVideoStreams: 

VideoStream[]

Local video streams

qualityIssues

Copy URL
qualityIssues: 

QualitySubscriber

Instance of a class that may be used to subscribe to call quality issues events.