https://retellai.com/?utm_source=discord&utm_medium=seo logo
How can I make the voice agent know the phone numb...
# ❓・ai-evy-support
d
@AI Evy How can I make the voice agent know the phone number of the caller?
a
Thanks for tagging me @dzei. I'll look through relevant sources and get back to you shortly.
### Answer Retell AI automatically provides the caller's phone number through the
{{user_number}}
system variable [(1) ]() . This variable is available by default for phone calls and requires no configuration . To use it in your agent, reference
{{user_number}}
in your prompts . For example, you can include it in your global prompt or first message like:
Copy code
"I see you're calling from {{user_number}}"
For phone calls,
{{user_number}}
represents the user's phone number - specifically the
from_number
for inbound calls or the
to_number
for outbound calls . If you need to pass the caller's phone number to external systems or webhooks, you can also access it through the inbound call webhook, which provides both
from_number
and
to_number
in the payload [(2) ]() . **Testing tip**: To verify the variable is working, you can temporarily set your first message to explicitly state the number, like "Is this your phone number: {{user_number}}?" . This helps confirm the variable is populating correctly before using it in your production prompts.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Caller ID ({{user_number}}) will not register in AI Agent](https://discord.com/channels/1186424376300679209/1387609283322974299) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.