Skip to main content
Version: 0.9.13

Voice service operations

The Voice service runs the actual voice-AI processing: TelSys (Asterisk 22.9.0) provides PBX and media handling, TelPhi (Node 24) orchestrates AI conversations via realtime and modular speech providers, and AudioProc does optional VAD / noise reduction. SIP calls arrive from TelPro and are processed here. Multiple Voice instances run in parallel for horizontal scaling.

Instance

Instance vCPU and RAM are in Provision instances. The reference size (3 vCPU / 4 GB RAM) targets ~100 concurrent calls per Voice instance — provision additional instances (manually or via the Ops Scaler) for higher load.

FieldValue
NetworkPrivate only — no public IP; traffic arrives via managed load balancer
ScalableYes — set initial count in your provisioning tool; the Ops Scaler can adjust count dynamically

Containers

ContainerBasePort(s)Purpose
voiceai-telsysAsterisk 22.9.0 (built from source on debian:bookworm-slim)5080 SIP · 8088 ARI · 10000–11999 RTPAsterisk PBX / media
voiceai-telphiNode 24-alpine12001 media WSAI conversation engine
voiceai-audioprocpython:3.11-slim (CPU) or nvidia/cuda:12.4.1-runtime-ubuntu22.04 (GPU)8790 WSAudio preprocessing (optional)
log-to-spanalpine:3.19 + Go binaryConverts TelSys structured logs to OTLP spans
voiceai-otel-collectorotel/opentelemetry-collector-contrib:0.150.1Telemetry collector

AudioProc is the optional audio-preprocessing sidecar in the Voice stack. When the audioPreprocessing feature flag is off, the generated Compose file drops voiceai-audioproc and TelPhi runs without that preprocessing hop. When it is on, TelPhi can send inbound audio frames through AudioProc before they reach the configured speech or realtime AI provider, mainly to improve noisy carrier audio with VAD / noise reduction.

Voice stack baseline

Asterisk upgraded to 22.9.0 with missing slin RTP codec entries fixed. chan_websocket enables WebSocket-oriented voice infrastructure. TelPhi media-session handling improved; WebRTC start-call no longer requires two clicks.

Call flow

  1. TelPro routes an INVITE to TelSys (VAIPROXIESPIPED:SIPPORTTELPRO).
  2. TelSys prepares the call and bridges to TelPhi via Asterisk ExternalMedia over the TelPhi media WebSocket (TELPHI_MEDIA_PORT, default 12001).
  3. TelPhi prepares the configured AI provider and media path. In v0.9.13, inbound readiness policy can delay answer until the provider and media path are ready.
  4. AudioProc (when AUDIOPROC_ENABLED=true) preprocesses inbound audio frames.
  5. Managed actions such as transfer, hangup, and failover flow through TelPhi and TelSys, then route out through TelPro when they need SIP egress.

Managed telephony actions

v0.9.13 unifies transfer, hangup, failover, and inbound-not-ready behavior across Flow Builder nodes, managed LLM callbacks, and sandbox/runtime commands. Operationally this means:

  • TelPhi validates and executes the call action.
  • TelSys performs the Asterisk-side bridge, REFER, BYE, reinvite, or disconnect behavior.
  • TelPro handles SIP egress, outbound routing, and failover toward the carrier or PBX.
  • Transfer restrictions are checked before a managed transfer is attempted.

When debugging a managed action, correlate TelPhi application logs, TelSys PJSIP logs, and TelPro SIP ladder spans for the same call ID.

RFC 3262 (100rel / PRACK)

SIP_100REL_MODE on TelSys (voiceai-telsys) sets the PJSIP endpoint 100rel option for the TelPro-facing leg. It controls whether Asterisk sends reliable provisional responses (180/183 with Require: 100rel) and accepts PRACK from the peer.

ValueMeaning
offNo PRACK / 100rel. Default — use when the carrier does not require reliable provisionals.
peer_supportedSend reliable 180/183 only when the peer advertises Supported: 100rel. Start here when a carrier rejects early media or expects PRACK.
yesAlways use reliable provisionals on this endpoint, regardless of peer capability.
requiredRequire 100rel on the endpoint (strictest). Use only when the carrier mandates PRACK on every call.

TelSys also accepts common synonyms (no / disabled / false for off; on / true / enabled for yes; and similar). An unknown value falls back to peer_supported with a warning in TelSys logs.

Kamailio on TelPro relays in-dialog PRACK and labels reliable 1xx / PRACK in the Debug SIP ladder. Configure SIP_100REL_MODE on the Voice service env bundle (vars.yaml / SSM).

See also