VEXYL - Self-Hosted AI Voice Gateway for Asterisk

Hey Asterisk community,

I’ve built a voice AI gateway that bridges Asterisk to modern AI services (STT, LLM, TTS) via AudioSocket protocol. Thought I’d share here since the Asterisk community understands telephony infrastructure better than anyone.

What is VEXYL?

Self-hosted middleware that sits between your Asterisk/FreePBX system and AI providers. Handles the full voice AI pipeline - speech recognition, language processing, text-to-speech - while your PBX continues managing call routing, transfers, and everything else you’ve already built.

Why I Built This

After deploying voice AI for several call centers, I realized there’s a gap between expensive cloud platforms ($0.15-0.40/min) and building everything in-house (4-6 months dev time). Organizations with existing Asterisk investments shouldn’t have to choose between high recurring costs or massive development effort.

Technical Overview:

  • Protocol: AudioSocket (WebRTC support also available)

  • Architecture: Redis, PM2 clustering

  • Response Time: 2.2-3.3 seconds end-to-end

  • Providers: 17+ AI providers supported (BYOK model)

  • Deployment: Docker or binary, self-hosted

  • Languages: English + 10+ Indian languages

Simple Dialplan Integration:

exten => _X.,1,Answer()
same => n,AudioSocket(${UUID},localhost:9099)
same => n,Hangup()

Two Operating Modes:

  1. Standard Mode: Full STT→LLM→TTS pipeline with custom data integration (Flowise/n8n)

  2. Gateway Mode: Direct streaming to OpenAI Realtime API, ElevenLabs

Quick Start:

docker pull vexyl/vexyl-voice-gateway
docker run -d -p 9099:9099 vexyl/vexyl-voice-gateway

Production Stats:

  • 1000+ monthly calls in healthcare/call centers

  • 90% TTS cache hit rate

  • 20-50 concurrent calls, tested to 200+

Why Post Here?

Looking for feedback on:

  • AudioSocket vs other integration approaches

  • Scaling patterns for high-volume deployments

  • Use cases you’re encountering with voice AI

  • FreeSWITCH compatibility needs

Resources:

Happy to answer technical questions or discuss integration challenges you’re facing with voice AI.

Anil

1 Like

I would be very interested in learning more about your real time voice stuff and the project sounds very interesting

1 Like

sure please let me know how can i help you . A basic setup guide is here VEXYL Voice Gateway AI Asterisk/FreePBX Integration - Self-Hosted - VEXYL AI

Please let me know any other support you needed

oh, thank you - however, I seem to have gotten hosed setting it up myself. I’m only using OpenAI and it’s a bit of a unique proposition. I am not sure even of the basic components but right now? I get BEES! I hate getting bees! but it also means my sound is finally getting into the system! I obviously have the codec settings wrong - and yes, doing this from scratch is wasteful and painful!!! PLEASE help!

Hi @anilmathewm , very interesting. I need your help how to reach you ? whatsapp/email.
My whatsapp +919952192358 and skjainmiah@gmail.com

Yakareem@cyvotel.ng
+2349060006099

Can you tell me your setup i can help

Sure will reach out . you can also refer VEXYL Voice Gateway AI Asterisk/FreePBX Integration - Self-Hosted - VEXYL AI

Hi can you tell me the setup you are looking for

Hi jtayler,

Thanks for trying out VEXYL! To address the “bees” sound you’re hearing—that buzzing noise is almost certainly a codec mismatch.

It sounds like raw PCM audio is being interpreted as G.711 (u-law/a-law) or vice versa. VEXYL’s AudioSocket interface expects **Signed Linear 16-bit 8kHz (SLIN)**.

Could you check your Asterisk/FreePBX dialplan and ensure the `AudioSocket` application is being invoked correctly? If you can share your `extensions.conf` snippet or the console logs when the call connects, I can pinpoint the issue for you.

Happy to help you get this running smoothly!

Best regards,

Anil

Thanks so much! I think I have the bees solved, but I’m not yet able to do realtime - so, I do have to sit down and refactor this at some point - Sign in you are welcome to try it out! Please let me know what you think -

Can you share the issue at hello@vexyl.ai so we can fix it

thanks