Skip to content

voiceflow-community/poc-twilio-call-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voiceflow Call Recorder and Audio PII Redaction

A real-time call recording and transcription system built with Voiceflow Twilio voice integration, Next.js, and Bun. This application automatically records incoming calls, transcribes them, and provides a dashboard to manage and review call recordings and transcripts.

Features

  • 🎥 Automatic call recording for incoming calls
  • 🔊 Dual-channel recording support
  • 📝 Real-time transcription with PII redaction (Twilio Voice Intelligence)
  • 💻 Web-based dashboard for call management
  • 🔄 Real-time updates via WebSocket

Prerequisites

  • Bun runtime installed
  • Node.js (v18 or higher)
  • A Twilio account with:
    • Account SID
    • Auth Token
    • Voice Intelligence Service SID

Setup

  1. Clone the repository:
git clone [repository-url]
cd poc-twilio-call-recorder
  1. Install dependencies:
cd dashboard
bun install
  1. Configure environment variables:
    • Copy the template file:
    cp .env.local.template .env.local
    • Update .env.local with your credentials:
    TWILIO_ACCOUNT_SID=your_account_sid
    TWILIO_AUTH_TOKEN=your_auth_token
    TWILIO_SERVICE_SID=your_voice_intelligence_service_sid
    PUBLIC_URL=your_public_url
    BUN_SERVER=http://localhost:3902
    NEXT_PUBLIC_BUN_SERVER=http://localhost:3902
    DASHBOARD_PORT=3901
    BUN_PORT=3902
    

Running the Application

  1. Start the Bun server:
cd dashboard
bun run server/index.ts
  1. In a new terminal, start the Next.js dashboard:
cd dashboard
bun run dev

The application will be available at:

Running with Docker Compose

As an alternative to running the services directly, you can use Docker Compose:

  1. Make sure you have Docker and Docker Compose installed on your system

  2. Configure environment variables as described in the Setup section

  3. Start the services:

docker compose up -d
  1. View logs (optional):
docker compose logs -f
  1. Stop the services:
docker compose down

The application will be available at the same ports:

Note: The Docker setup includes a persistent volume for the database data.

Twilio Configuration

  1. Set up your Twilio phone number
  2. Configure the webhook URL in your Twilio console:
    • Voice Configuration -> A call comes in
    • Set to: [YOUR_PUBLIC_URL]/v1/twilio/webhooks/voice
    • Method: GET

Architecture

The application consists of two main components:

  1. Bun Server (Port 3902)

    • Handles Twilio webhooks
    • Manages call recording
    • Processes transcriptions
    • WebSocket server for real-time updates
  2. Next.js Dashboard (Port 3901)

    • User interface for call management
    • Real-time call updates
    • Search and filtering capabilities
    • Call record deletion

Development

The project uses:

  • Bun as the runtime and package manager
  • TypeScript for type safety
  • Next.js for the frontend
  • WebSocket for real-time communication

Security Considerations

  • Never commit .env.local to version control
  • Keep your Twilio credentials secure
  • Use HTTPS in production
  • Implement proper authentication for the dashboard in production

License

ISC

Author

Nicolas Arcay Bermejo | Voiceflow

Quality Gate Status

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors