Integrations

WhatsApp calling

Let WhatsApp users call your VoiceDock number from the chat with your business, and have your assistant answer as it does a phone call.

With WhatsApp calling, people can call your number from WhatsApp: they tap the call button in the chat with your business, and your assistant answers the call as it would a phone call. The call comes straight from Meta to VoiceDock, so no phone network is involved.

You set it up with your own Meta app and WhatsApp Business Account. At Meta you register the number, turn on calling over SIP to VoiceDock and read the SIP password that Meta generates. You then give VoiceDock that password, through the API or the dashboard. The steps below cover both sides.

VoiceDock only answers calls. Messages sent to the number keep going to your own Meta app, as with any number on the WhatsApp Cloud API.

Before you start

Meta only allows calling when all of the following are in place. Most failed setups come down to one of them.

  • A business portfolio with a messaging limit of at least 2,000. This is a hard requirement for calling: without it, Meta refuses to turn calling on with error 138015. You usually reach this limit by completing business verification.
  • A payment method on your WhatsApp Business Account. Required even though calls that WhatsApp users place to you are free. Without one, Meta returns error 131044.
  • A Meta app in Live mode with the permissions whatsapp_business_management and whatsapp_business_messaging.
  • A system user access token for that app, with access to your WhatsApp Business Account.

On the VoiceDock side:

  • The number must be on your VoiceDock account, active, and answered by an assistant. Meta verifies the number with a phone call, and your assistant answers it.
  • The number must not already receive its calls through another SIP provider of yours, such as your own SIP trunk.
  • If the number is in use on the WhatsApp or WhatsApp Business app, delete that WhatsApp account first. A number can be on the app or on the Cloud API, not both.

The examples use these placeholders:

PlaceholderWhat it is
META_TOKENYour system user access token
PHONE_NUMBER_IDThe ID Meta gives the number once you add it to your WhatsApp Business Account
YOUR_API_KEYYour VoiceDock API key
NUMBER_IDThe ID of the number on VoiceDock, from GET /numbers

The Meta examples use Graph API v24.0; use the version your app is on.

1. Add the number to your WhatsApp Business Account

In WhatsApp Manager, go to Phone numbers and choose Add phone number. Enter your VoiceDock number and the display name you want callers to see. Meta then shows the number with its PHONE_NUMBER_ID.

2. Verify the number by phone

Ask Meta to verify the number with a voice call:

curl -X POST "https://graph.facebook.com/v24.0/PHONE_NUMBER_ID/request_code" \
  -H "Authorization: Bearer META_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "code_method": "VOICE",
    "language": "en_US"
  }'

Meta calls your VoiceDock number and an automated voice reads out a six-digit code. Your assistant answers the call like any other, so the code ends up in the call's transcript. Open the call in the dashboard under Calls, or fetch it through the API:

curl "https://api.hmsovereign.com/api/v1/calls?limit=1" \
  -H "Authorization: Bearer YOUR_API_KEY"

The code is in messages. If the transcript does not hold all six digits, listen to the recording in the dashboard, or request a new code.

Send the code to Meta:

curl -X POST "https://graph.facebook.com/v24.0/PHONE_NUMBER_ID/verify_code" \
  -H "Authorization: Bearer META_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "code": "123456" }'

3. Register the number

Register the number on the WhatsApp Cloud API with a six-digit PIN of your choice:

curl -X POST "https://graph.facebook.com/v24.0/PHONE_NUMBER_ID/register" \
  -H "Authorization: Bearer META_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "pin": "654321"
  }'

The PIN becomes the number's two-step verification PIN. Keep it: Meta asks for it when the number is registered again.

4. Turn on calling over SIP

Turn on calling for the number and point it at VoiceDock:

curl -X POST "https://graph.facebook.com/v24.0/PHONE_NUMBER_ID/settings" \
  -H "Authorization: Bearer META_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "calling": {
      "status": "ENABLED",
      "call_icon_visibility": "DEFAULT",
      "srtp_key_exchange_protocol": "SDES",
      "audio": { "additional_codecs": ["PCMA", "PCMU"] },
      "sip": {
        "status": "ENABLED",
        "servers": [{ "hostname": "sip.hmsovereign.com", "port": 5061 }]
      }
    }
  }'

