https://retellai.com/?utm_source=discord&utm_medium=seo logo
How do you set a dynamic value for Custom SIP Head...
# ❓・ai-evy-support
j
@AI Evy How do you set a dynamic value for Custom SIP Headers on a Call Transfer? For instance, use the dynamic variable {first_name}
a
Thanks for tagging me @Jeremy. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Set & parse custom SIP headers](https://docs.retellai.com/build/telephony/sip-headers) ​
### Answer You can use dynamic variables for custom SIP header values in call transfers. [(1) ]() For call transfers, custom SIP headers must start with
X-
. You can use dynamic variable syntax for your custom SIP header value, so you can pass information extracted from the call to the receiving party. For example, in your transfer node configuration, you would set a custom SIP header like: - **Header name**:
X-First-Name
- **Header value**:
{{first_name}}
For detailed configuration: - If you're using Conversation Flow agents, see the [call transfer node]() documentation. - If you're using Single/Multi-prompt agents, see the [call transfer function]() documentation. **Important limitation**: For cold transfers with transferee number, different telephony providers may or may not honor custom SIP headers in the REFER request. Twilio, for example, does not honor custom SIP headers in the REFER request, so SIP headers set in the transfer call tool will not work for cold transfer with transferee number when using Twilio.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy I tried that and the header value literally shows "{{first_name}}" and not the extracted value
a
Thanks for the follow-up, @Jeremy. I'll get back to you soon.
### Answer If the dynamic variable
{{first_name}}
is showing literally instead of being substituted, there are a few things to check: 1. **Ensure the variable is properly defined and populated**: Dynamic variables must be set either via
retell_llm_dynamic_variables
when creating the call, through the inbound call webhook, or collected during the conversation. [(1) ]() 2. **Check variable naming**: The spaces around the variable name will be trimmed when evaluating the variable, but make sure the variable name matches exactly (case-sensitive) what was defined. 3. **Verify the variable exists at transfer time**: If a dynamic variable has no assigned value, it remains in its raw form with the curly braces intact. To check if a variable is set in conversation flow conditions, you can use:
Copy code
Equation: {{first_name}} exists
Result: True if variable is set
If the variable isn't being set properly before the transfer occurs, you'll see the literal
{{first_name}}
text. You may want to confirm that
first_name
is either: - Passed in via
retell_llm_dynamic_variables
at call creation - Set via inbound call webhook - Collected and stored as a dynamic variable during the conversation flow Would you like help troubleshooting how the variable is being set in your specific flow?
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.