How to Handle Inbound Calls
This guide explains how to receive and handle calls initiated by end-users through the WhatsApp app.
Receiving a call
1
Connect Webhook
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "366634483210360", // WhatsApp Business Account ID associated with the business phone number
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": { // ID and display number for the business phone number placing the call (caller)
"phone_number_id": "436666719526789",
"display_phone_number": "13175551399",
},
"calls": [
{
"id": "wacid.ABGGFjFVU2AfAgo6V-Hc5eCgK5Gh", // The WhatsApp call ID
"to": "16315553601", // The WhatsApp user's phone number (callee)
"from": "13175551399",
"event": "connect",
"timestamp": "1671644824",
"session": {
"sdp_type": "offer",
"sdp": "<<RFC 8866 SDP>>"
}
}
]
},
"field": "calls"
}
]
}
]
}2
3
Accept the call
{
"messaging_product": "whatsapp",
"call_id": "wacid.ABGGFjFVU2AfAgo6V-Hc5eCgK5Gh",
"action": "accept",
"session" : {
"sdp_type" : "answer",
"sdp" : "<<RFC 8866 SDP>>"
}
}{
"messaging_product": "whatsapp",
"success" : true
}{
"error": {
"message": "<Error Message>",
"type": "<Exception Type>",
"code": <Exception Code>,
}
}5
Call Terminated Webhook
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "16505553602",
"phone_number_id": "<PHONE_NUMBER_ID>",
},
"calls": [
{
"id": "wacid.ABGGFjFVU2AfAgo6V-Hc5eCgK5Gh",
"to": "16315553601",
"from": "16315553602",
"event": "terminate"
"direction": "BUSINESS_INITIATED",
"biz_opaque_callback_data": "random_string",
"timestamp": "1671644824",
"status" : [FAILED | COMPLETED],
"start_time" : "1671644824",
"end_time" : "1671644944",
"duration" : 120
}
],
"errors": [
{
"code": INT_CODE,
"message": "ERROR_TITLE",
"href": "ERROR_HREF",
"error_data": {
"details": "ERROR_DETAILS"
}
}
]
},
"field": "calls"
}
]
}
]
}Call Buttons
Interactive Voice Call Button
Message with call button
1
2

3
Template with Call button
1
2
3

4
Troubleshooting
Error Code
Description
Possible solutions
Http Status Code
Last updated
Was this helpful?