AI Receptionist with Database Lookup
An AI agent answers the call, looks up the caller in your database, and provides personalized service before routing to the right department.
Overview
This use case demonstrates:
- Database lookup by caller number on call arrival
- Creating new leads for unknown callers
- Intent classification to determine routing
- Seamless handoff via
connect()andclose()
State flow: PENDING -> ANSWERED -> CONNECTED -> DISCONNECTED
Example
How It Works
- The call arrives and the AI agent answers immediately
- The agent uses
call.caller_numberto look up the caller in a CRM or database - If found, the agent delivers a personalized greeting and surfaces relevant account info (open tickets, pending orders, etc.)
- If not found, the agent creates a new lead record in the database
- The AI listens to the caller and classifies their intent
- If the caller needs to speak to a human, the AI connects them to the original callee using
connect()and then leaves the call withclose() - If the intent doesn’t require a human, the AI continues the conversation directly
Key Commands Used
answer()- Answer the incoming callsend_audio()- Play synthesized speech to the callerconnect()- Connect to the original calleeclose()- Leave the call after connecting the caller to the callee
Related
- AI Agent with Human Escalation - Similar pattern with intelligent escalation
- After-hours Voicemail - Time-based routing before answering
