[GOWS] Call log: calls placed from the phone and call history never reach WAHA (callLogRecords / app-state call_log dropped)

Open
#2,366 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
go, typescript

Research direction

Start by reviewing the GOWS engine changes in devlikeapro/gows-plus#23 and how WAHA handles GOWS events and history sync. The issue proposes a calls API backed by GetCallLogs and a call.log webhook from GOWS CallLogEvent. Done means exposing those records through both paths; the described engine work is cross-project and already has a linked pull request.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.

With GOWS there is no way to show the account's calls in a chat the way WhatsApp does (the "Voice call · 1 min", "Missed voice call", "Group call · 2 invited" bubbles). The call signalling events (call.received / call.accepted / call.rejected, and events.CallOffer / CallAccept / CallTerminate on engine.event) reach a linked device only for incoming and group calls:

  • a 1:1 call placed from the phone produces no event at all on the linked device (no <call> node reaches it);
  • an incoming call answered on the phone ends with terminate reason=accepted_elsewhere, so the duration is never known;
  • nothing covers the calls made before the session was paired.

WhatsApp does send all of it to linked devices - this is how WhatsApp Web / Desktop draws the call bubbles:

  1. History sync carries the call log in HistorySync.callLogRecords (field 13), when the device asks for it - which GOWS already does with WAHA_GOWS_DEVICE_HISTORY_SYNC_SUPPORT_CALL_LOG_HISTORY=true.
  2. App state: every call that ends on one of the account's devices (outgoing calls from the phone included) arrives as a call_log mutation in the regular collection (SyncActionValue.callLogAction.callLogRecord). whatsmeow already emits it as events.AppState.

GOWS drops both: handleHistorySync stores only conversations, and events.AppState is not stored (and is excluded from the event stream by WAHA, which is right - it carries every app-state mutation). The data reaches the engine and is lost there.

A CallLogRecord has everything a call bubble needs: callID, callResult (CONNECTED / REJECTED / MISSED / ...), duration (seconds), startTime (ms), isIncoming, isVideo, callCreatorJID, groupJID, participants, callType.

Describe the solution you'd like

Engine side - devlikeapro/gows-plus#23:

  • store call log records in a gows_call_logs table (one row per call id, history sync + app-state call_log);
  • emit gows.CallLogEvent for every app-state entry (it rides engine.event today);
  • GetCallLogs gRPC: by chat, newest first, paged.

WAHA side (to build on it):

  • GET /api/{session}/calls?chatId=...&limit=...&offset=... backed by GetCallLogs;
  • a call.log webhook event from gows.CallLogEvent.

Describe alternatives you've considered

  • Building the bubbles from the call signalling events only: no outgoing 1:1 calls, no durations, no history.
  • Reading the GOWS sqlite store directly: the call log is not stored there.

Additional context

Verified on a real account with a GOWS build carrying the PR (WAHA 2026.10.1, gows-plus v1.0.49):

  • pairing stored the account's call log from the history sync (incoming answered / missed, outgoing with duration, group voice chats), each under the right chat;
  • live, every outgoing call (voice answered, voice declined by the callee, video) arrived as gows.CallLogEvent within seconds of hanging up, with result and duration;
  • incoming calls answered or rejected on the phone produce no call_log mutation (waited minutes) - for those the signalling events remain the source; the call id is the same in both, so a consumer can merge them.
Dominant language
TypeScript
Stars
7.6k
Forks
1.8k
Avg merge
4d 20h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from devlikeapro/waha

All issues in devlikeapro/waha

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.