steep-balloon-41261
10/23/2025, 8:28 AMtall-airline-16756
10/23/2025, 8:29 AMtall-airline-16756
10/23/2025, 8:29 AMagent_name in WorkerOptions exactly matches the RoomAgentDispatch rule. Sometimes, even a small mismatch can cause the agent dispatch to not work properly.
2. Monitor for Unrecoverable Agent Errors: It’s helpful to set up an error event listener on AgentSession to catch and log any errors. Using the CloseEvent.error property can give you insights into what’s going wrong, such as issues with TTS or LLM.
3. Handle Session Closure: When the session closes, you can use the on_close handler to smoothly transfer the SIP participant to a fallback number, like a human agent line, with ctx.transfer_sip_participant(). This keeps the experience seamless.
4. Ensure High Agent Availability: Running multiple agent workers with the same agent_name is a great way to add redundancy and reduce disruptions. It really helps keep things running smoothly.
5. Review SIP Server Logs: Take a look at the SIP server logs for any protocol-level hiccups like invalid trunk IDs, missing ACKs, or media timeouts. Specific log messages can point you toward authentication or connectivity issues.
6. Leverage Error Recovery: For errors that can be recovered from, mark them as recoverable within the error event handler to avoid closing the session. If problems persist, resetting the agent session might be the best next step.
Also, enabling detailed logging in both the LiveKit SIP server and agent services will really help you diagnose and fix the issue more effectively. If you need any more guidance along the way, I’m here to help!
Sources: examples/warm-transfer/warm_transfer.py | SIP Integration & Telephony | livekit/livekit_composite | DeepWiki | pkg/sip/inbound.go | SIP troubleshooting guide | LiveKit Docs | Events and error handling | LiveKit Docstall-airline-16756
10/23/2025, 8:33 AMagent_name is correctly set both in your worker configuration (WorkerOptions) and in the SIP dispatch rule (RoomAgentDispatch).
3. Scale Agent Workers: To improve availability, try running multiple agent instances with the same agent_name. If possible, setting up auto-scaling can really help keep things running smoothly.
4. Monitor Worker Load: Keep an eye on whether your workers are hitting the load threshold (which is 70% by default). If they are, you might want to add more resources or scale up your workers.
5. Avoid Resource Contention: Make sure there aren’t any other CPU-intensive applications running on the same server as your agent workers, as this can impact their performance.
6. Use Diagnostic Tools: Don’t hesitate to use CLI commands like lk agent status --id <agent-id> and lk agent logs --id <agent-id> --log-type=deploy. These tools can give you valuable insights into the agent status and logs, which can help with troubleshooting.
Following these steps should guide you toward identifying and resolving the issue with unavailable workers for your SIP inbound calls. If you need any more help or have questions along the way, I’m here for you!
Sources: SIP troubleshooting guide | LiveKit Docs | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki | SIP Integration & Telephony | livekit/livekit_composite | DeepWiki | Community & Support | livekit/livekit_composite | DeepWiki | pkg/agent/client.gotall-airline-16756
10/23/2025, 8:44 AMST_XCn2KbcwxsFB is set up correctly and matches the SIP trunk used for your inbound calls. If the trunk isn’t configured properly or isn’t active, the rule might not work as expected.
2. Room Name Format: The room name pattern
To help narrow things down further, it’s a good idea to confirm that your SIP trunk is active and correctly authenticated. Then, try testing the dispatch rule by making a call to see if it routes to the right room and agent. I’m here if you need any more guidance along the way!
a. _ should fit the expected format for inbound calls. It’s a good idea to verify that the caller ID and the random string are being generated just right.
b. Agent Name: Make sure the agent name inbound-demo-test matches exactly with the agent_name set in your worker settings. Even a small mismatch here can stop the agent from being dispatched.
c. Rule Type: The rule type is currently set to Individual (Caller). Think about whether this fits your intended setup for routing calls to individual participants, just to be sure everything aligns.
d. Attributes: The attributes field is empty (map[]). If your routing depends on specific attributes, please check that they’re properly defined. Sources: livekit-protocol/livekit/protocol/sip.pyi | livekit/livekit_sip.pb.go | SIP dispatch rule | LiveKit Docs | SIP APIs | LiveKit Docs | Accepting inbound calls | LiveKit Docs