SIP Header doesn't link tickets in zendesk

Hello Everyone,

Is there anyone here who has worked on integration with Zendesk (SIP Header → X-Zendesk-Ticket-Id)

Currently, I’m struggling with an issue. I have a very simple bot that only transfers customers toa human agent in Zendesk.

Configuration of transfer call using SIP:
sip:support@domain-zendesk.sip.twilio.com
(transfers work, but I have two tickets that are not linked to each other)

Also, I created a ticket in Zendesk on the call_started event.

{

“subject”: “Call from {{ $(‘Webhook’).item.json.body.call.from_number }}”,

“comment”: {

“body”: “A call has started via Retell AI.\nCaller: {{ $(‘Webhook’).item.json.body.call.from_number }}”

},

“tags”: [“retell”, “voice-ai”, “inbound-call”],

“requester_id”: 44999159080347, (test account)

“via_id”: 34

}

Once the ticket is created, I have ticket_id, which then I link to SIP Header → X-Zendesk-Ticket-Id, which should be included during call transfer to Zendesk. Based on the logs in Call History:

2026-01-02 10:31:30.114 call_a10e6d197a63a94e82bf5c1555c info: custom sip headers { ‘X-Zendesk-Ticket-Id’: ‘4607861’ }

2026-01-02 10:31:30.616 call_a10e6d197a63a94e82bf5c1555c info: transfer call result true

2026-01-02 10:31:30.617 call_a10e6d197a63a94e82bf5c1555c info: Received result for tool: 4a00e51d192a8254 transfer_call

Result: {“status”:“transferred successfully”}

It should work fine. But according to the received information from Zendesk, something is wrong.

What they recommend

  1. Confirm the canonical ticket ID returned by the API when the AI agent creates the ticket — use that exact numeric value.

  2. Ensure the exact numeric ticket ID is added to the SIP header in the SIP request that reaches Zendesk (INVITE/transfer). Example: X‑Zendesk‑Ticket‑Id: 4593001 — no quotes, prefixes, or extra whitespace. (Based on the log above, could you please confirm that such a SIP header is ok: { ‘X-Zendesk-Ticket-Id’: ‘4607861’ } or should it be: { ‘X-Zendesk-Ticket-Id’: 4607861 }

  3. Verify the header is applied before/at the transfer and not altered by any intermediate proxy (e.g., Twilio). Capture the SIP INVITE that reaches Zendesk to confirm the header and value. - My number was bought and defined in Retell. Is there any way to check deeper logs than those shared on public S3? I want to be sure that Twilio hasn’t removed Header.

  4. Check that the SIP request arrives from an IP in the SIP‑IN allowlist so Zendesk will accept and link the header.

  5. If you want, have the AI set the header to the exact create-ticket response immediately after creation (avoid timing/race conditions).

Could you please advise?

Based on the available documentation, I can address several of your questions about custom SIP headers for Zendesk integration:

Custom SIP Header Format

Regarding the format of your SIP header { 'X-Zendesk-Ticket-Id': '4607861' } vs { 'X-Zendesk-Ticket-Id': 4607861 }:

The documentation states that custom SIP headers can be added for call transfers and must start with X-(1)(2). You can use dynamic variables for your custom SIP header value(3). The format you’re using appears correct according to Retell’s requirements.

Known Limitations with Twilio

There’s an important limitation to be aware of: for cold transfer with transferee number using SIP REFER, different telephony providers may or may not honor custom SIP headers in the REFER request(3). Specifically, the documentation explicitly states that “Twilio for example, 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”(3).

Since you’re using a Retell-purchased number and transferring to a SIP URI (sip:support@domain-zendesk.sip.twilio.com), this should be using SIP DIAL rather than SIP REFER, which means the headers should be passed through.

Verification Options

Regarding deeper logs beyond the public S3 logs - the documentation doesn’t mention access to more detailed SIP-level logs that would show the exact INVITE message sent to Twilio/Zendesk. The public log URL is what’s available through the API(4).

Recommendations

Based on the documentation:

  1. Verify you’re using warm transfer rather than cold transfer, as warm transfers use SIP DIAL and are more likely to preserve custom headers(2)
  2. Confirm your custom SIP headers are configured in the Transfer Call Tool or Call Transfer Node(1)(2)
  3. Consider that the issue may be on Twilio’s or Zendesk’s side rather than Retell’s, given that your logs show the header is being set correctly

For additional support with this specific integration issue, you can: