Mainway
callTry the demo

Voice AI receptionist, engineered by Mert Ural

Built like infrastructure.Talks like a receptionist.

Mainway answers a clinic’s phone, books the appointment, and goes quiet the moment you cut in.

Line 1, Mainway DentalSample call at 1.5× speed
RingTalkBookConfirm
150+real test calls on a Turkish phone number
1.8-2.7 smeasured from the caller’s last word to the first reply
5LLM providers behind one router with circuit breakers
647automated tests, 505 passing on a local run

What it does on a call.

Six jobs a front desk does all day, run by one engine.

Answers every call

Picks up on the first ring, day or night. Greetings are cached per clinic voice, so the first word plays at once.

Twilio and NetGSM over Asterisk

Books the slot

Checks real free time, books it, and checks again before it commits.

Google Calendar FreeBusy

Knows your catalog

Prices, hours, doctors and listings come from your own data.

Postgres pgvector

Stops when you cut in

Real speech over its voice stops it within 280 ms and clears the line. A quick “hıhı” or its own echo doesn’t.

Barge-in with playback epochs

Hands over to a person

Repeated questions, “I don’t know” signals and the caller’s mood decide when to transfer.

Escalation engine, ~96 tests

Follows up

Scores the lead, texts the caller, and lists what it couldn’t answer.

Post-call loop

One call, drawn as it happens.

Every arrow is a real hop between systems. Play it and watch the caller cut in.

DrawingSequence, one call
Scale1.5× real time
LanguageTurkish, shown in English
TimingsExample, inside the measured range

Two seconds, built floor by floor.

Everything between the caller’s last word and Mainway’s first, drawn as a building section. Height is time.

TURN-TAKING RETRIEVAL CLAUDE HAIKU 4.5 VOICE FOUNDATION SECTION A-A, RESPONSE TIME, 1 S = 180
  1. +1.85 to 2.05

    Voice

    ElevenLabs turns the first sentence into audio while Claude writes the next one. estimate

  2. +0.95 to 1.85

    Claude Haiku 4.5

    Writes the first sentence. 912 ms to the first token in a blind A/B. GPT-4o, Gemini and Groq wait behind circuit breakers.

  3. +0.85 to 0.95

    Retrieval

    The clinic’s prices, hours and doctors come back from pgvector. estimate

  4. ±0.00 to 0.85

    Turn-taking

    850 ms of quiet, then a Turkish end-of-sentence rule and the smart-turn model confirm you are done.

  5. below ground

    Foundation

    Runs while you are still talking: Asterisk passes 20 ms frames, Scribe v2 transcribes them live, Deepgram stands by.

850 ms is the live setting and 912 ms is a measured first-token time. Retrieval and voice are estimates. End to end on real calls it measured 1.8 to 2.7 s.

The hard part wasn’t the AI.

It was knowing when someone has finished talking, and stopping the moment they start again.

Detail B, three times slower. Each square is 20 ms of audio. Top: Mainway speaking. Middle: the caller. Bottom: the 280 ms timer.
backend/lib/voice-stream.jsshortened, real line numbers
1794interruptTts(reason = 'unknown') {
1796  if (this.currentTtsAbort) this.currentTtsAbort.abort();
1802  this.playbackEpoch++;old frames stop
1805  this._flushTxQueue();queue emptied
1808  this.twilioWs.send('clear' ...);line flushed
1813  // Remember partial sentence for context next turn
1814  if (this.currentTtsSpoken)open bug D-01
1815    this.interruptedSentence = this.currentTtsSpoken;
1817  this.state = 'listening';
280 msbefore a sound counts as cutting in
~500 msof audio queued ahead, never more
1 epochnumber that retires an answer at once

One engine. A template per business.

Each sector gets its own prompt, its own fields and its own rules. These three also have demo personas.

Also templated: e-commerce, restaurants, tourism, logistics, finance and education.

After every call, the gaps become answers.

The call ends, the work doesn’t. Each step runs on its own, and the last one feeds the next call.

1

Call ends

The transcript and timings are saved.

call_messages
2

Lead scored

An LLM grades outcome, intent and satisfaction against a rubric.

Gemini, JSON rubric
3

Caller texted

A confirmation goes out automatically.

SMS
4

Gaps listed

Questions it couldn’t answer are collected for the owner.

knowledge gaps
5

One-click FAQ

The owner answers once; it becomes an FAQ entry.

dashboard
6

Re-embedded

A sweep every 5 minutes puts it into search.

pgvector

Tested by people, by models, and by code.

Mainway never had paying customers. It had a lot of tests instead.

647
505 pass137 skip, need Postgres5 fail

One square per automated test. Four failures look time-zone related; one misses a 2 ms noise-filter budget.

Blind A/B, three models

ModelFirst tokenWins
Gemini 3.5 Flash929 ms7
Claude Haiku 4.5912 ms2
GPT-4o757 ms1

LLM only, ten rounds. The judge was also one of the contestants.

150+

Real test calls with three or four friends on a Turkish number. The lit squares are the 68 calls still in the last backup, with 477 messages and 75 bookings.

An LLM plays the caller

Simulated customers talk to the production brain through an internal endpoint: 27 scenarios across 10 sectors, scored by an LLM judge as the median of three runs.

eval-call-sim.mjs, sector-live-audit.mjs

Six open bugs, written down.

Found while preparing this page. Each has a file and a line.

D-01Confirmed

A cut-off sentence is not carried into the next turn on the streaming path.

voice-stream.js:1741
D-02Likely

Smart Turn keeps the first 8 s of long speech, so it may never hear how you finished.

smart-turn/app.py:66
D-03Likely

If a provider fails after it already streamed text, the fallback may answer a second time.

llm-stream.js:616
D-04From review

When Smart Turn errors, Node waits 1.2 s instead of moving on.

smart-turn/app.py:91
D-05From review

Every voice turn embeds the same text twice.

voice-stream.js:1160
D-06From review

Setting a Sentry DSN crashes startup on v10.

lib/sentry.js

Questions people ask.

Is Mainway a company?

No. It is a project I built and tested on real calls. It never had paying customers, and this page doesn’t pretend otherwise.

Can I call it right now?

Not by phone. The server lease ended in October 2026. A browser demo is being built, and the section below shows how it will work.

Does it speak English?

The real calls ran in Turkish. The engine has a language mode, and the English demo line is part of the browser demo.

What did you build yourself?

All of it: the voice engine, the AI layer, the dashboard and the infrastructure.

Where does call audio go?

To the providers in the stack: the phone carrier, ElevenLabs and Deepgram for speech, and Anthropic, OpenAI or Google for the language model.

Why is the code private?

It still holds server details and keys that need cleaning before it goes public. I share it on request.

Call it from your browser.

Pick a business and talk. The panel shows each decision while it happens.

This mockup plays a sample call. The real demo will use your microphone and end after 2 minutes.