Skip to content

fix(realtime): recover calling state after a realtime resync - #1548

Merged
viethung0o0 merged 4 commits into
mainfrom
fix/realtime-calling-recovery
Oct 23, 2026
Merged

viethung0o0 merged 4 commits into
mainfrom
fix/realtime-calling-recovery

Conversation

@viethung0o0

@viethung0o0 viethung0o0 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Calling now recovers when the realtime gateway cannot replay what a tab missed, such as after a long disconnect or a gateway restart.
  • Agents are no longer marked offline when the builder is slow to answer presence reports.

Changes

  • Reload missed incoming-call rings after a resync, without dropping rings that are still answerable.
  • Let the agent who started an outbound call fetch a missed SDP answer again.
  • Renew presence per workspace with a concurrency cap instead of one serial sweep.
  • Retry the ring job when the offer reaches no agent.
  • Update the realtime and calling docs.

Test plan

  • pnpm lint
  • pnpm turbo check-types (pre-commit hook)
  • Unit tests for realtime, worker, business and the builder calling code
  • Manual check with simulated calls on a dev workspace: ring appears, ends, and comes back after a forced resync
  • Manual check with a real WhatsApp call

@github-actions github-actions Bot added the bug Something isn't working as expected label Oct 23, 2026
@viethung0o0
viethung0o0 marked this pull request as ready for review October 23, 2026 16:36
@viethung0o0
viethung0o0 merged commit 4a305f7 into main Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants