Rate this page:

CallEvent

Constants

CallUpgrade
Since ver. 5.2.0
Copy URL

Triggered when the remote participant enables video during an audio call.

This event allows the application to either accept or reject the request to upgrade the call to video.

If no event listener is registered for the event, the SDK automatically accepts the video upgrade.

If a listener is registered, the application should explicitly call either accept

or reject . If neither method is invoked within 8 seconds, the upgrade request is automatically rejected.

Listener is called with CallUpgrade and payload:

Parameters

  • accept:

    () => void

    Accepts the call upgrade request and enables video receiving for the call.

    To also send local video, use Call.addStream after accepting.

  • reject:

    () => void

    Rejects the call upgrade request.

    The call continues as audio only.

  • callId:

    string

    Call id

  • Watchable property that reflects the current state of the call upgrade request.

    Initially set to CallUpgradeStatus.Pending.

Connected
Copy URL

Triggered after a call has been successfully connected.

Listener is called with CallConnected and payload:

Parameters

Disconnected
Copy URL

Triggered when the call ends.

After this event, Call.state is CallState.Disconnected and the current call's features are no longer available.

For outgoing calls, the event is triggered after Call.hangup, or when the remote participant ends the call.

For incoming calls, the event is triggered after Call.hangup, when the caller cancels the call, or when the call is answered on another device.

After Call.reject, this event is triggered on the callee side. The caller receives CallEvent.Failed instead.

If a network issue occurs after the call has connected and reconnect does not succeed, this event is triggered as well.

If the call fails to connect, CallEvent.Failed is triggered instead.

Listener is called with CallDisconnected and payload:

Parameters

  • callId:

    string

    Call id

  • headers:

    Record<string, string>

    Optional

    Optional headers passed with the event

  • Reason the call has ended

Failed
Copy URL

Triggered when the call fails to connect.

After this event, Call.state is CallState.Failed and the current call's features are no longer available.

The event is triggered when the Voximplant Cloud does not establish the connection.

After Call.reject, this event is triggered on the caller side. The callee receives CallEvent.Disconnected instead.

If a network issue occurs while the call is connecting and reconnect does not succeed, this event is triggered as well.

After the call has connected, later termination is reported via CallEvent.Disconnected.

Listener is called with CallFailed and payload:

Parameters

  • callId:

    string

    Call id

  • code:

    number

    Status code of the call failure

  • headers:

    Record<string, string>

    Optional

    Optional headers passed with the event

  • reason:

    string

    Status message of the call failure

InfoReceived
Copy URL

Triggered when an INFO message is received within a call.

Listener is called with CallInfoReceived and payload:

Parameters

  • body:

    string

    Body of an INFO message

  • callId:

    string

    Call id

  • headers:

    Record<string, string>

    Optional

    Optional headers passed with the event

  • mimeType:

    ${string}/${string}

    MIME type of an INFO message

MessageReceived
Copy URL

Triggered when a message is received within a call.

Listener is called with CallMessageReceived and payload:

Parameters

  • callId:

    string

    Call id

  • message:

    string

    Content of the message

RemoteMediaAdded
Copy URL

Triggered when another call participant has added an audio or video stream to a call.

Listener is called with CallRemoteMediaAdded and payload:

Parameters

RemoteMediaRemoved
Copy URL

Triggered when another call participant has removed an audio or video stream from a call.

Listener is called with CallRemoteMediaRemoved and payload:

Parameters

StartRinging
Copy URL

Triggered when the Call.ring method is called on the scenario side.

Listener is called with CallStartRinging and payload:

Parameters

  • callId:

    string

    Call id

StatsReport
Copy URL

Triggered when call statistics are available for a call.

Listener is called with CallStatsReport and payload:

Parameters

  • Media connectivity statistics.

  • Statistics for all active outgoing audio streams in a call at the moment of the statistics collection.

  • Statistics for all active outgoing video streams in a call at the moment of the statistics collection.

  • Statistics for all incoming audio and video streams of a call at the moment of the statistics collection.

  • timestamp:

    number

    Time at which the call statistics are collected, relative to the UNIX epoch (Jan 1, 1970, UTC), in microseconds.

StopRinging
Copy URL

Triggered when the Call.answer or Call.startEarlyMedia method is called on the scenario side.

Listener is called with CallStopRinging and payload:

Parameters

  • callId:

    string

    Call id

Rate this page: