facing this with livekit sdk what could be the re...
# ask-ai
o
facing this with livekit sdk what could be the reason,
Copy code
{
  "statusCode": 500,
  "body": "{\"error\": \"TwirpError(code=canceled, message=twirp error unknown: transaction failed to complete (0 intermediate responses), status=408)\"}"
}
t
Thanks for reaching out, Jaivarsan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m looking at the TwirpError:
code=canceled ... status=408
and will help troubleshoot. That error means the request timed out (transaction failed with 0 intermediate responses). Here are the most likely causes and quick checks you can run. Likely causes and checks • Network/connectivity issues — verify your service can reach the LiveKit server and any TURN/STUN or SIP endpoints. Run a connection test (ConnectionCheck) from the same environment. • SIP-related timeout (if you’re using SIP) — this commonly appears during SIP operations (e.g.,
TransferSIPParticipant
). Confirm the SIP URI is correct, the SIP trunk is reachable, and REFER/transfers are allowed by your provider. • Service or endpoint unavailability — check LiveKit or upstream SIP provider availability and server logs for errors or spikes in latency. • Server load/latency — high latency can exceed request timeouts; check observability/metrics for the server handling the request. • Transient failure/retries — the SDK has retry logic; ensure you have retry/backoff in your code for transient network issues. What I need to narrow this down 1. Which API call is failing (e.g.,
TransferSIPParticipant
,
CreateSIPParticipant
, or another)? 2. A short code snippet or the request payload around the failing call. 3. Does this happen always or intermittently? From which environment (local, server, cloud region)? 4. If SIP-related: the destination SIP URI and trunk/provider (no credentials) and whether REFER is required. If you share those details I’ll suggest targeted next steps (logs to check, config changes, and example fixes). Sources: SIP troubleshooting guide | LiveKit docs | Diagnosing Connection Errors with Connection Test Utility | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup| | server-sdk-go | livekit/livekit_composite | DeepWiki
o
it gives 200, when i set, wait_until_answer=False what is going on
t
Good observation — that parameter is the key. When you set
wait_until_answer=False
, the SDK/API returns immediately after initiating the outbound call (HTTP 200) instead of waiting for the remote party to answer. That avoids the request hanging until an answer (which is what caused the Twirp 408 timeout when you waited). In other words: •
wait_until_answer=True
— server waits for the call to be answered; if no answer or no intermediate responses arrive before the timeout, you get the Twirp timeout/canceled error. •
wait_until_answer=False
— server returns success right away and handles the rest asynchronously, so you see HTTP 200. If you want to keep waiting for answer but avoid timeouts, tell me: 1. Which API call you’re using (e.g.,
TransferSIPParticipant
). 2. Whether the failure is intermittent or consistent. 3. Any server logs or timing (how long before the 408 occurs). I can then suggest increasing timeouts, retry/backoff approaches, or SIP/trunk checks depending on the call. Would you like that?