Skip to content

Vapi Voice AI Integration | Voice Assistant API | Conversational AI | Speech Recognition | Voice Bots | AI Telephony | Natural Language | Voice Technology

Notifications You must be signed in to change notification settings

akashmahlaz/vapi

Repository files navigation

Logician AI Voice Assistant (Vapi + Exotel)

This app is a Next.js project that integrates Vapi AI for voice conversations (web and phone) with multilingual support (Kannada default, plus English, Tamil, Telugu, Punjabi). It supports:

  • Web conversations via the browser microphone
  • Outbound phone calls via Vapi transport
  • Outbound phone calls via Exotel Connect API (India-friendly)
  • Inbound phone calls by forwarding your Exotel number to your Vapi-managed number

Environment Variables

Create .env.local with the following keys:

  • Client
    • NEXT_PUBLIC_VAPI_PUBLIC_KEY
    • NEXT_PUBLIC_VAPI_ASSISTANT_ID
  • Server
    • VAPI_API_KEY (private key)
    • VAPI_PHONE_NUMBER_ID (your Vapi phone number id)
    • TWILIO_PHONE_NUMBER (your Vapi-managed public number)
    • NEXT_PUBLIC_BASE_URL (e.g., https://your-app.vercel.app)
    • Exotel
      • EXOTEL_ACCOUNT_SID
      • EXOTEL_API_KEY
      • EXOTEL_API_TOKEN
      • EXOTEL_SUBDOMAIN (e.g., api.exotel.com)
      • EXOTEL_CALLER_ID (your Exophone)

Outbound via Exotel

Endpoint: POST /api/exotel/call/outbound

Body:

{ "customerPhone": "+91XXXXXXXXXX", "customerName": "Optional" }

Behavior: Exotel dials the customer first (From), shows your Exophone as caller ID, then bridges to your Vapi public number (To) so the AI assistant handles the call.

Inbound with Exotel → Vapi

To receive inbound calls on your Exotel number with the AI assistant:

  1. In Exotel dashboard, set your Exophone call flow to “Connect” to external number
  2. Use your Vapi-managed public number (e.g., +1 765 945 2629) as the destination
  3. Ensure the Vapi number is linked to your assistant in the Vapi dashboard
  4. Save and test by calling your Exophone

Notes:

  • If your Exotel account restricts international dialing/forwarding, contact Exotel support or use a Vapi-supported provider (e.g., Vonage) for the public number in the same region as your callers.
  • For trial accounts, you might need to verify destination numbers.

Web Test

Visit /call-center and use the “Test via Browser” card to start/stop a web session with the assistant.

Data Storage

Server events and captured leads are stored in MongoDB via app/api/vapi/webhook/route.ts. Update lib/db.ts with your connection string.

About

Vapi Voice AI Integration | Voice Assistant API | Conversational AI | Speech Recognition | Voice Bots | AI Telephony | Natural Language | Voice Technology

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published