voip docs
voip docs

VoIP & Call Agent Alerts

Integrate click-to-call widgets, missed call alerts, and VoIP notifications with WhatsApp follow-ups.

VoIP & Call Agent Alerts

WhatAPI bridges voice communication with instant text alerts, ensuring that phone leads are immediately engaged on WhatsApp.

1. Click-to-Call Website Widgets

Integrate our click-to-call custom button HTML code into your store:

  • How it works: A customer clicks the "Call Agent" button on your storefront. This triggers an automated voice call via your SIP/VoIP server, connecting your customer agent.
  • WhatsApp Follow-up: Simultaneously, the event sends a POST request to `/api/v1/messages/send-text` to dispatch a personalized vCard and contact message:

```json
{
"phone": "923001234567",
"type": "contact",
"displayName": "Support Center",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:WhatAPI Agent\nTEL;TYPE=CELL:923000000000\nEND:VCARD"
}
```

2. Missed Call Recovery Alerts

Automatically text back customers when your support agents are busy or offline:

  1. Configure Webhook: Point your VoIP provider's (e.g. Twilio, SIP trunk) "Missed Call Event URL" to WhatAPI's webhooks.
  2. Setup Auto-Alert: When a call is missed, the webhook event captures the caller's phone number and automatically replies on WhatsApp:

> *"Hello {customer_name}! We noticed we missed your call from our support line. An agent has been notified and will call you back shortly. In the meantime, feel free to reply to this chat with your query! 📞"*

3. CRM Integration

  • Customer Match: When call sessions finish, the VoIP agent logs the details. WhatAPI references the phone number against Firestore `contacts` and updates the contact status label (e.g., "Active Lead", "Support Ticket Open").
  • Voice Memos: Send recordings or voicemails directly to your customer's WhatsApp numbers as an audio message payload (`/messages/send-file` route with audio headers).