With the rise of AI-powered voice assistants like Amazon Lex and Google Dialogflow, businesses are now able to automate customer interactions without human intervention. By integrating VICIdial’s sounds_list API, AI bots can fetch and play pre-recorded responses dynamically, enabling automated FAQ handling, appointment scheduling, and complaint resolution.
In this guide, we will walk through a step-by-step tutorial on integrating VICIdial with AI voice assistants to improve call routing and automation.
Understanding the VICIdial sounds_list API
The sounds_list API fetches available audio files stored in VICIdial, which are used for IVR messages, voicemail recordings, and customer prompts.
API Endpoint
http://your-vicidial-server/vicidial/non_agent_api.php?function=sounds_list
Required Parameters
Parameter | Type | Description |
---|---|---|
source |
String | API request identifier (e.g., “ai-integration”) |
user |
String | VICIdial API-enabled user |
pass |
String | VICIdial user password |
function |
String | Must be sounds_list |
Example API Request
http://your-vicidial-server/vicidial/non_agent_api.php?
source=ai-integration&user=admin&pass=1234&function=sounds_list&format=tab&stage=name
Example API Response
SUCCESS
welcome_message.wav
faq_answer1.wav
appointment_confirmation.wav
complaint_acknowledgment.wav
Step 1: Setting Up an AI Voice Assistant
1. Amazon Lex Setup
- Sign in to AWS and navigate to Amazon Lex.
- Create a new bot (e.g., “CustomerSupportBot”).
- Define Intents (e.g., “BookAppointment”, “FAQ”, “FileComplaint”).
- Use Lambda functions to integrate with VICIdial’s API.
2. Google Dialogflow Setup
- Sign in to Google Dialogflow CX.
- Create a new Agent.
- Add Intents and Training Phrases.
- Use Fulfillment Webhooks to call VICIdial’s API dynamically.
Step 2: Fetching Audio Prompts from VICIdial
Example Python Code (AI Assistant Fetching IVR Prompts)
import requests
vicidial_api = "http://your-vicidial-server/vicidial/non_agent_api.php"
params = {
"source": "ai-integration",
"user": "admin",
"pass": "1234",
"function": "sounds_list",
"format": "tab"
}
response = requests.get(vicidial_api, params=params)
audio_files = response.text.split('\n')[1:]
print("Available IVR Prompts:", audio_files)
Step 3: Integrating VICIdial with AI Assistants
1. Amazon Lex + AWS Lambda Integration
- In Amazon Lex, configure Intent Fulfillment to use an AWS Lambda function.
- The Lambda function should:
- Call VICIdial API to fetch relevant IVR responses.
- Return the correct audio file URL to Amazon Lex.
Example Lambda Function (Python)
import boto3
import requests
def lambda_handler(event, context):
vicidial_api = "http://your-vicidial-server/vicidial/non_agent_api.php"
params = {
"source": "ai-integration",
"user": "admin",
"pass": "1234",
"function": "sounds_list",
"format": "tab"
}
response = requests.get(vicidial_api, params=params)
sound_files = response.text.split('\n')[1:]
return {
"dialogAction": {
"type": "ElicitSlot",
"message": f"I found {len(sound_files)} available prompts. How can I assist you?",
}
}
2. Google Dialogflow Fulfillment Webhook
- Enable Webhook fulfillment in Dialogflow CX.
- Use a webhook server (Node.js/Python) to call VICIdial API.
- Return the correct audio response dynamically.
Example Webhook in Node.js
const express = require('express');
const axios = require('axios');
const app = express();
app.post('/webhook', async (req, res) => {
const vicidialApi = "http://your-vicidial-server/vicidial/non_agent_api.php";
const params = {
source: "ai-integration",
user: "admin",
pass: "1234",
function: "sounds_list",
format: "tab"
};
const response = await axios.get(vicidialApi, { params });
const audioFiles = response.data.split('\n').slice(1);
res.json({
fulfillmentMessages: [{
text: { text: [`Available IVR Prompts: ${audioFiles.join(', ')}`] }
}]
});
});
app.listen(3000, () => console.log('Webhook server running on port 3000'));
Step 4: Deploying & Automating AI Call Routing
- Deploy Webhooks or Lambda Functions to automate VICIdial API calls.
- Connect to a Telephony System (Twilio, Asterisk, VICIdial).
- Configure Routing Rules for AI-driven responses.
Conclusion
By integrating VICIdial’s sounds_list API with AI voice assistants (Amazon Lex & Google Dialogflow), call centers can: ✅ Automate FAQ handling, appointment scheduling, and complaint resolution.
✅ Reduce agent workload and increase customer satisfaction.
✅ Ensure consistent and dynamic IVR responses.
This solution enables businesses to create scalable, AI-powered customer support while leveraging VICIdial’s robust telephony capabilities.
Need help implementing this integration? Contact us for expert VICIdial API solutions!
FAQs
1. Can AI voice bots handle outbound calls?
Yes! AI can handle both inbound and outbound call automation.
2. Is VICIdial API secure?
Yes, but ensure HTTPS encryption and access control for API calls.
3. Can this work with WhatsApp and SMS bots?
Yes! Integrate Twilio, WhatsApp API, or SMS gateways for multi-channel automation.
4. What if the API doesn’t return the expected response?
Ensure VICIdial has correct permissions and stored audio files.
5. Can I extend this to handle payment processing?
Yes! Connect Stripe, PayPal, or banking APIs for AI-driven payments.
🚀 Start automating customer interactions with AI and VICIdial today!