EXTEN.BOT

by estvita

MCP Client
  • other

Voice bot for VOIP working on Openai Realtime

About

What is EXTEN.BOT?

EXTEN.BOT is a Django-based web interface for creating VoIP voice bots that can be connected to any software or hardware PBX supporting SIP. It leverages an OpenSIPS server and the OpenSIPS AI Voice Connector, using the OpenAI real-time API for conversational AI.

How to use EXTEN.BOT?

Install OpenSIPS 3.6, configure it with the provided config files, and set up the AI Voice Connector from the forked repository. Then clone the EXTEN.BOT repository, configure the .env file, run migrations, and create a superuser. In the admin panel, add a domain, AI model, voice, custom functions, and MCP servers. Finally, create a bot and use its SIP credentials to call openai@yourdomain from any softphone or PBX.

Key features of EXTEN.BOT

- Create voice bots with custom instructions and welcome messages
- Integrates with any SIP-compatible PBX or softphone
- Uses OpenAI real-time API for natural conversations
- Supports custom functions for bot actions during calls
- Extends capabilities via MCP servers and external systems

Use cases of EXTEN.BOT

- Automate customer support calls with a conversational voice bot
- Build voice assistants that can transfer calls to human operators
- Integrate voice bots with external databases or APIs via custom functions
- Deploy SIP-based voice bots on existing PBX infrastructure

FAQ from EXTEN.BOT

What platforms or PBX systems does EXTEN.BOT work with?

EXTEN.BOT works with any software or hardware PBX that supports the SIP protocol. It requires an OpenSIPS 3.6 server as the SIP intermediary.

Which AI models and voices are supported?

The platform uses the OpenAI real-time API. Models like gpt-4o-realtime-preview and voices listed in the OpenAI real-time documentation are supported. You configure them in the admin panel.

Can EXTEN.BOT connect to external tools via MCP?

Yes. EXTEN.BOT supports MCP servers by adding their base URL, optional API key, and approval settings in the admin panel. Only bot owners can link their own MCP servers to a bot.

Is EXTEN.BOT free and open source?

The README does not mention pricing or licensing. The code is available on GitHub, and the platform can be self-hosted.

Are there any known limitations?

The README notes that the AI Voice Connector has not been tested with Docker; a virtual Python environment is recommended. No other limitations are described.

Details

Author
estvita
Category
other
Repository
estvita/exten_bot

exten.bot

exten.bot is a Django-based web interface for creating VoIP voice bots that can be connected to any software or hardware PBX supporting SIP.

The system is built on an OpenSIPS server and the opensips-ai-voice-connector.

For AI, it uses the OpenAI real-time API.

The platform supports custom functions and MCP servers for extending bot capabilities and integrating with external systems.

You can test its features at exten.bot.

Installation

SIP Server OpenSIPS

+ You need to install the OpenSIPS 3.6 server; please use the official documentation for this.
+ place the configuration files opensips.cfg and opensips-cli.sfg in the folder
/etc/opensips and replace the database connection data with your own
+ add your sip exten.bot domain (exten.example.com) to opensips domains tables

AI Voice Connector

Use my fork of the voice connector for enhanced functionality

I haven't tested my connection with installing the openai voice connector in Docker, so for now we'll run it in a virtual python environment.

git clone https://github.com/estvita/opensips-ai-voice-connector-ce voice
cd voice 
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp examples/config.ini config.ini

make changes to the config.ini

+ [rtp] SIP_SERVER_IP - your sip server address
+ [engine] api_url - your exten.bot/api/bots/

try running the voice connector

python src/main.py -c config.ini

in the console you should see something like this

2025-05-25 11:44:11,575 - tid: 139832749932608 - INFO - Starting server at 127.0.0.1:50060
After testing you can run voice connector as a debian service

+ Next install the exten_bot

git clone https://github.com/estvita/exten_bot.git
cd exten_bot
cp examples/.env.example .env
Make the necessary changes to your .env
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements/production.txt

After installing the required packages and dependencies, proceed with the basic configuration.

python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser

Settings

go to the admin panel at your_domain/admin and fill in the following data

+ /admin/bot/domain/ add the domain (exten.example.com), the same as in the opensips domain settings
+ /admin/bot/model/ add models gpt-4o-realtime-preview
+ /admin/bot/voice/ add bot voices

+ /admin/workflow/function/ add custom functions that the voice bot can call during conversations
+ /admin/workflow/mcp/ add MCP servers for extended bot capabilities

Now you can create a voice bot
+ /admin/bot/bot/ add bot

Description of fields

+ Owner - the user to whom the bot will be linked
+ Username and Password - are generated automatically, you will use this data to connect to the SIP
+ Domain - your exten.bot SIP domain
+ Token - openai token
+ Model - openai realtime model
+ Voice - openai voice
+ Instruction - text instruction for the bot
+ Welcome msg - the message that the bot will voice when connecting
+ Transfer uri - sip uri to which the voice bot will forward the call at the user's request (sip:operator@pbx.com)
+ Functions - Select custom functions that the voice bot can access during conversations
+ MCP Servers - Select MCP servers for extended bot capabilities

After this, check that the account has been created in the opensips database (subscriber table).

if everything is ok, you can use the received credentials of the sip account on your softphone or PBX to call [openai@exten.example.com] and talk to your voice bot on the phone

To diagnose the SIP connection on your server, use the console utility [sngrep]

Functions and MCP Servers

Custom Functions

- Go to /admin/workflow/function/ to create custom functions - Each function requires: name, URL, JSON schema, and optional input schema - Functions are linked to bots and can be called during conversations - Only bot owners can link their own functions to their bots

MCP Servers

- Go to /admin/workflow/mcp/ to add MCP servers - Each server requires: base URL, optional API key, and approval settings - Server labels are auto-generated but can be edited - MCP servers provide extended capabilities to voice bots - Only bot owners can link their own MCP servers to their bots