https://retellai.com/?utm_source=discord&utm_medium=seo logo
im trying to pass dynamic variables from
# ❓・ai-evy-support
k
@AI Evy im trying to pass dynamic variables from .CSV file (by API), my custom telephony requires raw phone numbers without e164 format, how to pass these dynamic variables while keeping non e164 phone numbers?
a
Thanks for tagging me @Keni. I'll look through relevant sources and get back to you shortly.
### Answer When using custom telephony with non-E.164 formatted phone numbers, you can bypass E.164 validation by setting the
ignore_e164_validation
parameter to
true
in your API call. [(1) ]() Here's how to structure your API request:
Copy code
javascript
{
  "from_number": "your-raw-number",
  "to_number": "raw-phone-number-from-csv",
  "ignore_e164_validation": true,
  "retell_llm_dynamic_variables": {
    "customer_name": "value_from_csv",
    "other_variable": "another_value"
  }
}
The
ignore_e164_validation
parameter allows you to use raw phone numbers without E.164 formatting. This parameter only applies when using custom telephony and does not work with Retell's native telephony. For passing dynamic variables from your CSV file, use the
retell_llm_dynamic_variables
object in your API request. This accepts key-value pairs of strings that inject into your Response Engine prompt and tool description. When making the API call (either via Register Phone Call or Create Phone Call endpoints) , include both the raw phone numbers and your dynamic variables in the same request body. [(2) ]() [(1) ]()
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
it still reads variable names instead of values
@AI Evy it still reads variable names instead of values
a
Thanks for the follow-up, @Keni. I'll get back to you soon.
### Answer When dynamic variables show as variable names instead of values, this typically indicates the structure of your API request needs adjustment. [(1) ]() For custom telephony via the Register Phone Call endpoint, ensure you're structuring your request correctly: [(2) ]()
Copy code
javascript
{
  "agent_id": "your_agent_id",
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe",
    "phone_number": "1234567890"
  }
}
The key issue from similar cases is that when using custom telephony, you may need to structure the dynamic variables differently. Based on a community report, the fix was to use: [(1) ]()
Copy code
javascript
{
  "call_inbound": {
    "dynamic_variables": {
      "caller_name": "actual_value_here"
    }
  }
}
However, the official structure for the Register Phone Call endpoint uses
retell_llm_dynamic_variables
directly in the request body. [(2) ]() Troubleshooting steps: 1. Verify your CSV values are being correctly parsed and passed as actual values, not as strings containing variable names 2. Check that you're not accidentally passing the variable names as strings (e.g.,
"{{customer_name}}"
instead of the actual value) 3. Test with hardcoded values first to confirm the API structure works before integrating CSV data 4. Review your call logs to see what values are actually being sent in
retell_llm_dynamic_variables
If the issue persists, share a sample of your API request payload (with sensitive data redacted) so we can identify the specific formatting issue.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://discord.com/channels/1186424376300679209/1356680357084135558) [[2] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.