# Asynchronous Calls with Open CTI

Open CTI lets you issue asynchronous calls. Asynchronous calls allow the client-side process to continue instead of waiting for a callback from the server.

To issue an asynchronous call, you must include an extra parameter with the API call, referred to as a callback function. Once the result is ready, the server invokes the callback method with the result.

Asynchronous syntax:

- In Salesforce Classic:

  - :
    ```javascript
    method('ARG1','ARG2', ..., CALLBACK_METHOD);
    ```
- In Lightning Experience:

  - :
    ```javascript
    method({callback : FUNCTION})
    ```

## Example

- In Salesforce Classic:

  - :
    ```javascript
    //Set softphone height
       sforce.interaction.cti.setSoftphoneHeight(300, callback);
    ```
- In Lightning Experience:

  - :
    ```javascript
    //Disable clickToDial
       sforce.opencti.disableClickToDial({callback: callback});
    ```

:::note
The call result depends on the execution context. For example, calling `setSoftphoneWidth()` in the standard Salesforce application has no effect, but calling `setSoftphoneWidth()` in the Salesforce console resizes the width of the softphone.
:::
