Delphi v0.9.13-patch3
Delphi v0.9.13-patch3 moves TelAPI server protection into Admin Settings → API Server Config with IP-based tiers, adds a Send test email control under Platform Settings, hardens modular voice pipelines (STT-first link format and deferred Azure STT recovery), refreshes the TelAPI OpenAPI snapshot (TOBi callback schemas and clearer error models), wires password-expiry policy env vars to Tasker, and fixes Kamailio rewriting for legacy egress Refer-To URIs.
v0.9.13Recommended SDKv0.1.3Supported SDK range>=0.1.2 <0.2.0Highlights
- Replaced TelAPI
RATE_LIMIT_*environment variables and the Per API Key toggle with tiered IP-based limits stored inApiServerConfigand reloaded through Redis. - Added separate API and webhook rate-limit fields in Admin Settings → API Server Config, with clearer
429responses (RATE_LIMIT_EXCEEDEDplus optionaldetails). - Added Send test email on Admin Settings → Platform Settings — queues an
EMAIL_SENDTasker job to verify SMTP/SES delivery before go-live. - Hardened modular voice pipelines: Asterisk ↔ TelPhi link format now prefers the STT listen-side sample rate; TTS output aligns to STT when the provider supports it; Azure STT resets are deferred with jitter instead of reconnecting after every playback.
- Refreshed the TelAPI OpenAPI snapshot with dedicated TOBi callback schemas and WebRTC-aware component registration.
- Plumbed
PASSWORD_MAX_AGE_DAYS,PASSWORD_WARNING_DAYS, andNEXTAUTH_URLto Tasker so password-expiry reminder emails use the same policy as TelWeb. - Fixed Kamailio legacy egress Refer-To rewriting when TelPhi stamps
x-delphi-egress-routeon loopback URIs whose host fell back to the EC2 instance name instead ofDOMAIN_TELPRO/REFER_TARGET_HOST.
TelAPI rate limiting
Server protection is now configured entirely from Admin Settings → API Server Config (see API server config):
| Tier | Routes | Default (when enabled) | Configurable in TelWeb |
|---|---|---|---|
| Health | /health, /metrics | Exempt | — |
| API | Authenticated REST (/api/v1/sessions/*, /api/v1/runtime/*, /api/v1/endpoints, …) | 600 requests / minute / client IP | API Rate Limit Max + Window (ms) |
| Webhook | /api/v1/webhooks/* | 3000 requests / minute / client IP | Webhook Rate Limit Max + Window (ms) |
| Auth | /api/v1/auth/* | 20 requests / minute / client IP | Fixed preset (UI fields coming later) |
TelAPI loads limits from Postgres, caches them in Redis, and bumps revision key voiceai:api-server-config:rev whenever a SUPERUSER saves the config. No TelAPI restart is required for limit changes to take effect.
RATE_LIMIT_MAX and RATE_LIMIT_WINDOW_MS are no longer read by TelAPI. Delete them from API service vars.yaml / SSM after upgrade. Limits belong in API Server Config only.
Team daily API quotas (per-team request caps in Users and teams → API Access Configuration) are unchanged — they are a separate layer from this server-protection throttle.
When a tier limit is exceeded, TelAPI returns HTTP 429 with:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests",
"details": {"max": 600, "after": "1 minute", "ttlMs": 42000},
"requestId": "…"
}
}
TelAPI OpenAPI
The interactive reference at /api/reference now ships two snapshots — pick the profile that matches your deployment's FEATURE_WEBRTC setting:
- WebRTC enabled —
/openapi/telapi-webrtc.html - WebRTC disabled —
/openapi/telapi-webhooks.html
Platform settings — test email
SUPERUSERs can queue a one-off EMAIL_SEND job from Admin Settings → Platform Settings → Send test email. Use it after configuring Tasker mail transport (EMAIL_TRANSPORT, SMTP or SES env vars) and before enabling password-expiry or notification templates.
- Enter recipient, optional subject/body → Send test email.
- Open Job History, filter
EMAIL_SEND, confirmCOMPLETED. - For SES sandbox accounts, verify both sender and recipient identities in the AWS console.
See Platform settings and Tasker (Ops).
Modular voice audio
For flows using separate STT and TTS providers (not unified realtime), TelPhi now:
- Picks the Asterisk websocket link format from the STT input sample rate when
audio.linkFormatisauto(e.g.slin16for 16 kHz Azure STT). - Downgrades TTS output to the STT sample rate when the TTS vendor natively supports it, avoiding per-chunk resampling on playback.
- Schedules deferred Azure STT recognizer resets after TTS playback (with grace window and jitter) instead of forcing a full reconnect on every turn — reducing load while still recovering stuck VAD.
Unified realtime providers (OpenAI Realtime, etc.) are unchanged. Operators can still pin audio.linkFormat in flow source view.
Password expiry and Tasker
The daily PASSWORD_EXPIRY_CHECK cron job (Tasker) now reads the same policy env vars as TelWeb:
PASSWORD_MAX_AGE_DAYS(default90) — must match on TelWeb and Tasker.PASSWORD_WARNING_DAYS(default10) — reminder window before expiry.NEXTAUTH_URLon Tasker — base URL embedded in password-expiry email links (must point at the public TelWeb hostname).
Telephony
REFER_TARGET_HOST (TelPro) sets Kamailio REFER_SBC_HOST for loopback Refer-To detection. It defaults to DOMAIN_TELPRO in the TelPro entrypoint. Set it explicitly when carrier REFER targets must align with your public SIP hostname rather than the EC2 internal hostname.
Kamailio now rewrites legacy PSTN-offload Refer-To URIs that carry x-delphi-egress-route even when the Refer-To host is the instance HOSTNAME (ip-10-…), preventing transfers from stalling when the URI is still a telpro loopback target.
Operators
Database migration
Run voiceai-db-migrate before restarting application services:
- Drops
rateLimitPerApiKeyfromApiServerConfig. - Adds
webhookRateLimitMaxandwebhookRateLimitWindowMs. - Raises the default
rateLimitMaxbaseline to 600.
Baseline seeding creates the default API Server Config row when missing. Existing deployments keep their saved limits except for the removed per-key flag.
Upgrade checklist
- Run
voiceai-db-migrateon the Ops host before rolling tov0.9.13-patch3. - Remove
RATE_LIMIT_MAXandRATE_LIMIT_WINDOW_MSfrom the API service env bundle. - Review Admin Settings → API Server Config — confirm API and webhook tiers suit your traffic profile (defaults: 600/min API, 3000/min webhooks, per client IP).
- Set
PASSWORD_MAX_AGE_DAYS,PASSWORD_WARNING_DAYS, andNEXTAUTH_URLon Tasker to match TelWeb. - Set
REFER_TARGET_HOSTon TelPro whenDOMAIN_TELPROalone does not match the hostname carriers use in REFER targets. - Send a test email from Platform Settings and confirm the
EMAIL_SENDjob completes in Job History. - Redeploy TelAPI, TelWeb, TelPro, Tasker, and TelPhi (Voice).
- Spot-check
/api/referenceand a managed TOBi webhook contract against the updated OpenAPI snapshot.
SDK compatibility
| Component | Version |
|---|---|
| Platform | v0.9.13-patch3 |
| Recommended TelPhi SDK | v0.1.3 |
| Supported SDK range | >=0.1.2 <0.2.0 |
See the SDK section for installation and the per-version compatibility matrix. Patch releases do not change the TelPhi SDK contract.