VEXYL AI

Outbound Calls

Webhook-based outbound calling system that triggers calls via external AMI scripts. VEXYL solves the "cold start" problem in AI calls by playing an immediate greeting while the LLM context warms up in parallel.

Greeting Modes

ModeLatencyDescriptionUse Case
dynamic500-1000msInitial TTS + LLMRecommended - Personalized outbound
static<200msPre-recorded WAVSimple announcements
hybrid<200msStatic intro + LLMBest UX with fast start

HTTP API Reference

Initiate Call

Trigger a new outbound call with full customization.

POST /outbound/initiate

Request Parameters

ParameterRequiredDescription
phoneNumberYesDestination number (e.g. +91...)
languageNoLanguage code (e.g. ml-IN)
greetingModeNostatic, dynamic, hybrid
metadataNoCustom data for LLM context

Full Request Example

{
  "phoneNumber": "+919876543210",
  "language": "ml-IN",
  "greetingMode": "dynamic",
  "initialGreeting": "Hello, this is VEXYL AI calling.",
  "webhookUrl": "http://your-server/status-callback",
  "metadata": {
    "botId": "kerala-election-survey",
    "caller_name": "John Doe",
    "llm_context": "Election survey call. Customer is a registered voter.",
    "account_id": "ACC123456",
    "priority": "high"
  }
}

Get Call Status

GET /outbound/status/{uuid}

Dynamic Bot Routing Examples

Payment Reminder Bot

{
  "phoneNumber": "+919876543210",
  "metadata": {
    "botId": "payment-reminder",
    "llm_context": "Customer has pending payment of ₹5000",
    "due_date": "2024-12-05"
  }
}

Customer Support Bot

{
  "phoneNumber": "+919876543210",
  "metadata": {
    "botId": "customer-support",
    "caller_name": "John Doe",
    "llm_context": "Customer called earlier about order #12345"
  }
}

Asterisk Configuration

Add this to your extensions.conf to handle the outbound connection and capture metadata:

[ai-outbound]
exten => s,1,NoOp(AI Outbound Call: ${SESSION_UUID})
exten => s,n,Answer()
; Capture channel ID for transfer/hangup features
exten => s,n,Set(CURL_RESULT=${CURL(http://127.0.0.1:8081/session/${SESSION_UUID}/metadata,channel=${CHANNEL})})
exten => s,n,AudioSocket(${SESSION_UUID},127.0.0.1:8080)
exten => s,n,Hangup()