steep-mechanic-38687
10/30/2025, 10:27 AMtall-airline-16756
10/30/2025, 10:27 AMtall-airline-16756
10/30/2025, 10:29 AMagent_name set within the WorkerOptions. This helps avoid any automatic dispatch mix-ups. For example:
worker = WorkerOptions(
worker_name="my-sip-agent",
agent_name="outbound-caller",
entrypoint_fnc=entrypoint,
)
2. Match agent name in dispatch rules: Double-check that the agent_name in your dispatch rules exactly matches what you’ve defined in your agent code. You can easily manage this via the CLI or API.
3. Run multiple agent instances: To keep things running smoothly during restarts, it’s a great idea to run several instances of your agent all using the same agent_name.
4. Implement error handling: Adding error callbacks in your agent will help you catch and respond to any dispatch or connection hiccups quickly.
5. Verify dispatch rules: Before handling calls, use the LiveKit API to confirm that your dispatch rules are set up correctly and active.
Following these steps should really help keep your SIP call handling reliable, even when you restart your agent. If you want, I’m here to guide you through any of these steps or answer any questions you might have!
Sources: livekit-protocol/livekit/protocol/sip.py | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | Agents telephony integration | LiveKit Docs | SIP troubleshooting guide | LiveKit Docs | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki