📞 English documentation
日本語 →

📞Layer 1: Voice Edge

The call's entry point (HGW / Asterisk / bridge). Current operations vs. Phase C v2.

The physical entry point for calls (the Voice Edge). A Hikari Denwa HGW receives the call, Asterisk passes the audio to bridge.py over AudioSocket, and OpenAI Realtime makes the decision.

Architecture

HGW (Hikari Denwa) SIP REGISTER extension Asterisk 20 LTS pjsip / dialplan bridge.py AudioSocket :9092 / μlaw↔PCM OpenAI Realtime classify_call AMI DBPut :5039 write verdict AstDB aegis_verdict/${UNIQUEID} spam → Hangup(21) fail-safe allow → Dial(ALLOW_DESTINATION) normal forward unknown/empty → Dial(HUMAN_PEER) fail-open (C-2(b))
Diagram: solid = audio path (μlaw 8k ↔ PCM 24k); dashed = verdict return path (bridge→AMI→AstDB→dialplan). The dialplan branches three ways on the verdict.

Current operations vs. Phase C v2

Current operations (v1) Phase C v2 (pre on-device test)
Hardware Existing equipment New Raspberry Pi
OS Raspbian 9 Ubuntu 24.04 LTS
Asterisk Asterisk 11 Asterisk 20 LTS
SIP chan_sip chan_pjsip
Audio link (legacy path) chan_audiosocket → bridge.py
Setup Via ChatVoice deploy.sh / verify.sh / systemd
How failures fall (important)

spam is a Hangup (fail-safe = block); anything undecidable or any fault goes to a human (fail-open = stay in business). We do not use cutting everything off (fail-closed); it was removed in C-2(b). See the glossary for details.

Key parameters

  • AudioSocket: 127.0.0.1:9092 (μlaw 8kHz ↔ PCM16 24kHz resampling)
  • AMI: 127.0.0.1:5039 (Action: DBPut writes the verdict to AstDB)
  • dialplan placeholders: <ALLOW_DESTINATION> (allow forwarding target) / <HUMAN_PEER> (fail-open hand-off target)