able-jackal-84140
07/06/2025, 5:34 PMtall-airline-16756
07/06/2025, 5:34 PMtall-airline-16756
07/06/2025, 5:34 PMable-jackal-84140
07/06/2025, 5:35 PMtall-airline-16756
07/06/2025, 5:35 PM# Add this after `await ctx.connect()`:
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
if participant.attributes['sip.phoneNumber'] == '+15105550100':
<http://logger.info|logger.info>("Caller phone number is <tel:+1-510-555-0100|+1-510-555-0100>")
# Add other logic here to modify the agent based on the caller's phone number
Isn't this cool? By checking the caller's phone number, you can totally personalize your agent's behavior. It's like having a super smart assistant that knows just what each caller needs. Want to set up some special treatment for specific numbers? This is how you do it! Need any help walking through this? I'm right here to help you out! 🌟 Sources: SIP participant | LiveKit Docs