SIGN UP

CallEvents

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

Example:

var currentCall = vox.call("exampleUser");
currentCall.on(VoxImplant.CallEvents.Connected,onConnected);
currentCall.on(VoxImplant.CallEvents.Disconnected,onDisconnected);
currentCall.on(VoxImplant.CallEvents.Failed,onFailed);
currentCall.on(VoxImplant.CallEvents.ICETimeout,onICETimeout)

Enum constants

Connected

Event is triggered when a reliable 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 EventHandlers.CallEventWithHeaders object as an argument.

Disconnected

Event is triggered when a call was disconnected Handler function receives the EventHandlers.Disconnected object as an argument.

EndpointAdded

Event is triggered when a new Endpoint is created. Endpoint represents an another participant in your call or conference.

Failed

Event is triggered due to a call failure Most frequent status codes:

Code Description
486 Destination number is busy
487 Request terminated
603 Call was rejected
404 Invalid number
480 Destination number is unavailable
402 Insufficient funds

Handler function receives the EventHandlers.Failed object as an argument.

ICECompleted

Event is triggered when an ICE connection is complete Handler function receives EventHandlers.CallEvent object as an argument.

ICETimeout

Event is triggered when connection was not established due to a network connection problem between 2 peers Handler function receives EventHandlers.CallEvent object as an argument.

InfoReceived

Event is triggered when the INFO message is received Handler function receives EventHandlers.InfoReceived object as an argument.

MessageReceived

Event is triggered when a text message is received. Handler function receives the EventHandlers.MessageReceived object as an argument.

ProgressToneStart

Event is triggered when a progress tone playback starts. Handler function receives the EventHandlers.CallEvent object as an argument.

ProgressToneStop

Event is triggered when a progress tone playback stops. Handler function receives the EventHandlers.CallEvent object as an argument.

RTCStatsReceived

TransferComplete

Event is triggered when a call has been transferred successfully. Handler function receives the EventHandlers.CallEvent object as an argument.

TransferFailed

Event is triggered when a call transfer failed Handler function receives the EventHandlers.CallEvent object as an argument.

Updated

Event is triggered when a call was updated. For example, video was added/removed. Handler function receives the EventHandlers.Updated object as an argument.