Skip to content

asterisk/AsteriskVoiceBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Demonstration Only

This repository is for demonstration purposes only and should not be used for production under any circumstances.


Module Overview

1. voicebot

The core module that orchestrates voice interactions. It manages audio input/output, session state, and coordinates between the other modules to deliver voice-based features.

2. ariman

Handles telephony integration, connecting the voicebot to Asterisk via ARI. It manages call events and sets up the audio streams.

3. deepgram

Provides speech-to-text (STT) and text-to-speech (TTS) capabilities. Audio streams from vproxy are sent to and from deepgram for transcription and recitation, enabling the voicebot to understand spoken input and respond accordingly.

4. rclocal

Responsible for building the service by providing tools and instructions for the AI and executing choices based on it's output.

5. voiceai

Implements natural language understanding and response generation via OpenAI Realtime. Receives transcribed text from deepgram, processes user intent, and generates appropriate replies for the voicebot to deliver.

6. vproxy

Acts as a voice proxy layer, managing RTP traffic between modules and external services.


Module Interaction Summary

  • ariman receives calls and streams audio to deepgram via vproxy for transcription.
  • deepgram returns text to voiceai, which interprets and generates responses.
  • voiceai sends responses back to deepgram for delivery to the caller via vproxy.
  • voicebot manages the overall session and coordinates with rclocal which queries the IVR-Demo http server for external AI instruction and function parsing.

Installing the Application

The application is installed via the follwoing command: go install .


Running the Application

This application requires an OpenAI and Deepgram API key in order to use those services. These are set with the following environment variables:

  • OPENAI_API_TOKEN - Your OpenAI API token
  • DG_API_TOKEN - Your Deepgram API token

Once these are set, the application is run via: go run .


Example IVR

The application contains a folder IVR-Demo which defines a sample IVR. Inside this folder is a script ivr-runner.sh that will launch a simple python http server that hosts all files within the folder. The rclocal package is hard coded to perform a GET on http://localhost:8989/ivr-root.json which contains the base configuration for the IVR. The IVR-Demo also includes the IVR leaves that the AI service may pick from. Each leaf json file transfers the call to a specific point in the included Asterisk Dialplan.


Docker Container

This application contains a folder dockerfiles with two scripts: buildAVai-Deb12Image.sh which will build and package a Debian 12 Docker image containing Asterisk, the mini http server and the voicebridge application and runAVai-Deb12.sh which will run a named instance. See dockerfiles/README.md for more information.


License

This project is licensed under the GNU Affero General Public License (AGPL).

See LICENSE for details.

About

An AI framework for Asterisk using ARI and External Media

Resources

License

Unknown, AGPL-3.0 licenses found

Licenses found

Unknown
LICENSE
AGPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages