Rate this page:

Events

The events that are triggered by Client instance. See the getInstance method.

Constants

ACDError

Copy URL

Triggered when the Web SDK detects incorrect usage of the ACD module, e.g., usage of the same credentials in the different browsers or multiple browser windows. This event can also trigger when you make a request, reload the page and receive response after the page reloads.

Parameters

  • code:

    number

  • message:

    string

ACDStatusUpdated

Copy URL

Triggered when a contact center agent's status changes via SDK or within the contact center. Works both for SmartQueue and ACD v1.

Parameters

AuthResult

Copy URL

Triggered after the Client.login, Client.loginWithOneTimeKey and Client.loginWithToken methods call.

Parameters

  • code:

    number

    Optional

    Refresh token error code, possible values are:

    Code Description
    401 invalid token
    404 invalid username
    500 internal error
    701 refresh token expired
  • displayName:

    string

    Optional

    Authorized user's display na8me

  • key:

    string

    Optional

    This parameter is used to calculate hash parameter for Client.loginWithOneTimeKey method. AuthResult with the key dispatched after Client.requestOneTimeLoginKey method was called

  • result:

    boolean

    True in case of successful refresh, false - otherwise

  • Optional

    New tokens structure

ConnectionClosed

Copy URL

Triggered if a connection to VoxImplant Cloud was closed because of network problems or the Client.disconnect function call.

See: Client.connect, Client.disconnect

ConnectionEstablished

Copy URL

Triggered after connection to VoxImplant Cloud was established successfully.

See: Client.connect

ConnectionFailed

Copy URL

Triggered if a connection to the VoxImplant cloud could not be established.

See: Client.connect

Parameters

  • message:

    string

    Failure reason description

IncomingCall

Copy URL

Triggered when there is a new incoming call to current user

Parameters

  • call:

    Call

    Incoming call instance. See Call function for details

  • headers:

    Object

    Optional

    Optional SIP headers received with the message

  • video:

    boolean

    Optional

    True if the caller initiated video call

MicAccessResult

Copy URL

Parameters

  • fallback:

    boolean

    Optional
  • result:

    boolean

    True is access was allowed, false - otherwise

  • stream:

    MediaStream

    MediaStream object

PlaybackError

Copy URL

PlaybackFinished

Copy URL

Triggered after sound playback was stopped.

See: Client.playToneScript, Client.stopPlayback

Reconnected

Copy URL

Event is triggered when reconnection to the server is successful.

Reconnecting

Copy URL

Event is triggered when the SDK client loses connection with the Voximplant cloud and tries to reconnect, for example, when a customer's internet connection fails.

RefreshTokenResult

Copy URL

Triggered after the LoginTokens.refreshToken call

Parameters

  • code:

    number

    Optional

    Refresh token error code, possible values are:

    Code Description
    401 invalid token
    404 invalid username
    500 internal error
    701 refresh token expired
  • result:

    boolean

    True in case of successful refresh, false - otherwise

  • Optional

    New tokens structure

SDKReady

Copy URL

Triggered after SDK was successfully initialized after the Client.init function call

Parameters

  • version:

    string

    SDK version

SQError

Copy URL

Triggered when the Web SDK detects incorrect use of the SmartQueue module, e.g., using the same credentials in the different browsers or multiple browser's windows.

Parameters

  • code:

    number

  • message:

    string

SQMessagingStatusUpdated

Copy URL

Triggered when SmartQueue messaging status of current user changed from SDK or from inside the SmartQueue messaging service.

Parameters