Skip to content

Modern ARI-STASI server, built on Asterisk ARI with real-time speech-to-text transcription, voice-activated dialing, and WebSocket integration. Powerful telephony control using TypeScript/Node.js.

License

Notifications You must be signed in to change notification settings

alexiokay/AriLink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

29 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ž AriLink

TypeScript Node.js Asterisk License: Non-Commercial

AriLink Logo
Asterisk-powered telephony management with speech recognition and transcription


๐Ÿ“‹ Overview

AriLink is a telephony management system built on Asterisk's ARI (Asterisk REST Interface). It provides voice call handling, transcription, and PBX control capabilities. The system combines WebSockets, RTP, and speech-to-text integration to create a modern, feature-rich telephony solution.

โœจ Key Features

  • ๐Ÿ”„ Call Management - Handles incoming and outgoing calls through Asterisk PBX
  • ๐ŸŽ™๏ธ Speech-to-Text - Real-time transcription using local AI models (Parakeet, Whisper) or Google Cloud
  • ๐ŸŒ‰ Bridge Management - Creates and manages voice bridges for connecting multiple channels
  • ๐Ÿ‘ฅ Contact Recognition - Supports voice-activated dialing using a contacts database
  • ๐Ÿ“ก External Media Channels - Supports external media integration for advanced use cases
  • ๐Ÿ”Œ WebSocket Interface - Provides real-time updates and control via WebSockets
  • ๐Ÿ” Automatic Fallback - Seamlessly switches to backup transcription services if primary fails

๐Ÿ—๏ธ Architecture

The system is built on TypeScript and Node.js with a modular architecture supporting multiple concurrent calls:

flowchart TD
    A[๐Ÿ“ž Incoming Call 1] --> B[CallSessionManager]
    C[๐Ÿ“ž Incoming Call 2] --> B
    B --> D[Session 1: Bridge 1]
    B --> E[Session 2: Bridge 2]
    D --> F[External Media 1]
    E --> G[External Media 2]
    F --> H[๐ŸŽ™๏ธ Transcriber]
    G --> H
    H -->|routed by session ID| D
    H -->|routed by session ID| E
Loading

Core Components

๐ŸŽฎ AriControllerServer

The main controller that interfaces with Asterisk PBX:

  • Manages call flows, bridges, and DTMF input
  • Handles Stasis application events (start, end)
  • Provides WebSocket server for client connections
  • Manages contact lookups for voice-activated dialing

๐Ÿ”ค AriTranscriberServer

Provides real-time speech transcription:

  • Connects to configurable transcription services (local or cloud)
  • Processes RTP audio streams
  • Transmits transcription results via WebSockets
  • Supports customizable language and model settings
  • Automatic fallback to backup services on failure

๐Ÿ“ก RTP UDP Server

Handles the real-time audio streaming:

  • Processes incoming RTP packets from Asterisk
  • Handles audio format conversion for transcription

๐Ÿ—ฃ๏ธ Transcription Providers

Multiple transcription backend support:

  • Local providers: Parakeet TDT, Whisper (runs on your GPU)
  • Cloud provider: Google Speech-to-Text API (optional)
  • Handles streaming transcription with automatic restarts
  • Manages audio chunking for optimal performance
  • Provides both interim and final transcription results
  • Automatic failover between services

โš™๏ธ Configuration

The system uses environment variables for configuration, including:

Category Variables
PBX PBX IP address, login credentials
WebSocket Server ports, external host information
Transcription Language settings, model configuration
Telephony Provider settings, phone numbers

๐Ÿš€ Getting Started

Setup

Prerequisites

  1. Set up FreePBX server:
  2. Install UV (Python package manager):
    # Windows PowerShell
    irm https://astral.sh/uv/install.ps1 | iex

Installation

  1. Setup Transcription Service (local speech recognition):

    Parakeet (Recommended - fastest):

    cd transcription-services/parakeet-service
    uv venv
    uv pip install -r requirements.txt

    OR Whisper (alternative):

    cd transcription-services/whisper-service
    uv venv
    uv pip install -r requirements.txt
  2. Configure environment variables in .env file:

    TRANSCRIPTION_SERVICES=ws://localhost:5000

    See .env.example for all options and fallback configuration.

  3. Configure contacts in tools/contacts.json for voice-activated dialing

Running the System

  1. Start Transcription Service (in terminal 1):

    For Parakeet:

    cd transcription-services/parakeet-service
    start-service.bat

    OR for Whisper:

    cd transcription-services/whisper-service
    start-service.bat

    First run will download the model (~800MB for Whisper, ~600MB for Parakeet)

  2. Start AriLink Server (in terminal 2):

    npm start

See Transcription Services Guide for all configuration options including fallbacks.

๐Ÿ’ก Use Cases

๐Ÿ“ž Voice Call Center

Handle incoming calls with transcription for record-keeping

๐Ÿค– Automated Calling Systems

Set up outbound call campaigns with speech recognition

๐Ÿ—ฃ๏ธ Voice-Activated Dialing

Allow callers to speak names instead of dialing numbers

๐Ÿ“ Call Recording with Transcription

Keep searchable records of call content

๐Ÿ“ฆ Dependencies

  • Asterisk PBX with ARI enabled
  • Node.js and TypeScript
  • Transcription Service - choose one:
    • Local: Parakeet TDT 0.6B (RECOMMENDED) or Whisper
    • Cloud: Google Cloud Speech API credentials (optional)
  • Various NPM packages including:
    ari-client, @google-cloud/speech, ws, express, dotenv
    

๐Ÿ”ฎ Future Improvements

  • ๐Ÿ”ง Enhanced typing for TypeScript
  • ๐Ÿ–ฅ๏ธ Web UI for monitoring and management
  • โœ… Additional speech recognition providers DONE: Local Whisper model integrated!
  • ๐Ÿ”Š Additional providers: Scribe from ElevenLabs, Azure Speech
  • ๐Ÿ“Š Call analytics and reporting features
  • ๐Ÿ’พ Database persistence for call records and transcriptions

๐Ÿ“œ License

This project is licensed under a Non-Commercial License (MIT-Based) - see the LICENSE file for details.

Summary

  • โœ… Free for non-commercial use - Use, modify, and distribute for personal and educational purposes
  • ๐Ÿ’ผ Commercial use requires permission - Contact for commercial licensing
  • ๐Ÿ“ง Get in touch: Discord: alexispace

Key Points:

  • The software is provided "as is" without warranty
  • Attribution is required in all copies
  • Commercial use requires explicit permission from the copyright holder

For the full license text, please refer to the LICENSE file.


Built with โค๏ธ for modern telephony solutions

About

Modern ARI-STASI server, built on Asterisk ARI with real-time speech-to-text transcription, voice-activated dialing, and WebSocket integration. Powerful telephony control using TypeScript/Node.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •