glamorous-art-2631
07/05/2025, 9:57 PMtall-airline-16756
07/05/2025, 9:57 PMtall-airline-16756
07/05/2025, 9:57 PMmetadata = json.loads(ctx.job.metadata)
user_name = metadata["user_name"]
• Using participant attributes: Once the user is connected, you can access participant attributes to get relevant details. For example: call_status = participant.attributes.get("sip.callStatus")
• Sending user-specific data: Ensure that user-specific data is sent in the job metadata, room metadata, or participant attributes. This data can then be used to identify the user.
• Loading additional user information: Optionally, you can load more user details from your own database based on the identifier retrieved.
These methods should help you extend the MCP starter example to identify the user calling the agent.
Sources: Handling RAG Delays in Voice Agents | LiveKit Docs | Making calls using SIP | LiveKit Docs