Hi everyone,
I am testing inbound call routing workflows using custom SIP headers. According to the official documentation for the Inbound Call Webhook request payload:
“custom_sip_headers (inbound call only): an object containing custom SIP headers extracted from the inbound INVITE. Only headers whose name starts with X- (case-insensitive), plus the allowlisted headers User-to-User, Diversion, History-Info, and P-Asserted-Identity, are forwarded. Header names are emitted in lowercase.”
However, during active testing via raw SIP INVITE packets there seems to be an issue where these standard allowlisted routing headers are completely dropped before the webhook object is built.
Steps to Reproduce / Test Results:
-
Custom
X-Headers (Success): If I pass a custom header likeX-Contractor-Number: +1234567890, it behaves exactly as documented. It maps cleanly and shows up in the webhook payload normalized to lowercase under"custom_sip_headers": { "x-contractor-number": "+1234567890" }. -
Standard Allowlisted Headers (Failure): If I pass a completely valid, RFC-compliant
Diversionheader targeting a local loopback IP domain to bypass synchronous DNS routing lookup delays (e.g.,Diversion: <``sip:+1234567890@127.0.0.1``>;reason=unconditional), the call executes cleanly and trips the webhook. However, thediversionkey is completely missing from thecustom_sip_headersobject. -
Further Testing: I ran a test sending
User-to-User,History-Info, andP-Asserted-Identitysimultaneously. Just likeDiversion, the call is accepted, but all three standard headers are completely omitted/filtered out of the final JSON payload.
It looks like the ingress proxy layer (Kamailio) handles and parses custom X- strings perfectly, but either drops or strips the standard telecom headers entirely rather than forwarding them down to the application-layer webhook payload as the documentation guarantees.
Has anyone else run into this, or is there a specific URI syntax required to prevent the ingress engine from cleaning out these standard headers?
Thanks!
Tony