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

Event is triggered due to a call operation failure by the Call.hold, Call.sendVideo and Call.receiveVideo methods. The handler function receives an event with the following parameters as an argument.

Parameters

  • Error code

  • message:

    string

    Error description

  • name:

    string

    Name of the event

CallReconnected

Copy URL

Event is 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

Event is triggered when the connection to the Voximplant Cloud is lost due to a network issue and media streams may be interrupted in the call. Until CallEventTypes.CallReconnected event is invoked, the following API calls will 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

Event is 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. The handler function receives an 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

Event is triggered when a call was disconnected. The handler function receives an event with the following parameters as an argument.

Parameters

  • answeredElsewhere:

    boolean

    True if the call was answered on another device via SIP forking, false otherwise

  • 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

Event is triggered when a new Endpoint is created. Endpoint represents an another participant in your call or conference. The handler function receives an 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

Event is triggered due to a call failure. The handler function receives an 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

Event is triggered when 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

Event is triggered when connection was not established due to a network connection problem between 2 peers. The handler function receives an 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

Event is triggered when INFO message is received. The handler function receives an event with the following parameters as an argument.

LocalVideoStreamAdded

Copy URL

Event is triggered when local video is added to the call. The handler function receives an 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

Event is triggered when local video is removed from the call. The handler function receives an 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

Event is triggered when a text message is received. The handler function receives an 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

Event is triggered when a progress tone playback starts. The handler function receives an 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

Event is triggered when a progress tone playback stops. The handler function receives an event with the following parameters as an argument.

Parameters

  • call:

    Call

    Call that triggered the event

  • name:

    string

    Name of the event