Skip to content
SIHub Guides
Select language
Guides/Acceptance
SIHub · Guides

Acceptance testing for capacity, costs and failures before launch

20 parallel conversations are the production target, 30 the planned peak reserve. Two configured workers, a 30-channel SIP contract and successful mock tests do not prove this capacity. The following acceptance test requires your own LiveKit/carrier/STT/TTS/LLM credentials, authorized test participants or a suitable SIP audio load generator, and actual measurements.

Preconditions

Check /api/voice/status, MariaDB/Redis reachability, both workers, provider concurrency limits and the allowed trunk/channel/workspace bindings. Record contact persons, a way to abort and the real cost of test minutes. No load generator is started automatically during deployment.

Default: at most 30 active voice leases globally, 20 per workspace, 15 job slots per worker. For a test with 30 calls, therefore distribute the participants across at least two explicitly approved workspaces, for example 20+10. A second copy of an API key does not lift a provider project limit. Deepgram project/region limits

Use published agent versions and approved test numbers with confirmed consent. A SIP connection without spoken/streamed audio only measures signaling. Each simulated participant must go through several real turns, including interruptions, knowledge questions and a safe tool test.

Measurement protocol and target thresholds

For each run, record the time, software/image versions, model/voice/region selection, host data, number of participants and run duration. Store measurements per turn and call with pseudonymous IDs; do not enable call recording just for the test.

Measurement Proposed acceptance target
20 active calls at least 15 minutes without a process crash; ≥100 measured response turns
Peak reserve of 30 at least 10 minutes; overload is rejected in a controlled way instead of being started without limits
End of user utterance → first audible agent audio p95 ≤1.5 s, p99 ≤2.5 s for simple FAQ turns
Interruption p95 ≤0.5 s until agent audio stops; no permanent crosstalk
Audio no repeated dropouts, cut-off responses, or silent connected calls
Client/tool isolation 0 accesses to other clients' knowledge, trunks or credentials
Write tools 0 unintended duplicate actions; unclear states are not retried automatically
Capacity accounting no permanently lost capacity slots after call end/lease expiry
Data and usage no missing conversation completions; repeated cumulative metrics are not counted twice

These numbers are Operator target thresholds, not measured values or provider SLAs. Complex CRM/calendar requests get their own budget and are not mixed with simple FAQ answers.

Proceed in stages

  1. One conversation: Check inbound, outbound, browser audio, a published knowledge answer and an explicitly permitted read-only tool.
  2. Five conversations: ten minutes, different speakers/languages, short and long pauses, interruptions, call endings.
  3. 20 conversations: at least 15 minutes, all calls with real audio, at times with simultaneous end-of-speech events. Record warmup and cold provider/DGX starts separately.
  4. 30 conversations: 20+10 workspaces, reserve test followed by a controlled rejection of additional calls. Do not simply disable API rate limits; build up calls in a planned way and hold them longer, or use an authorized carrier/LiveKit test path.
  5. Endurance run: check defined real test minutes over a longer period, outbox delivery, database growth, memory and open sessions.

Prometheus/Grafana check HTTP and worker endpoints; audio quality cannot be derived from that alone. Use the actual SDK metrics/LiveKit session data for STT end, LLM TTFT, TTS TTFB and audible audio start. An LLM token time measured in the SDK is not the same as the time at the phone handset.

Test failures in a controlled manner

  • DGX/home network off: Stop only the local LLM or the DGX VPN. The cloud path must take over new response turns; no repetition of a response beginning that was already output. Then check the recovery.
  • One worker stopped: Keep observing the other worker's calls. Jobs that are already active are not guaranteed to move to another process without loss. Check the controlled shutdown, new dispatches, remaining capacity and the freeing of stale leases after the maximum runtime/TTL.
  • Redis not reachable: No unlimited, uncounted live approval. Recovery must restore the shared capacity check.
  • STT/TTS/LLM error or 429: Clear abort/fallback, no made-up successful tool booking and no unchecked duplicate calls.
  • Database failure: Controlled error, no success without a saved result; then check the recovery.
  • Invalid binding: Deliberately request another client's channel/trunk/tool key/webhook endpoint and document the rejection in your own test area.

A single host remains a single point of failure. For an availability commitment, you must additionally design and test workers on separate hosts, database/network redundancy and enough remaining job/provider capacity. The initial two-container configuration does not provide a 99.9% guarantee.

Reconcile usage and costs

GET /api/usage and /api/usage/export provide the stored usage. Enter in AIHUB_USAGE_PRICING your actual current contract prices as follows: telephony/audio/STT/TTS per minute, TTS per character if applicable, LLM input/cached/output tokens and your selling price. All values are decimal values in EUR; no made-up market rates are assumed.

The configuration contract is:

JSON field Unit
currency only EUR
telephony_per_minute_eur EUR per measured minute of conversation
audio_platform_per_minute_eur EUR per measured minute of conversation for the media platform
stt_per_minute_eur EUR per STT audio minute measured by the SDK
tts_per_minute_eur EUR per TTS audio minute measured by the SDK
tts_per_million_characters_eur EUR per 1 million TTS characters
llm_input_per_million_eur EUR per 1 million uncached LLM input tokens
llm_cached_input_per_million_eur EUR per 1 million cached LLM input tokens
llm_output_per_million_eur EUR per 1 million LLM output tokens
sell_per_minute_eur your selling price per minute of conversation

Entries are non-negative JSON numbers. Enter only price components that actually apply: if TTS is billed only per character, omit tts_per_minute_eur so that no second price component is added. In the .env.production the entire JSON must be enclosed in single outer quotes, for example AIHUB_USAGE_PRICING='{"currency":"EUR"}' before the actual prices are added. Missing cost fields do not yield a complete cost estimate; 0 means a price component that is deliberately free.

The current calculation uses one shared operator price rate per session; it does not bill DGX, cloud and fallback tokens differently by model. Prices are saved as a snapshot when the session is created. Change the operator environment and rebuild the app so that new calls receive the new prices; existing sessions keep their snapshot.

The reconciliation of call minutes, tokens and characters must match the provider invoices. Repeated cumulative worker events must not be charged in full again. Note units, minimum charges, rounded carrier intervals, failed calls, cache prices and other account fees. SIHub usage estimates are not an automatically issued invoice and are not guaranteed to match every provider's billing system.

Approve only when a dated report with measured results, open deviations and a responsible decision is available. A status field “Target 20/Reserve 30” does not retroactively become automatic proof. If credentials are missing, the correct status is “Acceptance still pending”.