Open-source self-hosted WhatsApp Connector compatible with LiveKit

We built an open-source, self-hosted WhatsApp Connector that implements LiveKit’s existing Connector protobuf/Twirp API:

The motivation was that LiveKit SDKs expose AcceptWhatsAppCall and DisconnectWhatsAppCall, but the Connector backend itself is not available for self-hosted deployments.

The main challenges were:

  • Matching the existing Connector RPC and JWT authentication contract
  • Meta SDP, ICE and multiple candidate handling
  • DTLS-SRTP fingerprint verification and safe teardown
  • Relaying Opus directly without transcoding
  • Bridging bidirectional audio into a LiveKit room
  • Preserving agent dispatch, participant attributes, and metadata
  • Propagating both remote and agent-initiated hangups correctly

The current implementation supports inbound WhatsApp calls with:

  • Existing LiveKit Python Connector clients
  • Meta pre_accept, accept, and terminate
  • ICE/DTLS-SRTP
  • Direct Opus RTP relay
  • LiveKit agent dispatch
  • Call context attributes and metadata
  • Caller and agent-initiated hangup
  • Repeated calls and cancellation-safe cleanup

We have tested it end to end against Meta’s Calling API and a self-hosted LiveKit deployment. Outbound WhatsApp calling is not implemented yet.

I also opened a small documentation PR proposing that LiveKit list it as an unofficial community connector:

Feedback is especially welcome on protocol compatibility, conformance testing, deployment patterns, and the best place in the LiveKit ecosystem to document community-maintained connectors.

1 Like