document
how it runs
type
system notes
issue
008
status
self-hosted stack
brief

the moving parts behind one agent-readable number. this public site does not run a sip client, receive webhooks, or connect to a carrier.

carrier / host / agent

how it runs

number and voice

operator supplied

carrier account + did

the phone number, carrier billing, voice route, and sms service remain in an account controlled by the operator.

baseline implementation

linphone / main

main writes sip configuration, protects it with file mode 0600, and reads linphone's sqlite call history in read-only mode.

later implementation

baresip / calling branches

callheavy and mcp use baresip socket control for outbound tasks and audio work; this is a separate path from main's linphone code.

text and voicemail intake

0.0.0.0:8099

sms catcher

accepts json, form, and query deliveries on provider-specific routes. the optional x-heyphony-token check permits requests when no token is configured.

alternative intake

carrier email

imports supported message and voicemail emails with attachments. this can avoid one webhook shape, but still depends on the carrier's actual delivery behavior.

operator supplied

public reachability

webhooks need an awake reachable host, tls endpoint, or tunnel. a container by itself does not make a sleeping laptop reachable.

local state

main implementation

jsonl inbox

stores normalized messages and raw payloads, deduplicates provider ids, and defaults to the user's local telephony data directory with an xdg override.

main implementation

views and sidecars

read marks, drafts, sent records, groups, policy decisions, and imported files stay distinct instead of being inferred from incoming payloads.

required

operator data policy

message contents are not magically encrypted by the toolkit. choose appropriate permissions, retention, deletion, and backup practices for the host.

agent and human interfaces

cli-first

command line

noninteractive setup returns missing questions and options as structured data rather than leaving an agent stuck at a prompt.

127.0.0.1:8790

local browser launcher

provides threads, calls, voicemail, email import, and draft replies. it has no authentication beyond its bind address and should stay local.

mcp branch / stdio

mcp + javascript sdk

exposes fifteen local tools—twelve read-only and three outward-facing—plus an sdk. no hosted https api is implied.

outbound action

main implementation

gated sms

voip.ms, flowroute, and signalwire adapters require both heyphony_send=allowed and the command's explicit send authorization.

callheavy + mcp

call tasks and audio

outbound tasks, baresip control, and local audio pumping exist, with local loopback proof rather than a blanket live-call guarantee.

incomplete

autonomous voicemail

generated worker code exists, but authorization and the separately running speaking agent remain unresolved in the baseline.

operating requirements

required for live service

persistent machine

keep registration, credentials, listeners, and storage on infrastructure that remains awake between agent invocations.

required per provider

real delivery proof

run status or doctor, then prove the route using the actual carrier account. repository verification flags are currently false.

design rule

narrow authority

one number, one agent, one message at a time. no campaign queues, schedules, bulk retries, or quiet-hours engine are part of the baseline.