salmon-lighter-12882
07/06/2025, 12:53 PMtall-airline-16756
07/06/2025, 12:54 PMtall-airline-16756
07/06/2025, 12:54 PM# Inside your entrypoint function
participant = await ctx.wait_for_participant()
# Check if the participant is a SIP participant
if participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP:
# Access the caller's phone number
caller_phone_number = participant.attributes['sip.phoneNumber']
<http://logger.info|logger.info>(f"Caller phone number is {caller_phone_number}")
# Add other logic here based on the caller's phone number
This code checks if the participant is a SIP participant and retrieves the phone number using the sip.phoneNumber
key. You can then use this information to customize your agent's behavior.
Sources: SIP participant | LiveKit Docs