Dynamic var in transfer header

Hi,

at this page

https://docs.retellai.com/build/telephony/sip-headers

i see:

Set custom SIP headers for call transfers

For call transfers, you can also add custom SIP headers as needed. It must starts with X-. You can use dynamic variable for your custom SIP header value, so you can pass information extracted from the call to the receiving party.

But if i put a dynamic variable

On my kamailio i receive this header

In invite i see

X-AI-Tenant: {{tenant}}
X-RetellAI-CallId: call_9011212d0e6f70381ecd398881a
X-RetellAI-Direction: Outbound
X-RetellAI-OrgId: org_5HhYDsRXr8uFFbfx
Max-Forwards: 69
P-Hint: outbound

Dynamic variables work in Transfer To field but not in custom header…

Transfer is set with invite, tenant is set by my mcp server and i see it in Retellai logs.

Can you help me?

Based on the documentation, you can use dynamic variables for custom SIP header values in call transfers(1). The custom SIP headers must start with X-(1)(2).

For call transfers, you can add custom SIP headers and use dynamic variables for the header values to pass information extracted from the call to the receiving party(1). When configuring the Call Transfer Node, you can add custom SIP headers for outbound calls, and all header names must start with X-(2).

However, there are known limitations with custom SIP headers in transfers. For cold transfer with transferee number using SIP REFER, different telephony providers may or may not honor the custom SIP headers in the REFER request(1). The documentation specifically notes that Twilio does not honor 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(1).

Based on community discussions, there have been reported issues with custom SIP headers not properly substituting dynamic variables in transfer scenarios(3). One user reported that custom SIP headers were appearing in the parent call’s end call webhook response instead of the forwarded call’s response, and the dynamic variable substitution was not working as expected(3).

If you’re experiencing issues with dynamic variable substitution in custom SIP headers during transfers, this may be related to:

  1. The type of transfer you’re using (cold vs warm)(2)
  2. Your telephony provider’s support for custom SIP headers in SIP REFER requests(1)
  3. Potential issues with dynamic variable substitution in custom SIP headers during transfers(3)

For basic call transfers to local numbers, you don’t necessarily need custom SIP headers - as long as the SIP trunk has outbound calling enabled and the destination number is in E.164 format, the transfer should work(4). Custom SIP headers are primarily needed when passing extra metadata to another SIP system(4).

I recommend checking whether you’re using warm or cold transfer, and verifying your telephony provider’s support for custom SIP headers in transfer scenarios.

I use cold transfer, and i have a sip trunk to my kamailio sbc. I see inbound invite with X-AI-Tenant: {{tenant}} , substitution of dynamic variables not work on custom header… I have set custo header name X-AI-Tenant value {{tenant}}