important-judge-78504
03/27/2026, 5:28 PMtall-airline-16756
03/27/2026, 5:29 PMtall-airline-16756
03/27/2026, 5:29 PMAgentSession.start().
Yes — an inbound call is considered "picked up" when AgentSession.start() is called. Calling start() moves the session from initializing into the starting/running lifecycle: it connects the agent to the room, sets up I/O (audio/video) forwarding, and begins processing user input — in other words, the agent is actively listening and interacting with the caller once AgentSession.start() runs.
If you need, I can:
• Walk through the exact sequence of lifecycle states (Initializing → Starting → Running) and which actions happen in each.
• Show a short code example of calling AgentSession.start() and handling the post-start events you can listen to. Which would be more helpful? Sources: Agent session | LiveKit Documentation, with interactive elementsimportant-judge-78504
03/27/2026, 5:30 PMtall-airline-16756
03/27/2026, 5:30 PMAgentSession.start() or otherwise answers the SIP leg as soon as the inbound call arrives.
◦ As soon as the session becomes active, have that bot call the SIP transfer API (for example, transfer_sip_participant / SIP REFER) to redirect the call. The bot can then drop or remain silent so no human agent ever interacts with the caller.
◦ This effectively simulates a pre-answer transfer by answering and immediately performing the transfer.
• Handle the redirect at the SIP/provider level before LiveKit
◦ Configure your SIP provider (Twilio, Telnyx, etc.) to perform routing/forwarding rules so the call is redirected before it ever reaches LiveKit. This avoids answering in LiveKit entirely.
◦ Use your provider’s call-control features (e.g., Twilio’s call forwarding/redirect or SIP REFER prior to LiveKit) to achieve immediate transfers.
If you’d like, I can help with either approach:
• For the bot option I can outline the minimal sequence of calls/events and a small code snippet showing where to call AgentSession.start() and then transfer_sip_participant.
• For the SIP/provider route I can list the provider features to look for and typical configuration patterns.
Which approach would you prefer to explore first?
Sources: SIP Lifecycle Management Agent | LiveKit Documentation | Company directory phone assistant | LiveKit Documentation | Agents telephony integration | LiveKit Documentation | Handling payments with PCI compliance | LiveKit | Preserve caller ID during SIP transfers with Twilio | LiveKit, with interactive elementsimportant-judge-78504
03/27/2026, 5:34 PMtall-airline-16756
03/27/2026, 5:35 PMtransfer_sip_participant) operate on an active session, not on a ringing leg.
Workarounds you can use:
• Auto-answer with a lightweight bot
◦ Have a minimal automated participant answer the call (call AgentSession.start() or otherwise accept the SIP leg).
◦ Immediately call the transfer API to redirect the call, then drop or stay silent. This gives the effect of an immediate transfer without a human agent interacting.
• Handle the redirect at the SIP provider
◦ Configure routing/forwarding rules in your SIP provider (Twilio, Telnyx, etc.) so the call is redirected before it ever reaches LiveKit. This avoids answering in LiveKit entirely.
If you want, I can:
• Provide a short code sketch for the bot approach showing where to start the session and invoke the transfer.
• Outline the specific provider-side features and settings to look for (for common providers like Twilio or Telnyx).
Which option would you like to explore?
, with interactive elementsimportant-judge-78504
03/27/2026, 5:41 PMtall-airline-16756
03/27/2026, 5:41 PMrequest_fnc) so the call keeps ringing. Short answer: you cannot.
Why: transfer operations require an active/answered session. LiveKit’s transfer APIs (SIP REFER / transfer_sip_participant) operate on a connected call, not a ringing leg. Programmatic hooks that run while the call is still ringing (such as request handlers) cannot perform a transfer that keeps the call in ringing — the call must be answered first.
Practical alternatives you can use:
• Auto-answer with a lightweight bot
◦ Have a minimal automatic participant answer immediately (AgentSession.start() or equivalent), then invoke the transfer API right away. The bot can then drop or stay silent so no human interacts with the caller.
◦ This effectively simulates an immediate transfer while keeping the caller experience seamless.
• Redirect at the SIP/provider level
◦ Configure your SIP provider (Twilio, Telnyx, etc.) to route or forward the call before it reaches LiveKit. Provider-side call-control can redirect calls prior to LiveKit receiving the ringing leg.
I can help with next steps:
• Provide a short code sketch showing the minimal bot flow (answer → call transfer_sip_participant → exit).
• Outline the provider-side features and typical setup for common providers (Twilio/Telnyx) that let you redirect before LiveKit.
Which would be most helpful for you?
, with interactive elements