Skip to content

feat(whatsapp): route BSUID calls through the active identity - #15546

Draft
muhsin-k wants to merge 1 commit into
codex/pr-15175-basefrom
codex/cw-7807-bsuid-calling
Draft

feat(whatsapp): route BSUID calls through the active identity#15546
muhsin-k wants to merge 1 commit into
codex/pr-15175-basefrom
codex/cw-7807-bsuid-calling

Conversation

@muhsin-k

@muhsin-k muhsin-k commented Aug 21, 2026

Copy link
Copy Markdown
Member

WhatsApp customers can become addressable only by a BSUID after WhatsApp stops sharing their phone number. Text messages already follow the exact identity attached to the conversation, but outbound calling still assumes that the contact has a phone number. This hides or rejects the call action for BSUID-only customers and can select the wrong destination after contacts are merged.

This PR makes the current conversation's WhatsApp identity authoritative for outbound calls. Calls and call-permission requests use the exact ContactInbox#source_id attached to that conversation. Phone-number calling continues to work as before.

What changed

  • Show the call action for a BSUID-only conversation when its WhatsApp inbox has calling enabled.
  • Send the BSUID in Meta's recipient field for outbound calls and call-permission requests.
  • Keep phone-number recipients on the existing to field.
  • Preserve the selected conversation instead of guessing between identities owned by a merged contact.
  • Keep contact-level calling phone-only when no conversation has established the destination.

Things to know

  • This change applies to Meta Cloud WhatsApp calling. Twilio Voice does not use the WhatsApp BSUID calling API and remains unchanged.
  • This PR is based on #15175. Once that PR is merged, this PR should be retargeted to develop.

How to test

  1. Use a Meta Cloud WhatsApp inbox with calling enabled.
  2. Open a conversation whose ContactInbox#source_id is a BSUID and whose contact has no phone number.
  3. Confirm the call action is available and start an outbound call.
  4. Confirm the call remains in the same conversation and Meta receives the BSUID as recipient.
  5. Test a customer without call permission and confirm the permission request is sent to the same BSUID identity.
  6. Confirm a normal phone-number conversation still places the call using the existing flow.

Fixes

Fixes https://linear.app/chatwoot/issue/CW-7807

@muhsin-k
muhsin-k force-pushed the codex/cw-7807-bsuid-calling branch from 9bbb189 to 31f6e0f Compare August 21, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant