Passa al contenuto principale

Runbook - Homer SIP Trace

Audience: ops / NOC Akira
Updated: 2026-06-04
Coverage: Homer 7 / heplify-server capture used by GET /api/v1/cdr/{call_id}/sip-trace.

Topology

  • Homer runs on the management node via infra/roles/homer.
  • Docker network is akira-homer_net.
  • Backend container joins akira-homer_net from the management compose and reads the capture DB with HOMER_DATABASE_URL.
  • Postgres Homer is not published on a host port by default. If a break-glass fallback is needed, bind only to a private or tailnet interface and protect it with firewall rules; never expose it on 0.0.0.0.

Canonical backend DSN shape:

postgresql+asyncpg://homer:<vault_homer_db_password>@db:5432/homer_data

Schema

The primary heplify-server data table is expected to be:

hep_proto_1_default

Primary columns:

  • sid: SIP Call-ID correlation key.
  • protocol_header: JSONB network metadata.
  • data_header: JSONB HEP/SIP metadata.
  • create_date: capture timestamp, searched in UTC.
  • raw: raw SIP payload.

The backend keeps runtime information_schema discovery as fallback for patched Homer installs, but hep_proto_1_default.sid is the primary path.

Checks

From a shell that can reach the Homer DB:

psql "$HOMER_DATABASE_URL" -c "\dt"
psql "$HOMER_DATABASE_URL" -c "\d+ hep_proto_1_default"
psql "$HOMER_DATABASE_URL" -c "SELECT create_date, sid, left(raw, 80) FROM hep_proto_1_default ORDER BY create_date DESC LIMIT 5"

From the backend container:

docker compose exec -T backend python - <<'PY'
from akira_backend.core.config import get_settings
print(get_settings().homer_database_url)
PY

CDR timestamps are normalized to UTC before querying Homer. A local Rome call at 12:04 on 2026-06-04 is searched around 10:04 UTC, with the configured margin.