---
schema_version: "1"
id: 6a371a8250d3915d98159decb521ce683a1bc3342cb6cf71849f4d00f98ddb6f
title: Asynchronous Calls with Open CTI
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/api-cti/guides/sforce-api-cti-asynch-calls.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-asynch-calls.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1a07f37fb9aee468ed81d6323367e99669dd874b7bf001c00138fe4faff3473f
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# 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.

