I Built a Voice AI Agent for Pre-Visit Insurance Clearance A developer built a Telnyx voice AI agent that automates pre-visit insurance clearance by turning patient phone calls into structured intake tickets. The agent uses Telnyx's Gather Using AI primitive to collect spoken requests, classify them, confirm details, create tickets, and send SMS confirmations, while routing non-clinical administrative data to billing staff. Pre-visit insurance clearance is one of those workflows that sounds simple until you see how many phone calls it creates. A patient calls before an appointment. They need to know whether a procedure, test, or medication requires prior authorization. Staff need to identify the patient, understand what they are asking for, collect payer and provider context, decide how urgent it is, and route the request to the right billing queue. I built a Telnyx code example that turns that call into a structured intake ticket. The code example: https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-pre-visit-clearance-voice-agent-python https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-pre-visit-clearance-voice-agent-python A patient calls a Telnyx number. Telnyx sends the inbound call event to a Flask webhook. The app answers with Call Control, then starts gather using ai to collect the patient's spoken pre-clearance request as structured fields. When Telnyx finishes collecting those fields, the app receives call.ai gather.ended . From there, the app classifies the request with AI Inference, confirms the details with the patient, creates a staff-facing ticket, sends the patient an SMS confirmation, and optionally alerts billing staff in Slack. The agent is non-clinical. It doesn't give medical advice, approve or deny coverage, or diagnose. It collects administrative data and routes it — which is the bottleneck in a lot of healthcare revenue-cycle work. The main Telnyx primitive here is Gather Using AI. The app asks Telnyx to gather the fields it needs directly inside the call. The webhook response gives the backend something structured enough to use in a workflow. That makes the rest of the app cleaner: call.ai gather.ended advances the workflowThe implementation patterns it covers: command id on Call Control commands send silence when idle when answering git clone https://github.com/team-telnyx/telnyx-code-examples.git cd telnyx-code-examples/ai-pre-visit-clearance-voice-agent-python cp .env.example .env pip install -r requirements.txt python app.py ngrok http 5000 Point your Telnyx Call Control Application webhook to: https://