How to Build Voice AI Agents: Phone Calls, IVR, and Voice Automation in 2026
Automate12 min read·April 6, 2026·--

How to Build Voice AI Agents: Phone Calls, IVR, and Voice Automation in 2026

Voice AI agents can handle inbound calls, qualify leads, book appointments, and collect information — 24/7, without a human. This guide covers the full stack for building voice automation.

@
@kivorablog
April 6, 2026
Share

The Voice AI Opportunity


Phone calls are still the highest-converting communication channel for many businesses. A human answering 50 calls per day is a full-time job. A voice AI agent can handle 500 calls simultaneously.


Use Cases That Pay


Use CaseIndustryRevenue Model
Appointment bookingClinics, salons, restaurants$200–$500/month per client
Lead qualificationReal estate, insurance, auto$300–$800/month per client
Order status updatesE-commerce$100–$300/month per client
Payment remindersAny business$150–$400/month per client
Inbound FAQ handlerAny business$200–$600/month per client



The Stack Comparison


Budget Stack (Under $50/month)


ToolPurposeCost
Twilio VoicePhone numbers + call routing$1/number/month + $0.014/min
Twilio TwiMLCall flow logicIncluded
Groq + WhisperSpeech-to-text + AI responseGroq free, Whisper ~$0.006/min
ElevenLabsText-to-speechFree (10k characters/month)
RailwayServer hosting$5/month

Professional Stack (For Client Work)


ToolPurposeCost
Vapi.aiAll-in-one voice AI platform$0.07/min (outbound)
TwilioFallback and additional numbersPay-per-use
ElevenLabs ProHigh-quality voices$22/month
Retell AIAlternative to Vapi$0.05/min

Recommendation: Use Vapi for client work — it handles the complexity of real-time voice AI so you can focus on the business logic.




Building With Vapi.ai (Recommended Approach)


Vapi abstracts away the complexity of real-time audio processing, wake word detection, and conversation state management.


Step 1: Create a Vapi Account


  • Go to vapi.ai and create an account
  • You get $10 free credits to start

Step 2: Create Your Voice Agent

// Create an assistant via Vapi API
const response = await fetch('https://api.vapi.ai/assistant', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.VAPI_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Appointment Booking Agent',
    voice: {
      provider: '11labs',
      voiceId:  'rachel',   // Choose from ElevenLabs voices
    },
    model: {
      provider: 'groq',
      model:    'llama-3.3-70b-versatile',
      messages: [
        {
          role:    'system',
          content: `You are Sarah, a friendly appointment booking assistant for Lagos Dental Clinic.

Your job:
1. Greet the caller warmly
2. Ask what type of appointment they need (checkup, cleaning, filling, emergency)
3. Check availability (you have slots Mon-Fri 9am-5pm)
4. Collect their name and phone number
5. Confirm the booking details
6. End the call professionally

Always speak in a warm, professional tone. Keep responses concise — this is a phone call, not a chat.`
        }
      ]
    },
    firstMessage: "Hello! Thank you for calling Lagos Dental Clinic. I'm Sarah, your scheduling assistant. How can I help you today?",
  })
})

const assistant = await response.json()
console.log('Assistant ID:', assistant.id)

Step 3: Set Up Phone Number

// Purchase and assign a phone number
const phoneNumber = await fetch('https://api.vapi.ai/phone-number', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.VAPI_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    provider:    'twilio',
    areaCode:    '234',      // Nigeria country code (for Twilio Nigeria numbers)
    assistantId: assistant.id,
  })
})

Step 4: Handle Function Calls (Book Appointments)

Teach the agent to trigger real actions when it gathers information:

// Add this to your assistant configuration
tools: [
  {
    type: 'function',
    function: {
      name:        'book_appointment',
      description: 'Book an appointment when the patient provides their details',
      parameters:  {
        type:       'object',
        properties: {
          patient_name:  { type: 'string', description: 'Patient full name' },
          phone_number:  { type: 'string', description: 'Patient phone number' },
          appointment_type: {
            type: 'string',
            enum: ['checkup', 'cleaning', 'filling', 'emergency']
          },
          preferred_date: { type: 'string', description: 'Preferred appointment date' },
          preferred_time: { type: 'string', description: 'Preferred time slot' },
        },
        required: ['patient_name', 'phone_number', 'appointment_type']
      }
    }
  }
]

// Handle the function call in your webhook
app.post('/vapi-webhook', async (req, res) => {
  const { type, functionCall } = req.body

  if (type === 'function-call' && functionCall.name === 'book_appointment') {
    const { patient_name, phone_number, appointment_type, preferred_date } = functionCall.parameters

    // Add to your booking system (Google Calendar, Calendly, your database)
    await addToCalendar({ patient_name, phone_number, appointment_type, preferred_date })

    // Send confirmation SMS via Twilio
    await sendConfirmationSMS(phone_number, patient_name, preferred_date)

    return res.json({ result: 'Appointment booked successfully' })
  }

  res.json({ result: 'OK' })
})

Getting Your First Voice AI Client

The Pitch

Walk into a busy clinic, salon, or restaurant. Count how many times the phone rings while you're there. Then calculate:

30 calls/day × 3 minutes/call = 90 minutes of staff time per day
90 minutes × 22 working days = 33 hours/month
33 hours × ₦1,500/hour = ₦49,500/month in labour cost

Your AI handles 80% of those calls = ₦39,600/month in recovered labour
Your monthly fee: ₦30,000–₦50,000

The business is paying ₦30,000 to save ₦39,600. It's not a hard sell.

Read more on Kivora Blog

Read more on Kivora Blog

Get started →