Rate this page:

Call

Class that provides API for call operations like answer, reject, hang up, and mid-call operations like hold, start/stop video, and others.

Methods

answer
Copy URL
answer(callSettings: 

CallSettings

):

void

Answers an 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

Rejects an incoming call on all devices, where this user is logged in.

Parameters

  • headers:

    object

    Optional

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

Returns

  • type:

    void

getDuration
Copy URL
getDuration(): 

Promise<number,CallError>

Gets the call duration in seconds.

Returns

getEndpoints
Copy URL
getEndpoints(): 

Endpoint[]

Gets all current Endpoints in the call.

Returns

hangup
Copy URL
hangup(headers: 

object

):

void

Hangs up the call.

Parameters

  • headers:

    object

    Optional

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

Returns

  • type:

    void

hold
Copy URL
hold(enable: 

boolean

):

Promise<void,CallEventTypes.CallOperationFailed>

Holds or unholds the call.

Parameters

  • enable:

    boolean

    Whether the call should be put on hold

Returns

off
Copy URL
off(eventType: 

CallEventTypes

,
event:

Function

):

void

Removes a handler for the specified call event.

Parameters

  • eventType:

    CallEventTypes

  • event:

    Function

    Optional

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

Returns

  • type:

    void

on
Copy URL
on(eventType: 

CallEventTypes

,
event:

Function

):

void

Registers 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>

Starts receiving video if video receive has been disabled before. Stop receiving video during the call is not supported.

Returns

reject
Copy URL
reject(headers: 

object

):

void

Rejects an incoming call on the part of React Native SDK. If a call is initiated from the PSTN, the network receives the "reject" command. In case of a call from another React Native SDK client, it receives 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 should start with "X-" to be processed by application

Returns

  • type:

    void

sendAudio
Copy URL
sendAudio(enable: 

boolean

):

void

Enables/disables audio transfer from the microphone into the call.

Parameters

  • enable:

    boolean

    Whether audio should be sent

Returns

  • type:

    void

sendInfo
Copy URL
sendInfo(mimeType: 

string

,
body:

string

,
extraHeaders:

object

):

void

Sends an info (SIP INFO) message into 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 should start with "X-" to be processed by application

Returns

  • type:

    void

sendMessage
Copy URL
sendMessage(message: 

string

):

void

Sends a 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

Sends a 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>

Starts/stops sending video from the call. In case if a remote participant uses a React Native SDK client, it receives either the EndpointEventTypes.RemoteVideoStreamAdded or EndpointEventTypes.RemoteVideoStreamRemoved event accordingly.

Parameters

  • enable:

    boolean

    Whether video should be sent

Returns

Props

callId
Copy URL
callId: 

string

The call id

callKitUUID
Copy URL
IOS
callKitUUID: 

string

|

null

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 provides API to subscribe to call quality issues events.

Rate this page: