Can I place a dispatch request for an outbound cal...
# ask-ai
c
Can I place a dispatch request for an outbound call for a specific worker>
t
Thanks for reaching out, Subham. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Absolutely, you can place a dispatch request for an outbound call to a specific worker using explicit agent dispatch. Here’s a simple way to do it: 1. Configure the Agent: Make sure the agent is registered with an
agent_name
so explicit dispatch works smoothly. 2. Create a Dispatch: You can use the LiveKit CLI or Python API to create a dispatch. Just specify the agent name and include the phone number in the metadata. For example: ◦ CLI:
lk dispatch create --new-room --agent-name outbound-caller --metadata '{"phone_number": "+1234567890"}'
◦ Python API: Use
agent_dispatch.create_dispatch()
to create a dispatch programmatically. 1. Place the Outbound Call: When the agent joins the room, it will read the phone number from the metadata and use the
CreateSIPParticipant
API to dial the number. Just make sure you have an outbound SIP trunk configured and all the necessary environment variables set up. If you want, I’m here to help with any part of this! Sources: Making calls using SIP | LiveKit Docs | README.md | Agent dispatch | LiveKit Docs | Agents telephony integration | LiveKit Docs