AI agent & calling

AI agent, auto-reply & calling

Bind one of your voice AI agents to a WhatsApp number and it can reply to messages automatically and answer WhatsApp voice calls. Both are native-channel features and both are configured per channel. This page covers turning them on, the requirements, and the APIs.


AI auto-reply

When a customer messages your number, the bound agent generates and sends a reply — no human needed. You can pause the AI on any single conversation for a human to take over, then resume.

Turn it on

In the dashboard: open Communicate → WhatsApp, pick the channel, and in the agent bar choose an answering agent, then toggle AI on. Owners and admins only.

Over the API (dashboard JWT):

curl -X PUT https://api.telenow.ai/api/orgs/{orgId}/whatsapp-hub/channels/{channelId}/agent \
  -H "Authorization: Bearer <jwt>" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{ "agent_id": "a1b2c3d4-…", "ai_enabled": true }'
{ "success": true }
FieldTypeRequiredNotes
agent_iduuidto enable AIthe agent that answers; must belong to your org
ai_enabledbooldefault false; forced false when no agent is bound

Requirement: auto-reply runs only when the platform flag FEATURE_WHATSAPP_AGENT is on and the channel has an agent bound with ai_enabled: true. Voice-note transcription for the agent isn't built yet, so a customer's voice note doesn't trigger a reply.

Pause AI on one conversation

Hand a single thread to a human (and resume later) without unbinding the agent:

curl -X PUT https://api.telenow.ai/api/orgs/{orgId}/whatsapp-hub/threads/{threadId}/pause \
  -H "Authorization: Bearer <jwt>" -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{ "paused": true }'

Any org member can pause/resume. In the dashboard this is the Pause AI / Resume AI control on the thread.

How it works

An inbound message (fresh, within 24 hours) that is real user text runs the bound agent on that conversation and sends its reply back — the reply shows in the shared inbox tagged AI, and it fires the normal whatsapp.message.status events. While the agent composes, a typing indicator is shown to the customer.


WhatsApp Calling

WhatsApp lets customers place a voice call to your business number. With calling enabled, your voice AI agent answers the call — the same agent stack you use for phone calls, bridged to WhatsApp over WebRTC. Calls are logged, and a call that can't be answered is cleanly rejected rather than left ringing into dead air.

Requirements (mandatory)

Calling needs more than the messaging setup. All of these must be in place:

RequirementWhat / who
A native WhatsApp channeltelenow_whatsapp_cloud (the recommended connection)
An answering agent bound to the channelthe voice agent that picks up
Platform build with the wa_calling_media featurethe media plane is a compile-time cargo feature (operator/self-host step)
Runtime flag FEATURE_WHATSAPP_CALLING_MEDIA=trueenables the media plane at runtime
WHATSAPP_CALL_ICE_URLS — a STUN/TURN serverWebRTC needs a reachable ICE path; a public IP or a TURN server is required for media to connect

The last three are platform/operator settings (see the go-live runbook). On a hosted Telenow plan they're already provisioned — you only bind an agent and toggle calling on. If calling isn't available in your workspace, contact your administrator.

Turn it on

In the dashboard: on the channel, open the Calling bar, pick an answering agent, and toggle calling on. This also flips the calling setting at Meta for your number. Owners and admins only.

Over the API (dashboard JWT):

curl -X PUT https://api.telenow.ai/api/orgs/{orgId}/whatsapp-hub/channels/{channelId}/calling-agent \
  -H "Authorization: Bearer <jwt>" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{ "agent_id": "a1b2c3d4-…", "calling_enabled": true }'
{ "success": true }
FieldTypeRequiredNotes
agent_iduuidto enable callingthe agent that answers calls; must belong to your org
calling_enabledbooldefault false; forced false when no agent is bound. Setting this calls Meta to enable/disable calling on the number

To turn calling off, send { "calling_enabled": false }.

How a call flows

  1. A customer places a WhatsApp call to your number → Meta sends Telenow a connect event.
  2. If calling is enabled and an agent is bound and the media plane is on, Telenow answers: it negotiates WebRTC, stands up the agent's session, and accepts the call at Meta. The agent talks to the caller.
  3. Otherwise the call is rejected at Meta immediately — the caller isn't left ringing.
  4. When either side hangs up, the call is logged with its duration.

Call log

List a channel's calls (most recent first):

curl "https://api.telenow.ai/api/orgs/{orgId}/whatsapp-hub/channels/{channelId}/calls" \
  -H "Authorization: Bearer <jwt>" -H "X-Org-Id: {orgId}"
{ "success": true, "data": { "calls": [
  { "call_id": "wacid.…", "direction": "inbound", "from_number": "+919876543210",
    "status": "completed", "duration_secs": 92, "agent_id": "a1b2c3d4-…",
    "start_time": "2026-01-01T12:00:00Z", "end_time": "2026-01-01T12:01:32Z" }
] } }

status is one of ringing, accepted, rejected, completed, failed, or missed. The endpoint returns up to the 100 most recent calls (newest first) with no pagination, filtering, or offset — for full history, consume the calls webhook/events instead. duration_secs is in seconds, and direction reflects the value WhatsApp reports for the call (e.g. inbound).