Twilio call tracking

VibeAds Pro uses 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), 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.

Callers hear: "You've reached [your business]. This call is recorded, transcribed and analyzed by A.I. so we can follow up with you." The name is the campaign's business name, or your business profile's. Recording starts when you answer, after the announcement.

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. Google's Gemini analyzes the transcript (about $0.001/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:

  • Pro: 5 tracking numbers + unlimited minutes
  • Per-call AI cost: ~$0.03 transcription + ~$0.001 analysis = ~$0.03/call