Skip to content

Pipeline de Voz ​

Fluxo de Áudio ​

Telefone (PSTN 8kHz)
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Telnyx/Twilio SIP   β”‚
β”‚  WebSocket Stream     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ ΞΌ-law β†’ PCM
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Deepgram STT        β”‚
β”‚  Nova-3 (PT-BR)      β”‚
β”‚  endpointing: 500ms  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ texto
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  SmartTurn V3        β”‚
β”‚  stop: 2.5s          β”‚
β”‚  pre_speech: 500ms   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  OpenAI gpt-4o-mini  β”‚
β”‚  + GHL Function Call  β”‚
β”‚  (6 tools)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ texto resposta
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Cartesia TTS        β”‚
β”‚  Sonic-3 (Luana)     β”‚
β”‚  + flush_audio fix   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ PCM β†’ ΞΌ-law
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Telnyx/Twilio SIP   β”‚
β”‚  WebSocket Stream     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
     Telefone Lead

Supabase Schema ​

cold_call_logs ​

ColunaTipoDescriΓ§Γ£o
iduuidPK
call_idtextID da chamada (Twilio/Telnyx)
phonetextTelefone do lead
lead_nametextNome do lead
statustextcompleted, failed, etc
outcometextagendou, interessado, nao_atendeu, recusou
duration_secondsnumeric(10,2)DuraΓ§Γ£o em segundos
transcripttextTranscriΓ§Γ£o completa
cost_usdnumeric(8,4)Custo total USD
cost_breakdownjsonbBreakdown por componente
started_attimestamptzInΓ­cio da chamada

cold_call_retry_queue ​

ColunaTipoDescriΓ§Γ£o
iduuidPK
phonetextTelefone
attempt_numberintTentativa atual
max_attemptsintMΓ‘ximo configurΓ‘vel (1-6)
next_retry_attimestamptzPrΓ³ximo retry (business hours)
statustextpending, paused, calling, completed, cancelled

Custos por Chamada (~$0.04/min) ​

ComponenteCusto/min% Total
Telephony$0.04556%
TTS$0.01822%
STT$0.0056%
LLM$0.0023%

Endpoints API ​

MΓ©todoEndpointDescriΓ§Γ£o
GET/healthHealth check
GET/costs/summary?days=30Custos agregados
GET/calls/activeChamadas ativas
GET/retry/queueFila de retries
POST/retry/nowRetry imediato
POST/retry/cancelCancelar retry
POST/retry/settingsToggle auto-retry + max_attempts
POST/retry/processProcessar fila (cron)
POST/outbound-callIniciar chamada

AI Factory V3 - Mottivme Sales