Skip to content

Telephony Integrations

Overview

Telephony in this codebase is split between Twilio-driven messaging/call webhooks and PBX-driven outbound call helpers. The old root FreePBX document described a complete replacement path, but the current repository reflects a hybrid state instead.

Twilio-Centered Paths

  • Inbound SMS: supabase/functions/message-inbound
  • Outbound SMS/MMS: message-send, send-file, campaign-lead-send
  • Delivery/status webhooks: message-delivery-status, campaign-lead-delivery-status
  • Call recording/transcript handling: call-recording-transcript
  • Voicemail drop proxy: voicemail-drop

PBX-Centered Paths

  • Browser-side PBX URL builder: src/utils/callHelpers.ts
  • Click-to-call bridge: freepbx/gm-call.php
  • PBX-related Edge Functions: lead-pbx-actions, lead-pbx-sms-actions, thread-call-dial, thread-voicemail-open
  • FreePBX dialplan artifacts exist in freepbx/extensions_custom.conf and freepbx/extensions_override_freepbx.conf

Current Status

  • PBX support exists and is wired into parts of the calling flow
  • Twilio is still deeply embedded across messaging, delivery tracking, replay, transcript retrieval, and several call-related workflows
  • The repository does not yet represent a clean end-state “Twilio replaced by FreePBX + R2” architecture

Documentation Rule Going Forward

When updating telephony behavior, document it in this feature doc and in the Message Center module doc based on the actual provider path involved. Do not assume one provider owns every communication workflow.