srtp_key_exchange_protocol must be SDES. VoiceDock does not support DTLS key exchange, and without SDES every call fails.

call_icon_visibility: DEFAULT shows the call button in the chat with your business.

5. Read the SIP password

Meta generates a SIP password for the number. Read it from the settings:

curl "https://graph.facebook.com/v24.0/PHONE_NUMBER_ID/settings?include_sip_credentials=true" \
  -H "Authorization: Bearer META_TOKEN"

The password is in calling.sip.servers[0].sip_user_password. Treat it like any other secret.

6. Give VoiceDock the password

Send the password to VoiceDock:

curl -X PUT "https://api.hmsovereign.com/api/v1/numbers/NUMBER_ID/whatsapp" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "sip_password": "THE_PASSWORD_FROM_META" }'

Or do it in the dashboard: Numbers → your number → WhatsApp calling.

The response is 202 Accepted with status pending:

{
  "status": "pending",
  "error_code": null,
  "sip_username": "31850835037",
  "updated_at": "2026-10-15T12:00:00Z"
}

sip_username is the number without the +, which is the username Meta uses. You only need to send sip_username if Meta authenticates with a different one. The password is stored encrypted and is never returned.

Check the status until it is active, usually within a minute:

curl "https://api.hmsovereign.com/api/v1/numbers/NUMBER_ID/whatsapp" \
  -H "Authorization: Bearer YOUR_API_KEY"

Once it is active, open WhatsApp on a phone, go to the chat with your number and tap the call button. Your assistant answers.

What callers experience

  • They call from the chat with your business by tapping the call button, or by opening https://wa.me/call/31850835037: your number without the +. You can put that link on your website or in an email.
  • WhatsApp calling works in the WhatsApp app on Android and iOS, not in WhatsApp Web or WhatsApp Desktop.
  • Your assistant answers as it does a phone call, with the same prompt, voice and tools.
  • The caller's number is the phone number of their WhatsApp account. It arrives in customer.number in your webhooks and in caller_phone on the call.

Every webhook carries call.channel, and every call record channel. It is whatsapp for these calls and phone for calls over the phone network, so your systems can tell them apart:

{
  "message": {
    "type": "status-update",
    "call": {
      "id": "5c4d030f-43e3-4e65-899e-8148521e660f",
      "type": "inbound_phone_call",
      "channel": "whatsapp",
      "status": "in-progress"
    },
    "phone_number": { "number": "+31850835037" },
    "customer": { "number": "+31612345678" }
  }
}

Rules for WhatsApp calls

A WhatsApp call cannot be transferred. Meta's terms do not allow the phone network on any part of a WhatsApp call, so VoiceDock never puts one through to a phone number. On a WhatsApp call, the transfer_call tool, a transfer node in a workflow and the transfer command of call control are refused, and the assistant offers to take a message or arrange a call back instead. Tell your assistant in its prompt what it should do when a WhatsApp caller needs a person.

  • Calls placed by WhatsApp users only. Your assistant answers WhatsApp calls; it does not place them.
  • Billing. Meta does not charge for calls that WhatsApp users place to your business. On VoiceDock a WhatsApp call is billed like any other call, except that there is no telephony charge, because the call does not use the phone network.
  • Simultaneous calls. Meta allows up to 1,000 simultaneous WhatsApp calls per number.
  • Keep your assistant answering. When many WhatsApp calls go unanswered, Meta can hide the call button for your number. Keep the assistant assigned to the number and your credits topped up.
  • Up to 10 numbers per organization. Contact support if you need more.

Status and error codes

GET /numbers/{id}/whatsapp returns one of these statuses:

StatusMeaning
offWhatsApp calling is not set up on this number.
pendingVoiceDock is applying the password. Usually takes about a minute.
activeWhatsApp calls to this number reach your assistant.
refusedThe password was not applied. error_code says why.
failedApplying the password failed after several attempts. error_code says why.
disablingWhatsApp calling is being turned off and becomes off shortly.

With refused or failed, error_code is one of:

error_codeWhat to do
number_on_other_trunkThe number already receives its calls through another SIP connection, such as your own SIP trunk. WhatsApp calling cannot run on it next to that connection.
number_inactiveThe number is turned off. Turn it back on with PATCH /numbers/{id} and the setup is applied again.
missing_credentialsNo password was found for the number. Send the PUT again with the password.
apply_failedThe change could not be applied. VoiceDock retries a few times while the status is pending. When the status is failed, send the PUT again; contact support if it fails again.
readback_mismatchThe change was applied but could not be confirmed. Send the PUT again.
no_addressesWhatsApp calling cannot be set up on the platform at the moment. Contact support.

While the status is pending, error_code can show lock_busy (another change is being applied first) or upgrade_in_progress (platform maintenance). The change goes through by itself afterwards; there is nothing to do.

The endpoint itself answers with these errors, in the format { "error": "<code>", "message": "..." }:

HTTPerrorMeaning
404number_not_foundNo number with this ID in your organization.
409number_inactiveThe number is turned off. Turn it on first.
409number_on_other_providerThe number is already connected to another SIP provider.
403whatsapp_number_limit_reachedYour organization uses WhatsApp calling on as many numbers as it may. Turn it off on another number, or contact support.
403whatsapp_calling_not_availableWhatsApp calling is not available for this number. Contact support.
422invalid_sip_passwordThe password must be 8 to 200 characters.
422invalid_sip_usernameThe username may only contain letters, digits and . _ + -, up to 64 characters.
409whatsapp_calling_not_enabledOnly on DELETE: WhatsApp calling is not turned on for this number.
429More than 10 requests per minute to PUT or DELETE with this API key.

Change or reset the password

If the password may have leaked, have Meta generate a new one. Turn off calling and SIP for the number:

curl -X POST "https://graph.facebook.com/v24.0/PHONE_NUMBER_ID/settings" \
  -H "Authorization: Bearer META_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "calling": {
      "status": "DISABLED",
      "sip": { "status": "DISABLED", "servers": [] }
    }
  }'

Then turn it on again with the request from step 4, read the new password as in step 5, and send it to VoiceDock with the same PUT as in step 6. Sending the PUT again replaces the stored password. Until VoiceDock has the new password, WhatsApp calls to the number do not reach your assistant.

Turn off WhatsApp calling

curl -X DELETE "https://api.hmsovereign.com/api/v1/numbers/NUMBER_ID/whatsapp" \
  -H "Authorization: Bearer YOUR_API_KEY"

The response is 202 Accepted with status disabling, and the stored password is removed. Phone calls to the number are not affected. Turn off calling for the number at Meta as well, or WhatsApp users keep seeing a call button that no longer reaches your assistant.

Troubleshooting

SymptomCauseWhat to do
Meta returns error 138015 when you turn on callingYour business portfolio's messaging limit is below 2,000.Complete business verification, or otherwise raise the limit, and send the request from step 4 again.
Meta returns error 131044There is no payment method on your WhatsApp Business Account.Add one in your business settings at Meta and try again.
Registering fails with an error about the PINThe number already has two-step verification with another PIN.Reset the PIN in WhatsApp Manager under the number's settings, then register again.
The status is refused or failedSee error_code.Follow the table under Status and error codes.
The status is active, but WhatsApp calls do not reach your assistantUsually one of: calling or SIP is not enabled for the number, the SIP host or port is wrong, the Meta app is not in Live mode, or the password was changed at Meta.Check the settings with the request from step 5: calling.status and calling.sip.status must be ENABLED, with host sip.hmsovereign.com and port 5061. Check that your app is Live. If the password at Meta is different from the one you sent, send the new one with the PUT from step 6.
Calls fail with SIP 488, or with an error that mentions "No fingerprint"srtp_key_exchange_protocol is not SDES.Send the request from step 4 again, with "srtp_key_exchange_protocol": "SDES".
The call button has disappeared from the chatToo many WhatsApp calls went unanswered, and Meta hid the button.Make sure the number has an assistant and your account has credits.
The assistant tells a WhatsApp caller it cannot put them throughExpected: WhatsApp calls cannot be transferred.Give the assistant another way to help, such as taking a message.

On this page