async def call_transfer(_context_: RunContext[Tool...
# ask-ai
r
async def call_transfer(_context_: RunContext[ToolState]) -> Dict[str, Any]: How to get the session history for call transfer ? This is function call called by function calling
t
Thanks for reaching out, pritesh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! If you’re looking to get the session history for call transfers, here are a couple of ways you can do it: • Analytics API for Call Transfer Metadata: You can tap into the Analytics API to grab SIP call details, including transfer metadata like timestamps, target, and status. This is especially handy for cold transfers where only the metadata sticks around. • Conversation History for Warm Transfers: For warm transfers, the entire conversation history stays intact and you can access it through the
session.history
property in your agent logic. This way, you can smoothly pass along context to the next agent during the transfer. If you want to dive deeper or need a hand with setting this up, just give me a shout—I’m here to help! Sources: Transferring calls | LiveKit Docs | examples/warm-transfer/warm_transfer.py | livekit-protocol/livekit/protocol/sip.pyi | Analytics API | LiveKit Docs | Workflows | LiveKit Docs