some-battery-26875
11/21/2025, 9:04 AMtall-airline-16756
11/21/2025, 9:04 AMtall-airline-16756
11/21/2025, 9:04 AMmetadata (the job metadata).
3. In the agent entrypoint, read ctx.job.metadata, parse the runtime config, and build the AgentSession (STT/LLM/TTS, instructions) dynamically.
4. From the agent, call create_sip_participant (or equivalent) to place the outbound call using the phone number from metadata.
5. Control caller ID either by selecting a trunk configured with the desired number or by passing sip_number in the CreateSIPParticipant request if your trunk supports dynamic numbers.
Key implementation points
• Pass everything needed per-call via job metadata so no agent redeploy is required.
• Parse metadata in the agent and instantiate AgentSession with the provided STT/LLM/TTS settings and Agent(instructions=...).
• Use sip_trunk_id and sip_call_to to place the call; use sip_number or the trunk’s configured number to control caller ID.
• Your HTTP API can call LiveKit’s server SDK/CLI to create the dispatch with metadata.
If you’d like, I can:
• Provide a compact example HTTP POST payload and the exact dispatch CLI/SDK call to send it.
• Show a minimal agent entrypoint snippet that reads metadata and starts the session + SIP participant call.
Which of those would help you next?
Sources: Agent dispatch | LiveKit docs | External data and RAG | LiveKit Docs | Agents telephony integration | LiveKit Docs | SIP outbound trunk | LiveKit docs