Skip to main content
Version: 0.9.14

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.154.0Telemetry 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 controls reliable provisionals and PRACK toward TelPro. Default off. Use peer_supported when a carrier expects PRACK.

Full method behaviour, ladder labels, and Kamailio [SIP_100REL] logging: SIP signaling reference → RFC 3262.

ValueMeaning
offNo PRACK / 100rel. Default.
peer_supportedReliable 180/183 only when the peer advertises Supported: 100rel.
yesAlways use reliable provisionals on this endpoint.
requiredRequire 100rel on the endpoint (strictest).

Configure on the Voice service env bundle (vars.yaml / SSM).

SIP errors and conversation state

Voice turns accepted SIP calls into Delphi conversations, but it does not own every SIP failure. Use this split when reading errors:

Failure pointTypical user-visible resultOwner to inspect
Carrier/PBX rejects an inbound or outbound legSIP ladder shows the upstream response code and reason. A conversation may not exist if the call never reached Voice.TelPro Kamailio / carrier routing.
TelPro cannot dispatch to VoiceINVITE fails before TelSys creates the channel.TelPro Redis dispatcher state and Voice heartbeats.
TelSys accepts the call but cannot bridge media to TelPhiConversation may start, then fail or remain silent.TelSys PJSIP/ARI logs and TelPhi media-session logs.
TelPhi rejects a managed actionCall can continue, fail the action, or hang up depending on the action policy.TelPhi action logs and the TelWeb conversation timeline.
Provider or flow runtime fails after answerSIP may stay connected while the AI path errors, then hang up or fall back according to the flow.TelPhi trace, provider logs, and flow run.

For any SIP-facing incident, start with the Debug SIP ladder and the SIP signaling reference, then correlate the same trace to TelSys and TelPhi before changing flow or trunk config.

See also