Rate this page:

CallEventTypes

The events that are triggered by Call instance. Use Call.on to subscribe on any of these events.

Constants

CallOperationFailed

Copy URL

Triggered due to a call operation failure by the Call.hold, Call.sendVideo, and Call.receiveVideo methods. Handler function receives the event with the following parameters as an argument.

Parameters

  • Error code.

  • message:

    string

    Error description.

  • name:

    string

    Name of the event.

CallReconnected

Copy URL

Triggered when the connection to the Voximplant cloud is restored and media stream are active in the call.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

CallReconnecting

Copy URL

Triggered when the connection to the Voximplant cloud is lost due to a network issue and media streams may be interrupted in a call. Until CallEventTypes.CallReconnected event is triggered, the following API calls fail with CallError.RECONNECTING error:

  1. Call.sendVideo
  2. Call.receiveVideo
  3. Call.hold

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

Connected

Copy URL

Triggered when a realible connection is established for the call. Depending on network conditions there can be a 2-3 seconds delay between first audio data and this event. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • headers:

    object

    Optional SIP headers are received with the event.

  • name:

    string

    Name of the event.

Disconnected

Copy URL

Triggered when a call has been disconnected. Handler function receives the event with the following parameters as an argument.

Parameters

  • answeredElsewhere:

    boolean

    Whether the call has been answered on another device via SIP forking.

  • call:

    Call

    Call that triggered the event.

  • headers:

    object

    Optional SIP headers are received with the event.

  • name:

    string

    Name of the event.

EndpointAdded

Copy URL

Triggered when a new Endpoint is created. Endpoint represents an another participant in your call or conference. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • endpoint:

    Endpoint

    New endpoint.

  • name:

    string

    Name of the event.

Failed

Copy URL

Triggered when a call has failed. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • code:

    number

    Call status code.

  • headers:

    object

    Optional SIP headers are received with the event.

  • name:

    string

    Name of the event.

  • reason:

    string

    Status message of a call failure (i.e. Busy Here).

ICECompleted

Copy URL

Triggered when the ICE connection is complete. Handler function receives CallEventTypes.ICECompleted params as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

ICETimeout

Copy URL

Triggered when the connection has not been established due to a network connection problem between 2 peers. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

InfoReceived

Copy URL

Triggered when an INFO message is received. Handler function receives the event with the following parameters as an argument.

LocalVideoStreamAdded

Copy URL

Triggered when the local video is added to a call. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

  • videoStream:

    VideoStream

    Local video stream.

LocalVideoStreamRemoved

Copy URL

Triggered when the local video is removed from a call. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

  • videoStream:

    VideoStream

    Local video stream.

MessageReceived

Copy URL

Triggered when a text message is received. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.

  • text:

    string

    Content of the message.

ProgressToneStart

Copy URL

Triggered when a progress tone playback should start. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • headers:

    object

    Optional SIP headers are received with the event.

  • name:

    string

    Name of the event.

ProgressToneStop

Copy URL

Triggered when a progress tone playback should stop. Handler function receives the event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event.

  • name:

    string

    Name of the event.