Quick Start
What you’ll build- Inbound calling: Receive calls from users through your WhatsApp Business number
- Outbound calling (Business Initiated Calling): Initiate calls to users (with proper permissions)
- Plivo account - Request Trial
- WhatsApp Business Account linked to Plivo. Follow these steps
- A WhatsApp-enabled phone number
- A server endpoint to handle webhooks (for testing, use ngrok or similar)
Part 1: Receiving Inbound Calls (User-initiated Calls)
Step 1: Create a Plivo XML Application- Navigate to Voice -> Applications -> XML -> Add New Application
- Configure the application
- Application Name: WhatsApp Calling Application
- Primary URL: https://yourdomain.com/receive_call/ (Replace this with your actual call URL)
- This endpoint receives call events
- Must return a valid Plivo XML
- Hangup URL(Optional): URL called when the call ends
- Fallback URL(Optional): Backup URL if Primary fails
- Click Create Application
- Go to WhatsApp > WhatsApp Business Account
- Click Enable Calling next to your phone number
- Select the XML application you created:
WhatsApp Calling Application - Click Save Configuration
- Once calling is enabled:
- ✅ You should now see a call button next to your WhatsApp number on WhatsApp
- Open Meta Business Manager → WhatsApp Manager → Phone Numbers
- Select your number → More → Calls → Available call hours
- Configure your business hours
- Call your WhatsApp Business number from any WhatsApp account:
- Verify:
- Call connects successfully
- Audio is routed to your configured endpoint
- Two-way audio works
Part 2: Making outbound calls (Business Initiated Calls)
Understanding Callback permissions Important: As per Meta guideline, you must obtain explicit permission before calling a WhatsApp user.Permission Methods
Method 1: Request Permission via Message Send a permission request using a WhatsApp template message / free-form message (see Step 1 below). **Create a callback request permission template: **- Go to your Meta Business Profile > WhatsApp Manager > Manage Templates > Create Template
- Select the Calling permissions request under Marketing or Utility
- Configure the template and submit for approval.
Required Parameters
| Parameter | Description | Example |
|---|---|---|
callerId | Your WhatsApp Business number (must be WhatsApp-enabled) | "918035737458" |
callType | Must be whatsapp for WhatsApp calls | "whatsapp" |
<User> | Recipient’s WhatsApp phone number (E.164 format) | <User>919412341234</User> |
Limitations & Restrictions
Meta Restrictions
Geographic Restrictions
Outbound calls are NOT available from business numbers in:- 🇺🇸 United States
- 🇨🇦 Canada
- 🇹🇷 Turkey
- 🇪🇬 Egypt
- 🇳🇬 Nigeria
- 🇻🇳 Vietnam
Call Routing
- Calls cannot be forwarded to PSTN (traditional phone) numbers
- Calls must be answered via a Cloud platform
- WhatsApp-to-WhatsApp call forwarding is not supported
Capacity Limits
- Maximum concurrent calls: 1,000 simultaneous calls per WhatsApp Business number
- Other than this, your Plivo account’s CPS (Calls Per Second) limits apply to all calls combined (including WhatsApp calls). Check your CPS limits here.
Permission Rules
| Rule | Limit | Details |
|---|---|---|
| Request frequency | Once per 24 hours | Maximum 2 requests in 7 days |
| Calls allowed | 5 calls per 24 hours | After permission granted |
| Permission duration | 7 days | From approval date |
| Auto-revocation | After 4 missed calls | Consecutive missed calls |
- Time-based expiration
- 7 days after approval, rejection, or no response
- New permission granted
- When a new call permission request is approved
- Missed call warnings
- After 2 consecutive missed calls → User prompted to reconsider permission
- After 4 consecutive missed calls → Permission automatically revoked