# Calling

### What is Cloud API Calling?

Cloud API Calling enables businesses to handle **voice calls (VoIP)** on WhatsApp, in addition to messaging.

* End-users initiate calls directly from the WhatsApp app.
* Businesses manage **signaling and call control** via the **Graph API**.
* Calling can be **enabled or disabled anytime**.

### Limitations

* Not recommended for businesses with **no VoIP experience** or **no developer resources**.
* **Supported:** WebRTC and SIP.
* **Not supported:** Routing to **PSTN (mobile or landline)** networks.
* Setup is required **per phone number**.

### Who can use it

To be eligible for the Calling API, businesses must:

* Have a phone number with at least **1K business-initiated conversation limit**.
* Be using a number already on the **Cloud API**.
* Have prior experience with **SIP/WebRTC voice infrastructure**.

{% hint style="warning" %}
360Dialog supports the API connection itself, but **partners/clients are responsible** for configuring and managing SIP/WebRTC - including call quality and routing.
{% endhint %}

#### Common Use Cases

* [x] **Customer Support** → escalate chat sessions to a live call.
* [x] **Lead Qualification** → e.g., callbacks in automotive or real estate.
* [x] **Delivery & Logistics** → coordinate deliveries, delays, or confirmations.
* [x] **Utility Services** → enable voice flows for service providers.
* [x] **Marketing** → engagement campaigns with callback options.

### How it works

Before configuring a phone number, it’s important to understand the **basic architecture**:

{% stepper %}
{% step %}
**WhatsApp User** taps the call button in the app.
{% endstep %}

{% step %}
**Meta Signaling Infrastructure** receives the event and triggers a webhook.
{% endstep %}

{% step %}
**Meta RTC Infrastructure** processes the call session.
{% endstep %}

{% step %}
**Partner Signaling Infrastructure** is notified of the incoming call.
{% endstep %}

{% step %}
**Partner RTC/VoIP System** receives and routes the call.
{% endstep %}

{% step %}
**Business Agent** answers the call through the VoIP system.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
In this setup:

* 360Dialog provides the API endpoints to connect a phone number and signaling with Meta.
* If there are issues in **Meta’s RTC or signaling layers**, we escalate directly to Meta.
* While we don’t manage **SIP/WebRTC infrastructure**, we can provide guidance and escalate blockers if needed.
  {% endhint %}

#### Customer Service Window

Besides setup, to place a call, a **customer service window** must be open. This can be opened using a **template message**.

The 24-hour window is also **opened or refreshed** when:

* A user calls the business (even if unanswered).
* A user answers a call initiated by the business.

Once active, the business can send **free-form messages** within the 24-hour window.

### Pricing

With this, Calling API pricing differs by call type:

<table><thead><tr><th width="175.79998779296875">Call Type</th><th width="157">Cost to Business</th><th>Details</th></tr></thead><tbody><tr><td><strong>User-initiated calls</strong></td><td>Not charged</td><td>When a user calls the phone number via WhatsApp and you answer with the API, there is <strong>no cost</strong>.</td></tr><tr><td><strong>Business-initiated calls</strong></td><td>Charged</td><td>Based on:<br>• <strong>Call duration</strong>, billed in 6s increments (rounded up)<br>• <strong>Country code</strong> of the user’s phone number (rates vary).</td></tr><tr><td><strong>Call Permission Request (CPR)</strong></td><td>Charged (message rates)</td><td>Sent as a <strong>regular template message</strong>, following standard pricing rules (e.g., Marketing or Utility).</td></tr></tbody></table>

