https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a way to save from_number as a new variab...
# ❓・ai-evy-support
a
@AI Evy is there a way to save from_number as a new variable name? E.g. at start of call, I need to save the users caller ID or from_number as variable of phone instead.
a
Thanks for tagging me @Aaron. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Discord message from @chiefbeef300_ on 2025-02-12](https://discord.com/channels/1186424376300679209/1186462578310910112/1339044819498041444) ​
### Answer Yes, you can achieve this using the Inbound Call Webhook. [(1) ]() For phone calls, Retell provides the system variable
{{user_number}}
which represents the user's phone number (from_number for inbound calls, to_number for outbound calls) . To save it under a custom variable name like
phone
, you can: 1. Use the Inbound Call Webhook - This webhook receives the
from_number
in its payload, and you can return it as a custom dynamic variable with your preferred name. 2. In your webhook response, return it in the
retell_llm_dynamic_variables
field:
Copy code
json
{
  "phone": "+12137771234"
}
[(2) ]() A community member confirmed this approach works: creating an inbound webhook that reads the
from_number
and returns it as a dynamic variable. [(3) ]() Alternatively, you could reference
{{user_number}}
directly in your prompts and tool configurations, as it's a default system variable available for phone calls. [(1) ]()
a
{{user_number}} and from_number which is best used for inbound calls to get callerID?