Testing & troubleshooting

Work through these in order; Fonada can run test calls with you at any stage. Steps 1–8 apply to both directions — validate them with inbound calls first (easier to trigger), then repeat steps 6 and 7 for outbound.

  1. Connectivity. Fonada connects and the endpoint accepts the upgrade. Confirm from the access logs, and that the URL and any authentication parameter arrive as expected.
  2. session_start parsing. The endpoint logs the session_id, the phone numbers, and the direction, and the field names match what the code expects.
  3. Audio reception. Write 10 seconds to a file and play it back — it should be intelligible speech at the agreed rate. Wrong-sounding audio here is almost always a sample-rate mismatch.
  4. Echo test. Return the end user's audio unchanged; they should hear themselves clearly. This validates the return path independently of your TTS.
  5. Real response. Return TTS audio and confirm it is heard cleanly — no truncation at the end (which indicates bursting too far ahead) and no distortion (a rate mismatch).
  6. Outbound concurrency. Run a small campaign at expected peak concurrency and confirm no connections are refused and no audio is dropped.
  7. Transfer. Call the transfer API mid-conversation and confirm the end user reaches a human agent and the WebSocket closes.
  8. Failure handling. Restart the service during a call and confirm the behaviour is as expected: the call drops, which is by design.

Troubleshooting

SymptomLikely cause
Calls fail the moment they connectEndpoint unreachable, invalid TLS certificate, or the upgrade is rejected (auth failure). Check the access logs for the handshake.
Far fewer connections than outbound calls placedExpected. Only answered calls reach the endpoint; check dial outcomes in the outbound reporting.
End-user audio sounds too fast, slow, or garbledSample-rate mismatch. Confirm the endpoint reads at input_sample_rate from session_start.
Your audio sounds wrong to the end userYou are sending a rate other than the agreed output_sample_rate.
Your response is cut off partwayBursting more than a few seconds ahead of real time; stream progressively. Alternatively, the call ended early.
You cannot parse the audio Fonada sendsYour implementation and Fonada's configured encoding disagree — ask Fonada which is enabled. The reverse direction is tolerant: Fonada accepts either form.
Nothing arrives for the first half secondChunk size is 16384; ask Fonada to reduce it to 640.
The end of the last sentence is missingTrailing partial chunk with a large chunk size; ask Fonada to reduce it.
Calls drop mid-conversationYour service stopped reading for over 5 seconds, closed the socket, or crashed.
Audio is choppy or has gapsSustained delay reading from the socket — check whether processing blocks the read loop.
Connections refused during campaign ramp-upEndpoint under-provisioned for peak concurrency, or a load-balancer connection limit.
Transfer returns 404The call already ended, the session_id is incorrect, or transfer is not enabled for the account.
Transfer returns 502Fonada's telephony control link is temporarily unavailable. The call is unaffected — continue the conversation or retry.