Skip to main content

Delphi v0.9.16-patch1

KI Kombinat GmbH

Delphi v0.9.16-patch1 reduces TOBi callback contention on TelAPI, accepts benign late end-of-conversation acknowledgements, and hardens hangup SIP header delivery. TelPro media advertisement is clearer for LB/NAT hosts, Azure STT turn races are quieter under load, and RTPEngine final-stat spans expose per-endpoint counters.

Platformv0.9.16-patch1Recommended SDKv0.1.4Supported SDK range>=0.1.3 <0.2.0

Highlights

  • TOBi webhook throughput — TelAPI pipelines Redis auth/session work on dedicated webhook connections and publishes callback latency metrics for API autoscaling.
  • Late end acknowledgements — benign “Conversation has ended!” callbacks after session cleanup return success instead of auth failures or credential jail.
  • Hangup header delivery — empty header values are kept; RFC-invalid header names are sanitized before BYE; SeeTest/mock hangup envelopes are normalized.
  • TelPro media advertisement — bind vs SDP advertise addresses are separated for LB/NAT and HA floating-media hosts (EXTERNAL_IP / TELPRO_MEDIA_IP).
  • STT/TTS turn hygiene — duplicate Azure STT turn.end after rotate is idempotent; TTS synthesizes are tagged by reason for turn accounting; spoken text prefers voiceMessage.
  • Publish verification — flow publish confirms TOBi Application Metadata and channelData rules actually landed in Redis.

Voice, SIP, and WebRTC

TelPro hosts derive the media address advertised in SDP from TELPRO_MEDIA_IP, then EXTERNAL_IP, then PUBLIC_IP. On LB/NAT hosts, RTPEngine binds privately and advertises the external address; direct-public hosts continue to bind and advertise the local public IP. Answer and late ACK-with-SDP paths set explicit RTPEngine direction pairs for outbound, inbound, and internal trunks.

Managed hangup continues to prefer disconnecting the call over failing closed on header problems. Empty custom header values (used by some Genesys routing headers) are applied to BYE. Invalid characters in header names are sanitized or dropped before publish so Kamailio can still apply the remaining set, including Reason when present. See SIP header budget.

TOBi create-conversation channelData Add rules can resolve internal SIP headers in templates (for example {{header.X-Call-ID}}), while forward/split rules still omit internal headers. Application Metadata and inbound channelData rules remain live only after you Publish the flow — Flow Builder copy now states this explicitly. See TOBi managed LLM → Application Metadata.

TelAPI and SDK

TOBi callback handling shares the same Redis connection settings but uses dedicated clients for webhook and rate-limit traffic so bursts do not starve other TelAPI work. Auth, session lookup, and stream write steps are pipelined on the hot path. After hangup, late typing / “Conversation has ended!” acknowledgements are accepted when the callback session is already gone.

Custom bot events accept common mock/SeeTest aliases (eventName, nested input, top-level hangup/handover reasons and SIP header arrays) and map them into the managed hangup/transfer action shape. Spoken text for TTS prefers voiceMessage over textPlain/HTML so SSML voice payloads are not replaced by fallback plain text.

The TelPhi SDK contract did not change in this patch. Keep 0.1.4 recommended; 0.1.3 remains supported for clients that do not need text chat or handoff APIs.

Observability and Operations

log-to-span now parses RTPEngine final-stat blocks into per-endpoint counters (packets/bytes in and out), with optional CIDR rtpEndpointRules to label remote roles (for example Asterisk vs carrier). Scaler API capacity uses the maximum of connection utilization, webhook in-flight utilization, callback p95 versus target, and event-loop lag p95 versus target. Defaults can be overridden on the API server-group scalingConfig (maxWebhookInFlightPerServer, callbackP95TargetMs, eventLoopLagTargetMs).

Operators

No migrations

This patch has no database migrations. Redeploy the updated TelAPI, TelPhi, TelPro (with RTPEngine), Scaler, log-to-span, and TelWeb images/config before validating production traffic.

TelPro media addresses

On LB/NAT TelPro hosts, set EXTERNAL_IP to the routable SIP/media address. For HA floating media, set TELPRO_MEDIA_IP when the advertised media IP differs from the SIP external address. Leave EXTERNAL_IP unset on direct-public hosts. See TelPro operations.

API autoscaling signals

After rollout, watch TelAPI webhook callback p95 and in-flight gauges. Raise or lower maxWebhookInFlightPerServer, callbackP95TargetMs, and eventLoopLagTargetMs on the API server group if scale-out is too aggressive or too slow under TOBi load.

Upgrade checklist

  1. Deploy TelAPI, TelPhi, TelPro/RTPEngine, Scaler, log-to-span, and TelWeb on v0.9.16-patch1 (no voiceai-db-migrate step required for this patch alone).
  2. Confirm TelPro EXTERNAL_IP / TELPRO_MEDIA_IP for each LB/NAT or HA media host, then place a test call and verify SDP media addresses.
  3. Place a TOBi hangup call that returns custom BYE headers (including empty values if used) and confirm the call clears and headers appear on the carrier leg.
  4. Publish a flow with Application Metadata or channelData Add rules and confirm create-conversation channelData matches the published config.
  5. Optionally configure rtpEndpointRules CIDRs in the TelPro log-to-span RTPEngine config so endpoint roles classify correctly in observability.

SDK compatibility

ComponentVersion
Platformv0.9.16-patch1
Recommended TelPhi SDKv0.1.4
Supported SDK range>=0.1.3 <0.2.0

No published SDK package update is required for this patch.