A WhatsApp AI voice agent answers calls people place to your WhatsApp Business number, through Meta's WhatsApp Business Calling API. You need a Cloud API number, calling turned on and a calls webhook. For teams that want to own the platform, Dograh, the open-source AI voice agent platform you can self-host or run on Dograh Cloud, answers them.
Key Takeaways
- Meta needs a 2,000-recipient messaging limit before production numbers can take calls.
- Dograh answers incoming WhatsApp calls, and a phone carrier places outbound ones.
- User-initiated WhatsApp calls are free, and each one opens the 24-hour window.
Many customers have WhatsApp open all day, so a call button there is an easy way to reach a business. This guide sets up a WhatsApp AI voice agent in Dograh, our open-source AI voice agent platform, in six steps, then covers limits and reaching a person.
What you need before you start
These steps follow the published Dograh and Meta docs. Run them on a trial server before production, with a test number if you have one, because Meta checks each piece against the one before it and the order matters.
On Meta's side you need a business portfolio with a WhatsApp Business number on the Cloud API. Meta also requires production numbers to have a messaging limit of at least 2,000 unique recipients a day before calling works. Sandbox accounts and Meta's public test numbers are exempt, so you can try a new number before it reaches that limit.
On Dograh's side you need an agent that already handles your calls well in a browser test, and an install that Meta can reach over public HTTPS. Dograh Cloud already has that. On a self-hosted install, the backend needs a public HTTPS address, which our post on running a self-hosted voice agent on your own domain sets up.
Dograh handles incoming WhatsApp calls only. It answers the calls people place to your WhatsApp number, and for calls you place, you use a phone carrier such as Twilio or Plivo. Sending WhatsApp messages from a call is a separate setup, covered in our post on sending WhatsApp messages from a voice agent.
Step 1: Create a Meta app for WhatsApp
The Meta app is what connects your WhatsApp number to outside software. Go to developers.facebook.com/apps and select Create App. Enter an app name and a contact email, then select Next.
Choose Connect with customers through WhatsApp as the use case and select Next. Pick the business portfolio that owns your WhatsApp number, select Next again, then Create app.
Check: The new app's dashboard lists Connect on WhatsApp under Use cases.
Step 2: Collect the account ID, token and app secret
Dograh needs three values from Meta, and each lives in a different place. Start with the WhatsApp Business account ID. In your app, open Use cases, then Connect on WhatsApp, then API Setup. Pick any of your numbers in the From dropdown and copy the WhatsApp Business account ID shown below it. One Dograh configuration covers every number on that account.
Next, the access token. Open Business settings, then Users, then System users, and select a system user with Admin access, or add one. Use Assign assets to give it full control of your app and your WhatsApp account. Then select Generate token, pick your app, set the expiration to Never and grant whatsapp_business_messaging and whatsapp_business_management. Copy the token straight away, because Meta shows it only once.
Last, the app secret. In your app, open App settings, then Basic, select Show next to App secret and copy it. Keep all three values in a password manager, not in a chat or a ticket. The token can act on your WhatsApp account until you revoke it.
Check: You have the account ID, a token that never expires and the app secret, each copied in full.
Step 3: Add the WhatsApp configuration in Dograh
Dograh checks the credentials with Meta before it saves anything. Open Telephony in the sidebar, select Add configuration and choose WhatsApp. Enter the Access Token, the WhatsApp Business Account ID and the App Secret, then select Create. Dograh lists the account's numbers with that token and subscribes your app to the account's webhooks, so a wrong value fails here, not later.
Open the new configuration. Under Webhook for your Meta app, copy the Callback URL and the Verify token, which you paste into Meta in the next step. On a self-hosted install, the Callback URL must be your backend's public HTTPS address. If it shows a localhost address, expose the backend first and use that hostname.
Then, under Phone numbers, select Refresh numbers. Dograh imports the numbers Meta lists on the account and names any it skipped. Edit each number that should take calls and set its Inbound workflow to the agent that should answer. A number with no workflow rejects calls. The WhatsApp setup page has the same steps with screenshots of each screen.
Check: The configuration shows a Callback URL and a Verify token, and each number you want answered has an Inbound workflow.
Open Source Alternative to Vapi / Retell
Self-hosted voice agent platform — no per-minute fees
dograh-hq/dograh
Star on GitHub
Step 4: Point Meta's webhook at Dograh
Meta sends call events to the webhook you register here, and it checks the webhook against the saved Dograh configuration. In your app, open Use cases, then Connect on WhatsApp, then Configuration. Paste the Callback URL and the Verify token from Step 3 and select Verify and save.
A Webhook fields list appears once Meta accepts the address. Find calls and turn on Subscribe for it. Meta will not turn on calling for a number until a calls webhook exists, which is why this step comes before the next one.
If Verify and save fails, the usual cause is order or a typo. The Dograh configuration must be saved first, and the Verify token in Meta must match the one on the configuration page exactly.
Check: Verify and save succeeds, and calls shows as subscribed in the Webhook fields list.
Step 5: Turn on calling for each number
Calling is a per-number setting in WhatsApp Manager. Open WhatsApp Manager, then Account tools, then Phone numbers. Select the gear icon next to each number, open Call settings and turn on Allow voice calls.
You can also turn it on through Meta's Graph API, which helps with a Meta test number. The request below names the number in PHONE_NUMBER_ID, sends your token in the Authorization header and sets the calling status to ENABLED.
curl -X POST "https://graph.facebook.com/v26.0/<PHONE_NUMBER_ID>/settings" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"calling": {
"status": "ENABLED",
"call_icon_visibility": "DEFAULT"
}
}'
What this does: It turns on calling for one number and keeps the call button visible in chats with your business. A successful request returns
{"success": true}.
Meta's call settings also let you set call hours, which restrict calls to the weekly hours you configure. An AI agent can answer around the clock, so leave hours open unless the agent's answers depend on staff being in, such as a booking that needs confirming. Keep the number on the default calling webhook path. Switching it to SIP in Meta's settings turns off the calling endpoints and webhooks Dograh depends on.
Check: Call settings shows Allow voice calls turned on for each number, or the API returned {"success": true}.
Step 6: Call the number from WhatsApp
The only real test is a call from a phone. Open the WhatsApp app on a phone, find a chat with your business number and select the call button. Your Dograh agent should answer with its greeting.
If it does not, the message usually says why. "This business is not accepting calls" means calling is off for the number, so repeat Step 5. "To use WhatsApp calling features, you need to configure webhooks or set up SIP" means the app has no calls webhook yet, so repeat Step 4. If Create failed in Step 3 with "Meta did not accept these credentials", check the account ID against the API Setup page and the system user's access. "Meta did not let this app subscribe" means the token is missing whatsapp_business_management or full control of the account.
Then listen to the call the way a customer would. Ask a question the agent should answer, interrupt it once and end the call. The run appears under Agent Runs with its transcript and recording, just like a phone call.
Check: The agent answers a call from the WhatsApp app, and the run shows up under Agent Runs.
Join the Dograh Community
Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.
Reaching a person from a WhatsApp call
Every automated line needs a way out. WhatsApp's Business Messaging Policy asks automated services to give a clear way to reach a person, such as a phone number, email or support form. Plan that path before launch, not after the first complaint.
Transfer Call, Dograh's tool for handing a call to a person, runs on carrier calls through Twilio, Telnyx, Plivo, Cloudonix and Asterisk ARI. On WhatsApp calls the agent takes a callback request instead. It confirms the caller's name, the reason and a good time, and an HTTP API tool writes that request to your helpdesk or CRM during the call. A person then calls back over a phone line or WhatsApp. Tell the caller plainly that this is what happens, so the promise is clear.

