{"slug": "inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-lsa", "title": "Inside a Sub-Second Contractor AI Receptionist: Telnyx SIP, LiveKit Media, Spam Filtering & Google LSA Lead Recovery", "summary": "OnCrew detailed the architecture behind its sub-second AI receptionist for home-service contractors, streaming audio through a Telnyx SIP trunk and LiveKit WebRTC media room with streaming VAD, STT, LLM token generation and sentence-chunked TTS to keep turn latency under roughly 900ms, versus 1,800–3,400ms for naive webhook prototypes. The system adds trade-specific deterministic safety triggers across 14 trades, a post-call pipeline that filters spam and sub-15-second hang-ups (which the company says make up 30.4% of inbound contractor traffic), and a Google LSA invalid-lead dispute packet generator.", "body_md": "When a homeowner calls an HVAC or plumbing shop at 2:14 AM with water pouring out of a burst supply line, a 2.5-second pause after \"Hello?\" is not a minor UX wart. It is an immediate hang-up and a $1,200 job handed to the next listing on Google.\n\nAcross 6,273 anonymized contractor calls we analyzed in 2026:\n\nBuilding a voice AI receptionist that survives real home-service calls (attic noise, barking dogs, stressed homeowners, carrier forwarding quirks, and $75/call Google Local Services Ads spam) turns out to be a telephony and state-machine engineering problem far more than a prompt-engineering problem.\n\nHere is the real architecture we use at [OnCrew](https://oncrew.ai) to keep voice latency sub-second, stop contractors from paying for robocalls, capture job photos mid-call, and recover invalid Google LSA ad spend automatically.\n\nMost prototype AI receptionists stitch together naive HTTP webhooks:\n\n``` php\nPSTN -> SIP Carrier -> Twilio/Legacy Media Stream -> Wait for full utterance\n-> REST STT -> Non-streaming LLM -> Full TTS buffer -> Audio playback\n(Typical end-to-end turn latency: 1,800ms to 3,400ms)\n```\n\nIn a live emergency call, anything past ~900ms feels broken. Callers assume the line dropped, say \"Hello? Are you there?\", collide with the bot's delayed audio, and trigger cascading barge-in resets.\n\nTo hold sub-second conversational turn latency on PSTN phone calls, every layer has to stream:\n\n```\nCaller (PSTN / Carrier Forward)\n  |\n  v\nTelnyx SIP Trunk (US local DID, low-jitter RTP)\n  |\n  v\nLiveKit Real-Time Media Room (WebRTC / SIP bridge)\n  |\n  +--> Streaming VAD + Turn Endpointing (distinguish pause vs done speaking)\n  +--> Streaming STT (word-level partial transcripts)\n  +--> Trade-Specific State Machine + Streaming LLM Token Generation\n  +--> Sentence-Chunked Neural TTS (first audio byte before LLM finishes)\n  |\n  v\nStructured Post-Call Pipeline:\n  1. Spam / <15s unbilled filter\n  2. Urgency + Safety Classification (14 home-service trades)\n  3. Instant On-Call Tech SMS + Dashboard Recording/Transcript\n  4. Google LSA Invalid-Lead Dispute Packet Generator\n  5. Native Calendar / FSM / REST Webhook (call.completed & call.urgent)\n```\n\nThree telephony details matter more in production than almost anything else:\n\nOpen-ended LLM instructions are risky when life-safety calls arrive. Before asking for a zip code or booking preference, contractor intake needs deterministic safety triggers tailored to each trade:\n\n| Trade | Immediate Safety Trigger | Required First Action | Escalation Path | \n|---|---|---|---|\n| **HVAC** | Natural gas odor, rotten-egg smell, CO detector chirping | Advise stepping outside immediately & calling 911 / gas utility | Flag `urgency: emergency` , notify on-call lead | \n| **Plumbing** | Active flooding, burst main line, water near electrical panel | Guide caller to shut off main water valve / cold supply | Capture street address + SMS photo of leak/tank | \n| **Electrical** | Sparking panel, burning plastic smell, downed drop line | Advise staying clear & cutting main breaker only if safe | Immediate live transfer or Press-1 tech escalation | \n| **Roofing** | Active ceiling collapse, exposed live wiring in storm leak | Advise moving away from sagging drywall / turning off circuit | Capture storm leak photo + priority callback | \n\nYou can build and export a printable 3-tier escalation SOP across 14 trades (no signup required) using our free [On-Call Escalation Builder](https://oncrew.ai/tools/on-call-escalation-builder).\n\nTraditional call centers (and several per-call AI vendors) charge for every answered leg:\n\nBecause **30.4%** of real inbound contractor phone traffic consists of `<15s` hang-ups, silent dialers, and solicitation robocalls, billing every connected call acts as a hidden 30% tax on the contractor.\n\nIn our post-call metering pipeline, every finished SIP leg passes through an automated billing-exclusion filter before minutes decrement:\n\n`abandoned` / zero meaningful caller intent) and billed Taking a name and callback number is table stakes. The real operational leap happens **while the caller is still on the phone**:\n\nFor home-service shops and the PPC agencies managing their ad spend, missed calls and junk Google Local Services Ads (LSA) leads are often a bigger leak than answering fees.\n\nAt **$50 to $120 per Google LSA call**, roughly 15% - 25% of inbound paid calls are disputable:\n\nMost small shops eat the loss because nobody has time on Friday evening to scrub recordings and build evidence notes. By enforcing **zip-code and service-scope verification inside the first 30 seconds** of every call, the post-call pipeline automatically tags invalid LSA legs and generates a 1-click timestamped transcript + recording dispute packet.\n\nRecovering just two invalid LSA calls per month covers the entire cost of a $49 - $149/month receptionist plan. Contractors and agencies can model exact monthly recovery math with our free [Google LSA Credit Calculator](https://oncrew.ai/tools/google-lsa-calculator) or inspect our [Agency Partner Portal](https://oncrew.ai/agencies).\n\nInstead of locking small shops into a single $2,000/month enterprise CRM, clean REST hooks let any shop connect call outcomes to Housecall Pro, Workiz, FieldEdge, Service Fusion, Google/Outlook Calendar, Slack, Google Sheets, or Zapier (`call.completed` and `call.urgent`).\n\nA clean v2 webhook payload looks like this:\n\n```\n{\n  \"event\": \"call.urgent\",\n  \"call_log_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"company_name\": \"Summit Plumbing and Heating\",\n  \"company_trade\": \"hvac\",\n  \"duration_seconds\": 96,\n  \"caller_name\": \"Dana Reyes\",\n  \"callback_number\": \"+15125550142\",\n  \"caller_location\": \"4116 Lawless St, Austin, TX\",\n  \"commercial_or_residential\": \"residential\",\n  \"job_type\": \"AC repair\",\n  \"service_needed\": \"AC running but blowing warm air, house at 84F\",\n  \"urgency\": \"emergency\",\n  \"outcome\": \"lead\",\n  \"wants_immediate_callback\": true,\n  \"summary\": \"Dana's AC is running but not cooling (84F indoors). Requests same-day repair.\",\n  \"recording_url\": \"https://oncrew.ai/calls/00000000-0000-4000-8000-000000000001\",\n  \"dashboard_url\": \"https://oncrew.ai/calls/00000000-0000-4000-8000-000000000001\"\n}\n```\n\nFiltering out test calls, `<15s` hang-ups, and the shop's own team numbers before firing `call.completed` keeps downstream CRMs free of junk records.\n\nHalf of all trial drop-offs happen at a surprisingly mundane step: **forwarding the shop's existing phone number without breaking day-to-day calls.**\n\nMost owners do not want unconditional forwarding (`*72`), which sends every daytime call away from their phone. They want **conditional forwarding (busy / no-answer / unreachable)** so the phone rings 3 - 4 times in their pocket first, and only routes to the AI receptionist if they cannot answer on a ladder or after hours:\n\n`*71<10-digit-number>` (conditional) vs `*72` (all calls); cancel with `*73`.`*61*<number>#` (no answer), `*67*<number>#` (busy), `*62*<number>#` (unreachable); cancel with `##004#`.`**61*1<number>#` (no answer), `**67*1<number>#` (busy); cancel with We open-sourced the full carrier code matrix under CC-BY-4.0 on GitHub ([us-call-forwarding-codes](https://github.com/Quirk6/us-call-forwarding-codes)) and built an interactive [Call-Forwarding Wizard](https://oncrew.ai/tools/call-forwarding-wizard) so owners can generate exact tap-to-dial codes in 30 seconds.\n\nNever trust a landing page for voice AI. Put any system through a real 2 AM emergency call, interrupt it mid-sentence, test a Spanish switch, and verify how fast the structured SMS summary hits your phone.\n\nYou can call our live public trade demo line right now at **(213) 319-5075**, try an interactive demo at [oncrew.ai/demo](https://oncrew.ai/demo), or compare transparent flat-rate plans ($49/mo for 250 min, $149/mo for 1,000 min, $349/mo for 2,500 min, 14-day cardless trial) at [oncrew.ai/pricing](https://oncrew.ai/pricing).\n\nAbe\n\nFounder, OnCrew", "url": "https://wpnews.pro/news/inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-lsa", "canonical_source": "https://dev.to/oncrew/inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-filtering-google-3cch", "published_at": "2026-12-06 11:11:19+00:00", "updated_at": "2026-12-06 11:14:26.613757+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "natural-language-processing", "ai-products"], "entities": ["OnCrew", "Telnyx", "LiveKit", "Google Local Services Ads", "Google"], "also_reported_by": [], "takeaway": "Streaming every layer—Telnyx SIP into a LiveKit media room with streaming VAD, word-level STT, token-level LLM output and sentence-chunked TTS—keeps voice turns under ~900ms, while deterministic per-trade safety triggers and a sub-15-second spam filter handle the 30.4% of calls that are hang-ups or ", "recommendation": {"advice": "Stream VAD, STT, LLM tokens and sentence-chunked TTS end to end instead of buffering full utterances, and gate billing and escalation with deterministic trade-specific safety triggers before any LLM-driven intake.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-lsa", "markdown": "https://wpnews.pro/news/inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-lsa.md", "text": "https://wpnews.pro/news/inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-lsa.txt", "jsonld": "https://wpnews.pro/news/inside-a-sub-second-contractor-ai-receptionist-telnyx-sip-livekit-media-spam-lsa.jsonld"}}