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

Triggered when the call statistics are received. The collection interval is specified in Config.rtcStatsCollectionInterval (defaults to 10 seconds).

See: Config.rtcStatsCollectionInterval

Parameters

Connected

Copy URL

Trigerred after the call is connected from the signaling perspective. 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

Triggered when a call has been disconnected

Parameters

  • call:

    Call

    Call that triggered the event

  • headers:

    Object

    Optional

    Optional. SIP headers are received with the message

EndpointAdded

Copy URL

Triggered when a new Endpoint is created. Endpoint represents another participant in the call or conference.

Parameters

EndpointRemoved

Copy URL

Triggered when an Endpoint is removed. E.g. when a participant leaves the conference or player is removed.

Parameters

Failed

Copy URL

Triggered due to a call failure Most frequent status codes:

Code Description
486 Destination number is busy
487 Request terminated
603 Call has been 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 has been 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

Triggered when an ICE connection is complete

Parameters

  • call:

    Call

    Call that triggered the event

ICETimeout

Deprecated
Copy URL

Triggered when connection has not been established due to a network connection problem between 2 peers

Parameters

  • call:

    Call

    Call that triggered the event

InfoReceived

Copy URL

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

Triggered when a text message is received.

Parameters

  • call:

    Call

    Call that triggered the event

  • text:

    string

    Content of the message

ProgressToneStart

Copy URL

Triggered when the Call.ring method is called on the scenario side. Usually, this event is triggered when the call is arrived to its destination. After receiving this event, the application should start playing progress tones.

Parameters

  • call:

    Call

    Call that triggered the event

ProgressToneStop

Copy URL

Triggered when the Call.answer or Call.startEarlyMedia method is called on the scenario side. After receiving this event, the application should stop playing progress tones if they have been playing after the ProgressToneStart event.

Parameters

  • call:

    Call

    Call that triggered the event

RTCStatsReceived

Deprecated
Copy URL

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

Triggered when screen sharing is stopped

StateUpdated

Copy URL

Parameters

TransferComplete

Copy URL

Triggered when a call has been transferred successfully.

Parameters

  • call:

    Call

    Call that triggered the event

TransferFailed

Copy URL

Triggered when a call transfer failed

Parameters

  • call:

    Call

    Call that triggered the event

Updated

Copy URL

Triggered when a call has been updated. For example, video has been added/removed. Handler function receives the EventHandlers.Updated object as an argument.

Parameters

  • call:

    Call

    Call that triggered the event

  • reason:

    string

    Optional

    Optional. Reason of unsuccessful updating.

  • result:

    boolean

    Whether the update is successful.