jolly-autumn-53818
12/29/2025, 5:05 AMtall-airline-16756
12/29/2025, 5:06 AMjolly-autumn-53818
12/29/2025, 5:06 AMtall-airline-16756
12/29/2025, 5:06 AMagent_name dispatching or automatic dispatch.
• Any relevant config snippets or commands (dispatch rule JSON, RoomConfiguration snippet, or lk CLI commands and outputs).
• Whether this was working previously or is a new setup.
If you prefer, paste the agent name you expect to be dispatched and a short copy of the dispatch rule or trunk mapping — I’ll review for common mismatches (agent name mismatch, missing RoomAgentDispatch in RoomConfiguration, trunk not linked to rule, or JWT permission issues).
Sources: Agent dispatch | LiveKit docs | Accepting calls overview | LiveKit docs | Agents telephony integration | LiveKit docs | Agent server options | LiveKit docs | sip | livekit/livekit_composite | DeepWikitall-airline-16756
12/29/2025, 5:06 AMagent_name. If agent_name is present, automatic dispatch is disabled and you must explicitly dispatch that agent.
• Confirm the agent_name in your agent code exactly matches the name used in the dispatch rule or request (case-sensitive).
1. Check room/agent registration
• Verify the RoomConfiguration includes the RoomAgentDispatch entry with correct agent_name and any required metadata.
• If using participant tokens, confirm tokens include the room dispatch configuration.
1. Inspect SIP trunk & dispatch rule (if SIP)
• Ensure the inbound trunk is configured for the called number.
• Confirm the dispatch rule references the correct trunk_ids and includes a room_config that lists your agent by name.
1. Use CLI and logs
• Run these to list and inspect rules/resources:
◦ lk sip dispatch list
◦ lk sip inbound list
◦ lk dispatch list --room <room-name>
• Enable debug logging for the agent and check deployment logs:
◦ Start agent with debug log level (example): uv run agent.py start --log-level=DEBUG
◦ View agent deploy logs: lk agent logs --log-type=deploy --id=<agent-id>
1. Look for common failure points
• Mismatched or missing agent_name
• Dispatch rule pointing to wrong trunk or missing trunk
• Room not created because token/JWT lacks required permissions
• Agent fails to join due to runtime errors — check agent process logs for join failures or exceptions
What I need from you to narrow this down
• Is this SIP-triggered or API/participant-token triggered dispatch?
• Exact error text or logs (agent logs, dispatch service logs, or any error codes you see).
• Agent SDK and language (Python/Node) and agent version.
• Example of the dispatch rule or RoomConfiguration (redact secrets).
• Whether this was working previously or this is a new setup.
If you share those details (especially the error messages and whether SIP is involved), I’ll give the exact commands and log locations to pull and interpret, plus immediate next steps to fix the root cause.jolly-autumn-53818
12/29/2025, 5:07 AMjolly-autumn-53818
12/29/2025, 5:07 AMtall-airline-16756
12/29/2025, 5:07 AMlk agent logs
• Deployment/build logs only: lk agent logs --log-type=deploy
Use these to see agent start errors, join failures, or exceptions when handling a dispatch.
LiveKit Cloud Dashboard (Agent observability)
• Open your project → Agent insights (or Agent observability) to view per-session traces, transcripts, and logs.
Use this to correlate a dispatch event to room creation, agent join time, and any session-level errors.
SIP / dispatch configuration checks
• List dispatch rules and inbound trunks with the CLI/SDK to confirm the rule/trunk mapping:
◦ CLI: lk sip dispatch list and lk sip inbound list
◦ SDK: sip.list_sip_dispatch_rule(...) / sip.list_sip_inbound_trunk(...)
Check that the dispatch rule references the correct trunk_id and room_config (agent_name/room_prefix).
Room & participant events
• Inspect room creation and participant join events via Agent insights or agent logs to confirm whether a room was created and whether a SIP participant or agent joined.
What to share if you want me to look closer
• Whether the dispatch was SIP-triggered or API/token-triggered.
• A snippet of the error from lk agent logs or the Agent insights session logs (redact secrets).
• The dispatch rule or RoomConfiguration (redact secrets) and the agent name used.
Tell me which project and agent ID (or paste the exact log lines/error) and I’ll point to the exact log entries and next steps.
Sources: Deploying to production | LiveKit Docs | sip | livekit/livekit_composite | DeepWiki | Streamline Troubleshooting with Agent Observabilityjolly-autumn-53818
12/29/2025, 5:07 AMtall-airline-16756
12/29/2025, 5:08 AMagent_name) shown there.
If you want, tell me:
• The project name and agent name (or a session ID/time), and I’ll point to the exact session entries to inspect.
• Or paste a specific session log line or error you see in the UI and I’ll explain what it indicates and next steps.magnificent-art-43333
12/29/2025, 5:13 AM