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).

See: Config.rtcStatsCollectionInterval

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 another participant in your call or conference.

Parameters

EndpointRemoved

Copy URL

Event is triggered when an Endpoint is removed. E.g. when a participant left the conference or player was removed.

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

RTCStatsReceived

Deprecated
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.

SharingStopped

Copy URL

Event is triggered when screen sharing is stopped

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

  • reason:

    string

    Optional

    Reason of unsuccessful updating

  • result:

    boolean

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