Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
AI-powered call center solution with Azure and OpenAI GPT.
Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Insurance, IT support, customer service, and more. The bot can be customized in few hours (really) to fit your needs.
…Enhanced communication and user experience: Integrates inbound and outbound calls with a dedicated phone number, supports multiple languages and voice tones, and allows users to provide or receive information via SMS. Conversations are streamed in real-time to avoid delays, can be resumed after disconnections, and are stored for future reference. This ensures an improved customer experience, enabling 24/7 communication and handling of low to medium complexity calls, all in a more accessible and user-friendly manner.
Advanced intelligence and data management: Leverages gpt-4.1 and gpt-4.1-nano (known for higher performance and a 10–15x cost premium) to achieve nuanced comprehension. It can discuss private and sensitive data, including customer-specific information, while following retrieval-augmented generation (RAG) best practices to ensure secure and compliant handling of internal documents. The system understands domain-specific terms, follows a structured claim schema, generates automated to-do lists, filters inappropriate content, and detects jailbreak attempts. Historical conversations and past interactions can also be used to fine-tune the LLM, improving accuracy and personalization over time. Redis caching further enhances efficiency.
Customization, oversight, and scalability: Offers customizable prompts, feature flags for controlled experimentation, human agent fallback, and call recording for quality assurance. Integrates Application Insights for monitoring and tracing, provides publicly accessible claim data, and plans future enhancements such as automated callbacks and IVR-like workflows. It also enables the creation of a brand-specific custom voice, allowing the assistant’s voice to reflect the company’s identity and improve brand consistency.
Cloud-native deployment and resource management: Deployed on Azure with a containerized, serverless architecture for low maintenance and elastic scaling. This approach optimizes costs based on usage, ensuring flexibility and affordability over time. Seamless integration with Azure Communication Services, Cognitive Services, and OpenAI resources provides a secure environment suitable for rapid iteration, continuous improvement, and accommodating variable workloads in the call center.
A French demo is avaialble on YouTube. Do not hesitate to watch the demo in x1.5 speed to get a quick overview of the project. Voice is hesitant on purpose to show the bot can handle it. All the infrastructure is deployed on Azure, mostly in serverless mode. Provisionning of the LLM resources can be done to reduce the latency. Main interactions shown in the demo:
Extract of the data stored during the call:
…A report is available at https://[your_domain]/report/[phone_number] (like http://localhost:8080/report/%2B133658471534). It shows the conversation history, claim data and reminders.
---
title: System diagram (C4 model)
---
graph
user(["User"])
agent(["Agent"])
app["Call Center AI"]
app -- Transfer to --> agent
app -. Send voice .-> user
user -- Call --> app…[!NOTE] This project is a proof of concept. It is not intended to be used in production. This demonstrates how can be combined Azure Communication Services, Azure Cognitive Services and Azure OpenAI to build an automated call center solution.
Prefer using GitHub Codespaces for a quick start. The environment will setup automatically with all the required tools.
In macOS, with Homebrew, simply type make brew.
For other systems, make sure you have the following installed:
bash or zshapt install make (Ubuntu), yum install make (CentOS), brew install make (macOS)Then, Azure resources are needed:
ccai-customer-a)Now that the prerequisites are configured (local + Azure), the deployment can be done.
A pre-built container image is available on GitHub Actions, it will be used to deploy the solution on Azure:
ghcr.io/clemlesne/call-center-ai:mainghcr.io/clemlesne/call-center-ai:0.1.0 (recommended)Fill the template from the example at config-remote-example.yaml. The file should be placed at the root of the project under the name config.yaml. It will be used by install scripts (incl. Makefile and Bicep) to configure the Azure resources.
az login[!TIP] Specify the release version under the
image_versionparameter (default ismain). For example,image_version=16.0.0orimage_version=sha-7ca2c0c. This will ensure any future project breaking changes won't affect your deployment.
make deploy name=my-rg-nameWait for the deployment to finish.
make logs name=my-rg-nameIf you skiped the make brew command from the first install section, make sure you have the following installed:
Finally, run make install to setup Python environment.
If the application is already deployed on Azure, you can run make name=my-rg-name sync-local-config to copy the configuration from remote to your local machine.
[!TIP] To use a Service Principal to authenticate to Azure, you can also add the following in a
.envfile:AZURE_CLIENT_ID=xxx AZURE_CLIENT_SECRET=xxx AZURE_TENANT_ID=xxx
If the solution is not running online, fill the template from the example at config-local-example.yaml. The file should be placed at the root of the project under the name config.yaml.
Execute if the solution is not yet deployed on Azure.
make deploy-bicep deploy-post name=my-rg-name[!IMPORTANT] Tunnel requires to be run in a separate terminal, because it needs to be running all the time
# Log in once
devtunnel login
# Start the tunnel
make tunnel[!NOTE] To override a specific configuration value, you can use environment variables. For example, to override the
llm.fast.endpointvalue, you can use theLLM__FAST__ENDPOINTvariable:LLM__FAST__ENDPOINT=https://xxx.openai.azure.com
[!NOTE] Also,
local.pyscript is available to test the application without the need of a phone call (= without Communication Services). Run the script with:python3 -m tests.local
make devhttp://localhost:8080Call recording is disabled by default. To enable it:
recordings), it is already done if you deployed the solution on Azurerecording_enabled in App Configuration to trueTraining data is stored on AI Search to be retrieved by the bot, on demand.
Required index schema:
| Field Name | Type |
Retrievable | Searchable | Dimensions | Vectorizer |
|---|---|---|---|---|---|
| answer | Edm.String |
Yes | Yes | ||
| context | Edm.String |
Yes | Yes | ||
| created_at | Edm.String |
Yes | No | ||
| document_synthesis | Edm.String |
Yes | Yes | ||
| file_path | Edm.String |
Yes | No | ||
| id | Edm.String |
Yes | No | ||
| question | Edm.String |
Yes | Yes | ||
| vectors | Collection(Edm.Single) |
No | Yes | 1536 | OpenAI ADA |
Software to fill the index is included on Synthetic RAG Index repository.
The bot can be used in multiple languages. It can understand the language the user chose.
See the list of supported languages for the Text-to-Speech service.
# config.yaml
conversation:
initiate:
lang:
default_short_code: fr-FR
availables:
- pronunciations_en: ["French", "FR", "France"]
short_code: fr-FR
voice: fr-FR-DeniseNeural
- pronunciations_en: ["Chinese", "ZH", "China"]
short_code: zh-CN
voice: zh-CN-XiaoqiuNeuralIf you built and deployed an Azure Speech Custom Neural Voice (CNV), add field custom_voice_endpoint_id on the language configuration:
# config.yaml
conversation:
initiate:
lang:
default_short_code: fr-FR
availables:
- pronunciations_en: ["French", "FR", "France"]
short_code: fr-FR
voice: xxx
custom_voice_endpoint_id: xxxLevels are defined for each category of Content Safety. The higher the score, the more strict the moderation is, from 0 to 7. Moderation is applied on all bot data, including the web page and the conversation. Configure them in Azure OpenAI Content Filters.
Customization of the data schema is fully supported. You can add or remove fields as needed, depending on the requirements.
By default, the schema of composed of:
caller_email (email)caller_name (text)caller_phone (phone_number)Values are validated to ensure the data format commit to your schema. They can be either:
datetimeemailphone_number (E164 format)textFinally, an optional description can be provided. The description must be short and meaningful, it will be passed to the LLM.
Defau
Ifti
Feature suggestion: Evaluate SenseVoice speech and emotion tags
Unhandled WebSocket disconnection during media streaming crashes call session
Incoming call not answered – Cosmos DB RBAC permission errors, missing connection_string fields, and App Configuration access issues
Inbound call fails with HMAC-SHA256 validation error (Tunisian caller → US ACS number). Also outbound from Azure portal to Tunisia fails. Do I need a French number? How to properly configure inbound Call Automation?
ه
Collaboration Inquiry — AI Call Center System
Tool execution infinite loop on the same action
Call center ai
Use uvloop