https://retellai.com/?utm_source=discord&utm_medium=seo logo
can I get caller's phone number and use it in a pr...
# ❓・ai-evy-support
m
@AI Evy can I get caller's phone number and use it in a prompt during the call?
a
Thanks for tagging me @Maria. I'll look through relevant sources and get back to you shortly.
### Answer \Yes, you can access the caller's phone number and use it in your prompt during the call. [(1) ]() [(2) ]() When a call is initiated, the call object includes a
from_number
field that contains the caller's phone number in E.164 format. To inject this into your prompt dynamically, use
retell_llm_dynamic_variables
when registering or creating the call. [(1) ]() [(3) ]() For example:
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe"
  }
}
You can add the caller's phone number as a dynamic variable and reference it in your agent's prompt using the variable syntax (e.g.,
{{caller_phone}}
) . For inbound calls specifically, you can use the
inbound_dynamic_variables_webhook_url
to populate dynamic variables that get passed to the Retell LLM, allowing you to access the phone number inside the prompt. [(11) ]()
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] Get Call](https://docs.retellai.com/api-references/get-call) [[3] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.