# Call Started

Published 2024-01-29

# Usage

A call has commenced in the CTI Adaptor. Either the call has been allocated to the agent (inbound call, transfer, predictive outbound, agent call) or the case of manually dialled calls, it has connected to the customer (manual call, preview call).

# Syntax

webClient.onCallStarted(listener: Function);

# Arguments

Name Type Description
listener function JavaScript method executed when the API method call is completed

# Sample Javascript

const callback = (response) => {
    if (response.error) console.error(response.error);
    if (response.result)

# Response

This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.

Example success Response

Returns this object if the API method call was invoked successfully, false otherwise.

    result: {
        agentInteractionId: number;
        callType: string;
        interaction: {
            activity: ActivityData;
            callQuality: number
            campaign: CampaignData;
            interactionType: string;
            leadData: LeadData;
            recovered: boolean;
            totalTime: number;
            transfer: boolean;
            transferInformation: TransferData;
            wrapCodeList: WrapcodeData[];
            wrapNote: string | null;
        timestamp: number; // Unix timestamp