abundant-father-33863
10/30/2025, 10:26 AMtall-airline-16756
10/30/2025, 10:26 AMtall-airline-16756
10/30/2025, 10:27 AMagent_name isn’t set in WorkerOptions. If everything is set up correctly, automatic dispatch should do the trick. Here are some important steps to keep in mind:
• Make sure the agent worker is up and ready to take on jobs.
• Start the agent session before dialing so you don’t miss that initial connection.
• Use the create_sip_participant API to kick off the call and wait for the participant to connect.
If you find automatic dispatch a bit unreliable, no worries! You might want to try explicit dispatch for more control. Just let me know if you’d like me to walk you through either method or help troubleshoot any specific issues you’re facing—I’m here to support you every step of the way.
Sources: Agent dispatch | LiveKit Docs | Agents telephony integration | LiveKit Docs | README.mdsteep-mechanic-38687
10/30/2025, 10:27 AMtall-airline-16756
10/30/2025, 10:28 AMabundant-father-33863
10/30/2025, 10:30 AMtall-airline-16756
10/30/2025, 10:31 AM--agent flag to specify the agent, and include any metadata you need using --job-metadata. For example:
lk token create --room "my-room" --identity "my-participant" --join --agent "test-agent" --job-metadata '{"key":"value"}' --valid-for 1h
1. Next, use this token when creating the participant. For SIP participants, you can run:
lk sip participant create --room "my-room" --identity "sip-participant" --trunk "your-trunk-id" --call "+1234567890" --wait
This way, the agent will be automatically dispatched as soon as the participant joins. If you have any questions or need a hand with this, please don’t hesitate to ask—I’m here to help!
Sources: SIP Integration & Telephony | livekit/livekit_composite | DeepWiki | cmd/lk/sip.go | examples/agent-dispatch/index.ts | examples/agent_dispatch.py