how to know which number is receiving the call in ...
# ask-ai
m
how to know which number is receiving the call in inbound agent.
t
Thanks for reaching out, Usama. 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 trying to figure out which number is getting the call in an inbound agent setup, you can check out the
sip.trunkPhoneNumber
attribute. This little gem holds the number that the end user dialed for inbound trunks. Here’s how you can grab that info from the SIP participant's attributes:
Copy code
receiving_number = participant.attributes['sip.trunkPhoneNumber']
And just like that, you’ll have the phone number tied to the SIP trunk that’s receiving the inbound call. Hope that helps! Sources: SIP participant | LiveKit Docs