dispactch error logs, how can we view
# ask-ai
m
dispactch error logs, how can we view
t
Thanks for reaching out, aigentzi. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to view dispatch error logs — here are the places to check and how to access them. • LiveKit Cloud Telephony call logs: Open your project in the LiveKit Cloud dashboard → Telephony → Call logs. These show inbound/outbound call events and errors. ◦ (Docs: Create and configure a Plivo SIP trunk)[https://docs.livekit.io/sip/quickstarts/configuring-plivo-trunk] • Your SIP provider logs: Check your SIP provider console (e.g., Plivo) for SIP-level errors and SIP responses related to dispatch attempts. • Agent runtime logs: On the machine running your agent, stream the latest agent logs with:
Copy code
lk agent logs
This shows runtime errors from dispatch logic. • External log aggregation: If you forward logs, check Datadog, CloudWatch, Sentry, or New Relic (configure log forwarding in your project secrets). If you want, tell me: • Whether the issue is with inbound or outbound dispatches, • The approximate timestamp of an error, and • If you have the agent running locally or in a cloud/container, and I’ll guide you to the most relevant logs and next troubleshooting steps. Sources: Create and configure a Plivo SIP trunk | LiveKit docs | Log collection | LiveKit Docs
m
we have noticed that succesful sessions had this format english-teacher-1764976802186-3ya2qs1 unsuccesful his format lesson-20af6758
t
Thanks — I’m looking into why successful sessions look like
english-teacher-1764976802186-3ya2qs1
while unsuccessful ones look like
lesson-20af6758
. Quick answer: those differences come from how room names are generated. The successful format includes a descriptive prefix, a timestamp, and a random suffix (high uniqueness). The
lesson-20af6758
style is shorter and may not guarantee uniqueness, which can cause reuse/collision and lead to race conditions or unexpected behavior when rooms are re-created quickly. To help diagnose, please tell me: • What “unsuccessful” means here (agent didn’t join, call failed, dispatch error, etc.) • Example timestamps for a successful and an unsuccessful session • Whether your code generates room names for both cases and a short snippet of the naming logic (or describe it) • If agents are dispatched by
agent_name
or another rule With those details I’ll point to the exact log locations and specific fixes (unique name pattern, add timestamp/UUID, or adjust room deletion timing). Would you like that? Sources: Avoiding Room ID Reuse When Re-Creating Rooms With the Same Name | Agent dispatch | LiveKit docs | SIP dispatch rule | LiveKit docs
m
succesful had agent name as part of session 'english-teacher-' do we have to incude the agenmt name whwhn creating the room ?
t
You do not have to include the agent name in the room name for LiveKit to work — room names are arbitrary strings. That said, include the agent name is a useful best practice because: • It makes debugging and logs easier to read. • Combined with a timestamp or UUID it prevents name reuse/collisions that can cause race conditions (rooms being re-created before previous state fully cleans up). Recommendation: • Use a pattern like
<agent>-<timestamp>-<short-random>
or
<agent>-<uuid>
when creating rooms. Quick next steps for me to help: • Do you see specific errors when you omit the agent name (agent not joining, dispatch errors)? • Can you share the room-creation naming code or describe how rooms are generated now? I’ll then point to the exact logs and a code snippet to change naming safely.
m
we are hainga n issue geting agents to join our rooms > we have 8 failure but account access the logs
t
I’m sorry you’re seeing agents fail to join — let’s narrow this down so I can point to the right logs and fixes. Please provide: • The exact failure symptoms (agent never connects, token rejected, immediate error, disconnect after join, etc.). • Any error messages you can copy from your UI or agent runtime. • Whether you use
agent_name
dispatch or another rule. • Examples of a failing room name and a succeeding room name (timestamps help). • Whether you can run
lk agent logs
where the agent runs, or if you only have Cloud dashboard access. If you can’t share logs here, tell me which of these you can access and I’ll give step-by-step commands/locations to check next.
m
dispatch failures
t
Thanks — you're seeing dispatch failures. Let's focus on diagnosing dispatch errors so agents can join rooms. Steps to check now: 1. Confirm dispatch rule and room naming ◦ Which dispatch rule do you use (dispatch by
agent_name
or other criteria)? ◦ Ensure the room name created matches the dispatch rule (e.g., if you dispatch by
agent_name
, room must include that agent identifier or the dispatched
agent_name
must be passed to dispatch). 1. Check agent runtime logs ◦ Run:
lk agent logs
where the agent runs and look for errors around the dispatch timestamps. Note messages like
no matching agents
,
token rejected
, or connection failures. 1. Check LiveKit Cloud Telephony call logs ◦ In your LiveKit Cloud dashboard → Telephony → Call logs, find the call/dispatch attempts at the failing timestamps and inspect SIP/provider errors. 1. Verify tokens & agent availability ◦ Ensure agents are online and receiving valid join tokens for the created room. Token rejection or expired tokens will prevent joins. 1. Look for race conditions / room uniqueness ◦ If room names are reused (short names like
lesson-20af6758
), create unique names (include
agent
, timestamp, or UUID) so dispatch targets the correct new room. 1. If you see specific errors, share: ◦ Exact error text from agent logs or UI ◦ One failing room name and one successful room name with timestamps ◦ Which dispatch rule you’re using I’ll use those details to point to the exact log lines and the probable fix (naming, token, dispatch rule, or provider issue). Would you like me to start with the agent logs or the Cloud call logs?
m
can you reviee and sugest why we have agent dispatct errors :
can you reviee and sugest why we have agent dispatct errors :
t
Thanks — I’ll review and suggest why you have agent dispatch errors. I need a few quick items to diagnose the root cause: • One failing room name and one successful room name (exact strings) with their timestamps. • The dispatch rule you use (dispatch by
agent_name
, skill, priority, etc.). • One sample agent runtime log excerpt around a failure (copy any error lines you see from
lk agent logs
). • Whether your agents are receiving join tokens and how tokens are minted (server-side code snippet or brief description). • Whether agents are running locally or in a container/VM and if you can run
lk agent logs
. If you prefer, paste the failing room name + the agent log error lines first and I’ll start the analysis and give specific fixes (room-naming change, token fix, dispatch-rule adjustment, or race-condition mitigation).
m
we cannot access logs can you look at this snippet ?
t
Please paste the log snippet here (any lines around the dispatch failure). If you can't paste full logs, include: • The exact failing room name string and timestamp • Any error lines or messages (even short ones like
token rejected
,
no matching agents
,
connection refused
) • The dispatch rule you use (e.g.,
agent_name
, skill, priority) • How you generate join tokens (brief: server mints with TTL X, or client-side) Once I have that snippet or details I’ll analyze it and give specific fixes (token, naming, dispatch rule, or race-condition steps).