Rate this page:

CallEvents

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

Constants

ActiveUpdated

Copy URL

Parameters

  • call:

    Call

    Call that triggered the event

  • new:

    boolean

    Current call's activity status

  • old:

    boolean

    Old call's activity status

CallStatsReceived

Copy URL

Event is triggered when the call is CONNECTED at the interval specified by Config.rtcStatsCollectionInterval (defaults to 10 seconds).

Parameters

Connected

Copy URL

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.

Parameters

  • call:

    Call

    Call that triggered the event

  • headers:

    Object

    Optional

    Optional SIP headers are received with the message

Disconnected

Copy URL

Event is triggered when a call was disconnected

Parameters

  • call:

    Call

    Call that triggered the event

  • headers:

    Object

    Optional

    Optional SIP headers are received with the message

EndpointAdded

Copy URL

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

Parameters

Failed

Copy URL

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

Parameters

  • call:

    Call

    Call that triggered the event

  • code:

    number

    Call status code (i.e. 486) 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
  • headers:

    Object

    Optional

    Optional SIP headers are received with the message

  • reason:

    string

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

ICECompleted

Deprecated
Copy URL

Event is triggered when an ICE connection is complete

Parameters

  • call:

    Call

    Call that triggered the event

ICETimeout

Deprecated
Copy URL

Event is triggered when connection was not established due to a network connection problem between 2 peers

Parameters

  • call:

    Call

    Call that triggered the event

InfoReceived

Copy URL

Event is triggered when the INFO message is received

Parameters

  • body:

    string

    Content of the message

  • call:

    Call

    Call that triggered the event

  • headers:

    Object

    Optional

    Optional SIP headers are received with the message

  • mimeType:

    string

    MIME type of INFO message

MessageReceived

Copy URL

Event is triggered when a text message is received.

Parameters

  • call:

    Call

    Call that triggered the event

  • text:

    string

    Content of the message

ProgressToneStart

Copy URL

Event is triggered when a progress tone playback starts.

Parameters

  • call:

    Call

    Call that triggered the event

ProgressToneStop

Copy URL

Event is triggered when a progress tone playback stops.

Parameters

  • call:

    Call

    Call that triggered the event

QualityIssueCodecMismatch

Beta
Copy URL

Event is triggered when the local audio, video or shared stream is encoded by a codec different from the one specified in Config or CallSettings.

Parameters

  • call:

    Call

    Call that triggered the event

  • kind:

    TrackType

    Type of stream.

  • Issue level.

  • sendCodec:

    string

    Codec that is currently used or undefined if a stream is not sent.

QualityIssueHighMediaLatency

Beta
Copy URL

Event is triggered when network-based media latency is detected in the call.

Parameters

  • call:

    Call

    Call that triggered the event

  • latency:

    number

    Average latency for the last 2.5 seconds measured in milliseconds.

  • Issue level.

QualityIssueICEDisconnected

Beta
Copy URL

Event is triggered when the ICE connection is switched to the "disconnected" state during the call.

Parameters

QualityIssueLocalVideoDegradation

Beta
Copy URL

Event is triggered when the video resolution sent to the endpoint is lower than a captured video resolution.

Parameters

QualityIssuePacketLoss

Beta
Copy URL

Event is triggered every 2.5 seconds and indicates packet loss for the last period.

Parameters

  • call:

    Call

    Call that triggered the event

  • Issue level.

  • packetLoss:

    number

    Average packet loss for 2.5 seconds.

RTCStatsReceived

Copy URL

Event is triggered every 10 seconds when the call is CONNECTED. Handler function receives RTCStatsReport dictionary as it is returned by a browser RTCPeerConnection.getStats() method as an argument. RTCStatsReport provides statistics about the specified Call and may differ from one vendor to another. @deprecated Use CallEvents.CallStatsReceived instead

StateUpdated

Copy URL

Parameters

TransferComplete

Copy URL

Event is triggered when a call has been transferred successfully.

Parameters

  • call:

    Call

    Call that triggered the event

TransferFailed

Copy URL

Event is triggered when a call transfer failed

Parameters

  • call:

    Call

    Call that triggered the event

Updated

Copy URL

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

Parameters

  • call:

    Call

    Call that triggered the event

  • result:

    boolean

    True in case of successful updating, false in other cases.