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
| Mode | Latency | Description | Use Case |
|---|---|---|---|
| dynamic | 500-1000ms | Initial TTS + LLM | Recommended - Personalized outbound |
| static | <200ms | Pre-recorded WAV | Simple announcements |
| hybrid | <200ms | Static intro + LLM | Best UX with fast start |
HTTP API Reference
Initiate Call
Trigger a new outbound call with full customization.
POST /outbound/initiate
Request Parameters
| Parameter | Required | Description |
|---|---|---|
phoneNumber | Yes | Destination number (e.g. +91...) |
language | No | Language code (e.g. ml-IN) |
greetingMode | No | static, dynamic, hybrid |
metadata | No | Custom 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()