Inbound SIP Diversion header not visible in webhook custom_sip_headers

Hi everyone,

We are using Retell AI with a custom SIP trunk from peoplefone / PLFON.

Inbound calls to Retell work correctly. Call transfer also works in one configuration.

The issue is with forwarded inbound calls.

Scenario:
Caller +48XXXXXXXXX calls an Orange mobile number +48YYYYYYYYY.
That Orange number has unconditional call forwarding to our peoplefone / Retell number +48739104349.
Retell answers the call.

Our SIP provider confirmed that they send the following header in the INVITE to Retell:

Diversion: sip:48YYYYYYYYY@85.194.242.49;reason=unconditional

However, in the Retell call_analyzed webhook we only receive:

custom_sip_headers: {
“x-lk-call-info”: “…”,
“x-lk-real-ip”: “…”,
“x-lk-transport”: “tcp”
}

We do not see the Diversion header in the webhook.

Questions:

  1. Does Retell expose inbound SIP Diversion headers anywhere?
  2. Should Diversion appear in call.custom_sip_headers?
  3. Does Retell only expose X-* SIP headers?
  4. Has anyone solved this by asking the SIP provider to copy Diversion into X-Original-Called-Number or X-Diversion?

We need to identify which real estate agent’s phone number forwarded the call to the AI agent.

Hey @contact6 can you share any relevant Call ID and Agent ID ?

Thank You