Twilio call tracking

VibeAds Pro and Max use Twilio Programmable Voice for the call tracking + DNI infrastructure. You never sign up for Twilio directly. We manage the numbers, billing, and webhooks under our own account.

What we use Twilio for

  • Provision local tracking numbers per campaign
  • Forward inbound calls to your business number
  • Play two-party consent announcement
  • Record both sides of the call (dual-channel)
  • Webhook into VibeAds on call completion
  • Fire post-call processing (Deepgram + Gemini)

Number provisioning

On campaign publish (Pro and Max), provision-tracking-number Edge Function:

  1. Picks an area code matching the campaign's primary target location
  2. Purchases the Twilio number
  3. Configures the voice + status webhooks to point at VibeAds Edge Functions
  4. Stores the number in call_tracking_numbers table
  5. Returns the number to the campaign so the funnel page injects it

TwiML call handling

Inbound call hits call-webhook:

  1. Play consent announcement (TTS)
  2. <Dial> the business number with record="record-from-answer-dual"
  3. If the business does not answer in 30s, leave voicemail (TTS prompt)
  4. Twilio fires call-status webhook on call completion
  5. call-status triggers post-call processing

13 US states require all-party consent for call recording: CA, CT, DE, FL, IL, MD, MA, MI, MT, NV, NH, PA, WA. Our approach: always play a consent announcement before dialing. Caller staying on the line = implied consent. Covers all 50 states.

Default text: "This call may be recorded for quality purposes." Configurable per-campaign via the call tracking settings.

Post-call processing

  1. Download recording from Twilio (~$0 cost, just bandwidth)
  2. Deepgram Nova-3 batch transcription with speaker diarization (~$0.0066/min)
  3. Gemini 2.0 Flash analyzes transcript (~$0.0002/call)
  4. Extracts: spam flag, lead score 0-100, intent, service type, urgency, summary, recommended action
  5. Creates CRM lead record with call linkage
  6. If Jobber connected + score ≥ 30: creates Jobber Client + Request
  7. Push notification if qualified lead OR missed call
  8. 15-min cron: upload qualified calls with gclid to Google Ads as offline conversion

Security and signature verification

Every Twilio webhook is verified using the X-Twilio-Signature header. VibeAds computes the expected HMAC-SHA1 with our Twilio auth token and rejects requests where the signature does not match. Prevents spoofed webhook attacks.

Cost

VibeAds absorbs the cost within tier minute caps:

  • Pro: 1 tracking number ($1/mo Twilio rental) + 100 minutes/month included ($0.85 Twilio voice)
  • Max: 3 tracking numbers + unlimited minutes
  • Per-call AI cost: ~$0.03 transcription + $0.0002 analysis = ~$0.03/call

Pro overage above 100 min/mo bills at $0.01/min on your next invoice. Max never overages (unlimited).