hans_70884
11/28/2025, 10:44 PMAI Evy
11/28/2025, 10:44 PMAI Evy
11/28/2025, 10:44 PMAI Evy
11/28/2025, 10:45 PM{{user_number}} contains the caller's phone number (the from_number for inbound calls) . You can reference this directly in your prompts, begin messages, or tool configurations using the {{user_number}} syntax .
For the caller's name, you have two approaches:
1. **Fetch from CRM during call start**: Use the Inbound Call Webhook to look up caller details based on {{user_number}} and populate dynamic variables like {{caller_name}} before the conversation begins [(1) ]() [(2) ]() .
2. **Extract during conversation**: If no name is available at call start, use an Extract Dynamic Variable Node to collect the name from the conversation and store it as a dynamic variable [(3) ]() .
For email, you'll need to ask the user directly and extract it during the conversation, as there's no automatic system variable for email addresses [(1) ]() .
Example usage in your prompt:
Hello! I see you're calling from {{user_number}}. May I have your name to better assist you?
The {{user_number}} variable is automatically available for all phone calls and requires no configuration .AI Evy
11/28/2025, 10:45 PMhans_70884
11/28/2025, 10:45 PMAI Evy
11/28/2025, 10:45 PMAI Evy
11/28/2025, 10:46 PM{{user_number}} system variable is already automatically available for all phone calls [(1) ]() .
System default dynamic variables like {{user_number}} are built-in and don't require extraction . They're automatically populated by Retell AI when the call starts .
For inbound calls specifically:
- {{user_number}} contains the caller's phone number (the from_number)
- {{agent_number}} contains your Retell phone number (the to_number)
- {{direction}} will be "inbound"
You can simply reference {{user_number}} directly in your prompts, begin messages, or tool configurations without any extraction setup.
If you still want to store it as a custom dynamic variable, you would use the Extract Dynamic Variable tool with: [(2) ]()
1. **Variable Name**: Something like caller_phone
2. **Description**: "The phone number the user is calling from"
3. **Variable Type**: Text
Then update your prompt to explicitly tell the agent: "Extract the caller's phone number by calling the extract function. The phone number is {{user_number}}."
But again, this is unnecessary since {{user_number}} is already available system-wide [(1) ]() .AI Evy
11/28/2025, 10:46 PMAI Evy
11/28/2025, 10:46 PMhans_70884
11/28/2025, 10:49 PMAI Evy
11/28/2025, 10:49 PMAI Evy
11/28/2025, 10:49 PM{{user_number}} separately since it's already a system variable [(1) ]() . However, if you want to extract and store it as a custom dynamic variable for consistency with your workflow, here's the format:
For Extract Dynamic Variable tool: [(2) ]()
- **Variable Name**: caller_phone
- **Description**: The phone number the user is calling from
- **Variable Type**: Text
Then in your prompt, add:
When the call starts, extract the caller's phone number by calling the extract function. The phone number is {{user_number}}.
To reference it later in your flow: [(1) ]()
- Use {{caller_phone}} anywhere you need the stored value
- Or continue using {{user_number}} directly since it's always available
Example in a prompt:
The caller is reaching out from {{user_number}}. Their contact information is {{caller_phone}}.
Both variables will contain the same phone number - {{user_number}} is the system default, and {{caller_phone}} would be your extracted copy .
For Conversation Flow, you'd create an Extract Dynamic Variable Node with the same settings [(3) ]() :
- Variable Name: caller_phone
- Description: The phone number the user is calling from
- Variable Type: Text
The extracted variable will be stored in collected_dynamic_variables and available throughout the call [(4) ]() [(5) ]() .AI Evy
11/28/2025, 10:49 PMAI Evy
11/28/2025, 10:49 PMAI Evy
11/28/2025, 10:55 PMhans_70884
11/28/2025, 10:55 PMAI Evy
11/28/2025, 10:55 PM4500 / 3500 * base rate
GPT-4.1 also supports a 1M token context window [(2) ]() [(3) ]() [(4) ]() [(5) ]() , which means it can handle very long conversations and maintain context across extended interactions [(5) ]() .
The example extraction setup you described (storing {{user_number}} as caller_phone) would be minimal in token usage—likely under 50 tokens for the extraction instruction and variable storage combined.
**AI Evy
11/28/2025, 10:55 PMAI Evy
11/28/2025, 10:55 PMhans_70884
11/28/2025, 10:56 PMhans_70884
11/28/2025, 10:56 PMAI Evy
11/28/2025, 10:56 PMAI Evy
11/28/2025, 10:57 PM(3616 / 3500) * base rate = approximately 1.03x the base rate [(3) ]() [(4) ]()
Recommendation:
Your current token count is healthy and shouldn't cause issues. You'd only need to optimize if you approach or exceed 8,000 tokens in your prompt configuration [(2) ]() .AI Evy
11/28/2025, 10:57 PMAI Evy
11/28/2025, 10:57 PM