Moving between AI agents works on WhatsApp too. Transfer To Agent works on any cascade call, so a reception agent can hand the caller to a billing agent or a Spanish-speaking agent without dropping the call. Our guide to multi-agent voice AI covers that design.
If you want to tell callers they're speaking with an automated assistant, or your location requires it by law, write it in the Greeting Text along with the business's name. Recording and privacy rules differ by country, so confirm your disclosure and recording setup with counsel before launch.
Audio, cost and where it runs
WhatsApp calls reach the agent in a different audio format from most phone calls. They arrive at Dograh over WebRTC as 16 kHz audio, while most phone calls arrive at 8 kHz. So results from phone-line tests do not carry over to WhatsApp, and the reverse holds too. Test on WhatsApp itself. Our post on WebRTC vs SIP explains the difference between the two paths.
On Meta's side, all user-initiated calls are free. A user's call also opens or refreshes the 24-hour customer service window, whether or not the business answers, so you can follow up with a free-form message within that window.
On Dograh's side, each WhatsApp call counts toward your concurrent call limit like any other call, 10 by default. When you self-host, there is no per-minute platform fee. Servers and model keys still cost money, and your team looks after the database, upgrades and the public HTTPS address Meta needs. Dograh Cloud runs it for you for a 1¢-a-minute platform fee, with the public address already in place.
Before you ship it
Run the whole path once more on the trial setup. Call from a phone that is not on your team, ask for a person, and check that the callback request lands in your system with the right name and time. Then check that each live number has the right Inbound workflow.
Decide who watches the callback queue, and how fast they call back. A callback that never comes is worse than no AI at all. Then switch on calling for your production numbers one at a time, and read the first week of transcripts before you add the call button to your website or emails.
Glossary
- WhatsApp Business Calling API
- Meta's API for voice calls on a WhatsApp Business number. Calls arrive as webhook events, and the audio runs over WebRTC by default.
- Messaging limit
- Meta's cap on how many unique people a business number can message a day. Production numbers need at least 2,000 before calling works.
- Verify token
- A shared string Meta sends back when you save a webhook. It must match the one on the Dograh configuration, or Verify and save fails.
- Callback request
- A note the agent writes to your helpdesk or CRM with the caller's name, reason and a good time, so a person can call back.

