https://retellai.com/?utm_source=discord&utm_medium=seo logo
How do I pass the call id into the sip header when...
# 💬・general
r
@AI Evy How do I pass the call id into the sip header when transferring call
a
Thanks for tagging me @renovia_70920. I'll look through relevant sources and get back to you shortly.
### Answer You can add custom SIP headers when transferring calls, and you can use dynamic variables for the header values to pass information like the call ID [(1) ]() . For call transfers, you can add custom SIP headers that must start with
X-
. You can use dynamic variables for your custom SIP header value, so you can pass information extracted from the call to the receiving party . To pass the call ID in a SIP header during transfer, you would add a custom header like:
Copy code
json
{ "X-Call-ID": "{{call_id}}" }
[(2) ]() , [(1) ]() However, there's an important limitation to be aware of: for cold transfers with transferee numbers, Retell uses SIP REFER to transfer the call . Different telephony providers may or may not honor the custom SIP headers in the REFER request . For example, Twilio does not honor the custom SIP headers in the REFER request, so the SIP headers you set in the transfer call tool will not work for cold transfer with transferee number when using Twilio . The configuration depends on your agent type: - For Conversation Flow agents, check out the call transfer node for more details - For Single/Multi agent, check out the call transfer function for more details
​ To learn more, see the sources I considered: [[1] Set & parse custom SIP headers](https://docs.retellai.com/build/telephony/sip-headers) [[2] Transfer call](https://docs.retellai.com/build/single-multi-prompt/transfer-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy is {{call_id}} a system variable or do i have to set this manually
a
Thanks for the follow-up, @renovia_70920. I'll get back to you soon.
### Answer
{{call_id}}
is a system variable that's automatically provided by Retell AI - you don't need to set it manually [(1) ]() . According to the documentation,
{{call_id}}
is listed under "Phone Call Variables" as a default system variable with the description "Current call session id" and an example value of
call_12345678906eaa0222bd3dd2a6c
. This variable is only available for phone calls . So when you use
{{call_id}}
in your SIP headers for call transfers, Retell will automatically populate it with the current call's unique identifier without any additional configuration required on your part .
​ 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.
Thanks for the follow-up, @renovia_70920. I'll get back to you soon.
a
### Answer I don't see any code or configuration in your message that I can evaluate. Could you please share the specific code or configuration you're asking about? Based on our previous discussion, if you're asking about using
{{call_id}}
in custom SIP headers for call transfers, then yes - that would work in Retell AI [(1) ]() . You can use dynamic variables like
{{call_id}}
for your custom SIP header values when transferring calls . For example, a custom SIP header configuration like:
Copy code
json
{ "X-Call-ID": "{{call_id}}" }
Would be valid, as
{{call_id}}
is a system variable automatically provided by Retell AI for phone calls. However, remember the limitation that for cold transfers with transferee numbers using SIP REFER, different telephony providers may or may not honor the custom SIP headers - for instance, Twilio does not honor custom SIP headers in REFER requests .
​ To learn more, see the sources I considered: [[1] Set & parse custom SIP headers](https://docs.retellai.com/build/telephony/sip-headers) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy Step-by-Step Guide to Capture "X-Call-ID" SIP Header in Zoom Contact Center To achieve your goal of capturing the "X-Call-ID" SIP header in Zoom Contact Center (ZCC) and storing it in a custom variable (e.g., "Retell_Correlation_ID") for inclusion in webhook events, follow these steps in the ZCC admin portal. Step 1: Create a Custom Variable in ZCC Log in to the ZCC Admin Portal: Navigate to the Zoom Contact Center admin portal at https://[your-subdomain].zoom.us/cc/admin. Sign in with your admin credentials. Access the Variables Section: In the left-hand navigation menu, click Settings (gear icon). Under the Contact Center Management section, select Variables. Create a New Custom Variable: Click the Add Variable button at the top-right corner of the Variables page. In the Name field, enter Retell_Correlation_ID (or your preferred variable name). Ensure the name is unique and descriptive. Set the Type to String, as the "X-Call-ID" is likely a text-based identifier. Optionally, add a Description (e.g., "Stores the X-Call-ID from Retell AI for webhook events"). Ensure the Scope is set to Global or Flow, depending on whether you want this variable accessible across all flows or only within a specific flow. Click Save to create the variable. Step 2: Modify an Inbound Voice Flow to Capture the "X-Call-ID" SIP Header Navigate to Flow Management: In the ZCC admin portal, go to the left-hand navigation menu and click Flows (under Contact Center Management). Select the inbound voice flow you want to modify, or click Add Flow to create a new one. For an existing flow, click its name to open it in the Flow Editor. Open the Flow Editor: In the Flow Editor, you’ll see a visual canvas with widgets representing the flow’s logic. Add a "Set Variable" Widget to Capture the SIP Header: Would this work in Retell?
a
Thanks for the follow-up, @renovia_70920. I'll get back to you soon.
### Answer Yes, Retell AI supports sending custom SIP headers during call transfers [(1) ]() . You can add custom SIP headers that must start with
X-
and you can use dynamic variables for your custom SIP header value to pass information extracted from the call to the receiving party . For your use case with the "X-Call-ID" header, this would work in Retell:
Copy code
json
{
  "X-Call-ID": "{{call_id}}"
}
However, there's an important limitation to be aware of: for cold transfer with transferee number, Retell uses SIP REFER to transfer the call . Different telephony providers may or may not honor the custom SIP headers in the REFER request . For example, Twilio does not honor the custom SIP headers in the REFER request, so the SIP headers you set in transfer call tool will not work for cold transfer with transferee number when using Twilio . The Zoom Contact Center configuration you described is on the receiving end and would be able to capture the "X-Call-ID" SIP header that Retell sends, assuming: 1. Your telephony provider honors custom SIP headers in REFER requests 2. You're not using Twilio for cold transfers with transferee numbers For configuration details: - If you're using Conversation flow agents, check out the call transfer node - If you're using Single/multi agent, check out the call transfer function
​ To learn more, see the sources I considered: [[1] Set & parse custom SIP headers](https://docs.retellai.com/build/telephony/sip-headers) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Thanks for the follow-up, @renovia_70920. I'll get back to you soon.
### Answer I don't see a specific prompt in your message to evaluate. However, I can help you understand how prompts work in Conversation Flow agents [(1) ]() . For Conversation Flow agents, you should structure your prompts differently than single or multi-prompt agents [(2) ]() : - **Global Prompt**: Use this for your agent's overall personality, tone, and universal rules that apply across all nodes [(3) ]() [(2) ]() - **Node Instructions**: Use these for step-by-step logic, specific questions, and node-specific behaviors [(1) ]() [(2) ]() - **Global Nodes**: Use these only for actions available anytime (e.g., "transfer to human") [(2) ]() The global prompt is applied to every node in the conversation flow [(3) ]() , while individual nodes have their own specific instructions [(1) ]() . This provides structured conversations with predictable behavior and fine-grained control over the conversation flow . If you share the specific prompt you're considering, I can provide more targeted guidance on whether it's suitable for a Conversation Flow agent setup.
​ To learn more, see the sources I considered: [[1] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[2] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) [[3] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.