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

Aperta
#2,366 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
7.6k
Fork
1.8k
Merge medio
4g 20h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devlikeapro/waha

Tutte le issue di devlikeapro/waha

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.