{% hint style="info" %}
Country rates are available on the [official rate card](https://developers.facebook.com/docs/whatsapp/cloud-api/calling/pricing#volume-based-pricing--vbp--rate-card). Analytics and cost tracking will be available with the `call_analytics` endpoint in [Meta's Documentation](https://developers.facebook.com/docs/whatsapp/business-management-api/analytics/).&#x20;
{% endhint %}

<details>

<summary><strong>Practical Example: Calculating the Cost</strong></summary>

**Scenario:** A business (in Brazil) calls a customer in Mexico. The call lasts **1 minute and 10 seconds (70 seconds)**, and it’s a business-initiated call.

**Step-by-step cost calculation:**

1. **Round up the duration**\
   Calls are charged in 6-second blocks.\
   → 70 seconds ÷ 6 = 11.67 → rounded up to **12 blocks**
2. **Apply the rate card**\
   Let’s assume the rate per block for calls to Mexico is **$0.01** (for example only)
3. **Final cost**\
   → 12 × $0.01 = **$0.12 USD**

{% hint style="info" %}
*You can check real country rates on the* [*official rate card*](https://developers.facebook.com/docs/whatsapp/cloud-api/calling/pricing#volume-based-pricing--vbp--rate-card)*.*
{% endhint %}

***

#### What if the customer calls the business?

✅ In this case, **there’s no cost** for the business. However, the **24-hour service window is opened**, allowing you to send messages without a template during that period

</details>

## FAQs

<details>

<summary>Are messages charged separately during a call?</summary>

Yes. Messages exchanged during or around a call are charged separately and follow standard messaging rates based on their category (e.g., **Marketing**, **Utility**, etc.).

</details>

<details>

<summary>How is call duration calculated for billing?</summary>

Calls are charged in **6-second increments**, always **rounded up**.\
For example, a call lasting **11.5 seconds** will be charged as **12 seconds**.

</details>

<details>

<summary>Does a voice call open a new 24-hour messaging window?</summary>

Yes. According to Meta’s documentation, when:

* A user **calls a business** (even if not answered), or
* A user **answers your call**,

→ A new **24-hour customer service window** is opened for you to send standard Cloud API messages.

</details>

<details>

<summary>Can messaging and calling happen at the same time?</summary>

Yes. You can exchange messages with the end-user via the standard Cloud API **while the voice call is ongoing**.

</details>

<details>

<summary>What is the maximum number of concurrent calls allowed?</summary>

The limit is **1,000 concurrent calls** per WhatsApp Business Account.

</details>

<details>

<summary>What happens if the calling rate limit is exceeded?</summary>

If the **1,000 concurrent call limit** is exceeded:

* The user trying to place a call will receive a **generic error message** (no specific audio or webhook is triggered).
* Meta has indicated that this limit may be increased in the future, so the likelihood of hitting it is low.

{% hint style="warning" %}
Rate limits for **messaging APIs** and **template creation/update** are completely **independent** from calling limits.
{% endhint %}

</details>

{% hint style="info" %}
You can find the official FAQ from Meta here:\
🔗 <https://developers.facebook.com/docs/whatsapp/cloud-api/calling/faq>
{% endhint %}

***

## Getting Started

{% content-ref url="calling/how-to-setup-a-test-environment" %}
[how-to-setup-a-test-environment](https://docs.360dialog.com/docs/messaging/calling/how-to-setup-a-test-environment)
{% endcontent-ref %}

Includes:

* [x] How to set up a test environment for the Calling API
* [x] How to create a SIP extension for testing
* [x] How to configure SIP trunks (inbound and outbound) to connect with Meta
* [x] How to check and adjust Asterisk SIP settings
* [x] How to configure inbound and outbound routes
* [x] How to test calls using MicroSIP and monitor logs via Asterisk CLI
* [x] Troubleshooting tips for common issues during setup

{% content-ref url="calling/how-to-configure-calling-api/using-session-initiation-protocol" %}
[using-session-initiation-protocol](https://docs.360dialog.com/docs/messaging/calling/how-to-configure-calling-api/using-session-initiation-protocol)
{% endcontent-ref %}

Includes:

* [x] How to enable WhatsApp Calling via WhatsApp Manager
* [x] How to enable WhatsApp Calling via API
* [x] How to fetch current call settings programmatically
* [x] Which webhook events are triggered when calling is enabled
* [x] How to configure and manage the call icon visibility in the WhatsApp client
* [x] Common errors and troubleshooting tips
* [x] How to configure or update SIP settings via the API
* [x] How to set the SRTP key exchange protocol (DTLS or SDES)
* [x] How to get and fetch current SIP and calling settings programmatically
* [x] Common troubleshooting steps for SIP configuration errors

{% content-ref url="calling/inbound-calls" %}
[inbound-calls](https://docs.360dialog.com/docs/messaging/calling/inbound-calls)
{% endcontent-ref %}

Includes:

* [x] How inbound calls work
* [x] What WhatsApp Calling Deep Links are and how to configure them
* [x] How to support DTMF on the Calling API
* [x] How to receive inbound calls and handle the CONNECT webhook
* [x] How to pre-accept, accept, reject, or terminate a call
* [x] How to handle the Call Terminated webhook
* [x] How to use interactive voice call buttons and templates to let users call your business
* [x] Common errors and troubleshooting steps

{% content-ref url="calling/outbound-calls" %}
[outbound-calls](https://docs.360dialog.com/docs/messaging/calling/outbound-calls)
{% endcontent-ref %}

Includes:

* [x] How business-initiated calls work through the Cloud API
* [x] Which call status events are received via webhook (ringing, accepted, rejected, terminated)
* [x] The limits and rules for Call Permission Requests (CPRs)
* [x] How to collect Call Permission Requests (CPR) using text or template messages
* [x] How to initiate a call once permission is granted
* [x] Troubleshooting common errors and resolutions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.360dialog.com/docs/messaging/calling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
