AiPBX
Product Features Integrations
Install Mobile
Resources Docs FAQ & Tech Why PHP? Videos
Try Contact Sponsor on GitHub UpCloud ($250 Free Credit) YouTube GitHub

Asterisk ARI, AudioSocket, Realtime vs. Cascade AI & ElevenLabs MOH

Real-time 20 ms PCM audio streaming between Asterisk and Python aipbx-ai over ARI/AudioSocket, Cascade (STT→LLM→TTS) vs Realtime WebSocket agents, RAG/DB/DTMF/dial_and_navigate tools, and v1.82.5 ElevenLabs Music API hold music (MOH).

Home / FAQ & Tech / Asterisk ARI, AudioSocket, Realtime vs. Cascade AI & ElevenLabs MOH
PRODUCTION · VOICE AI

ARI / AudioSocket 20 ms Bridge & Agent Modes

Asterisk connects to aipbx-ai via ARI bridge (when configured) or AudioSocket (:8791), streaming 8 kHz PCM frames and pacing reply audio in 20 ms frames up to 60 ms ahead. Agents support Realtime speech-to-speech WebSockets (OpenAI Realtime, Gemini Live, xAI, Qwen) or Cascade (STT → LLM → Local/Cloud TTS) with inline {knowledge}, {db}, {http}, {transfer}, DTMF, and outbound dial_and_navigate IVR traversal.

ElevenLabs Hold Music (MOH) & Asterisk Prompt Templates

Beyond 8 built-in Asterisk/PBX prompt templates, AI TTS Studio (/ai-tts) integrates ElevenLabs Music API (POST /v1/music, instrumental-only mode, 5 presets, 30–180 s, music_v1/v2/v2_5) to compose custom hold music and convert/install it directly as 8 kHz 16-bit mono WAV into any Asterisk MOH class.

Optional per-agent call recording and turn-level latency breakdowns (STT, LLM, TTS, and time-to-first-audio in ms) are recorded directly inside the AI Call Log.
AI Voice Agents Docs Why PHP? (Architecture) All Technologies