Case study

How we built our own AI-answered phone system.

Kaffee Werks' business line runs on a phone system we host ourselves: a real public number connected to an Asterisk/FreePBX server, with AI voice agents that answer calls, transfer them to people, take messages and even control building devices by voice. Responses typically come back in under a second.

< 1 secTypical AI response time on a live call
24 / 7Answered nights, weekends and holidays
Self-hostedPhone system and automation on hardware we own

The goal

We wanted a real business phone line that never goes to a generic voicemail, costs little to run, and does useful work on the call instead of just taking messages. We also wanted to own it: the phone system, the call logic and the data.

How it works

A call to our public number arrives over a SIP trunk from a VoIP carrier and lands on a FreePBX/Asterisk phone system running in a virtual machine on our own server. A phone tree lets callers pick where to go, including a real desk phone and a set of AI agents.

When a call reaches an AI agent, Asterisk streams the audio to a set of containers on our server:

  1. Listen. Speech recognition tuned for phone audio turns the caller's words into text as they speak.
  2. Think. A language model (Anthropic's Claude) decides what to say and whether to take an action, following the agent's written instructions.
  3. Speak. A natural text-to-speech voice sends the reply back down the line.

The whole loop typically completes in well under a second once the system is warm, which is what makes the conversation feel natural rather than robotic.

Doing real work on the call

Talking isn't enough. The agents have a small set of tools they can use during a call:

  • Transfer. Hand the caller to a person or another line. Transfers go through an allowlist, so the agent can only send calls to destinations we've approved. That's a toll-fraud guard as much as a feature.
  • Take a message. Capture the details and send them to our automation platform (n8n), which files and forwards them.
  • Hang up cleanly when the conversation is done.
  • Control building devices. The internal line can turn lights and devices on and off through Home Assistant, by voice, over the phone.

What we learned

Latency is everything. A one-second pause feels natural. A three-second pause makes callers talk over the agent. Choosing fast models and streaming every step mattered more than any single feature.

Guardrails belong in the phone system, not just the prompt. The agent's instructions say where it may transfer calls, but the phone system enforces it too. Never trust a language model alone with an action that costs money.

Old hardware has opinions. Our desk phone is a vintage analog handset on an adapter. Its message-waiting lamp only works with one specific signaling type, which is the kind of detail that never shows up in a spec sheet.

Write down every step. Adding a new agent touches the containers, the configuration, the phone system's dial plan and its admin screens. Skipping one breaks things in confusing ways, so the process is documented as a checklist.

What this means for clients

The same building blocks power the AI phone agents and dispatch systems we build for businesses. Some clients run it on their own hardware; others prefer a hosted setup. Either way, the accounts are in your name and the configuration is documented.

FAQ

Common questions.

Can I get a system like this for my business?

Yes. That's what we build. It can be self-hosted on your hardware or run as a managed setup, connected to your existing phone number.

Do I need my own server?

No. Self-hosting is an option, not a requirement. Many businesses start with a hosted setup.

Which AI models do you use?

Our own line uses Anthropic's Claude for conversation, plus dedicated speech recognition and text-to-speech services. We choose models for each project based on speed, quality and cost.

Want one of these answering your phone?

We build the same kind of system for businesses: on your hardware or ours, with your number and your rules.

Call 651-955-6668 Free consult