Sip header passing variables

Continuing the discussion from How to pass variables via Trunks or header?:

Hello Marco,
What you are describing is exactly what I am doing but I get empty value in asterisk 2 for variable.
Is there any configuration parameter I could be missing?
Could telecom provider be removing extra header items ?
Any other idea?

Have you tried capturing the SIP packets to see if the header is present?

John,
Thanks for your suggestion. After further research, it appears that sip headers can only be transmitted between sip end to end connections. Even though in my case both lines are sip lines, the call transits through ‘normal’ lines and therefore sip header info gets lost in between. The sip header only contains the info my telco will provide i.e. the usual headers.

Could you do an IAX2 trunk between the two servers and pass calls over it?

As I understood it, he is saying that the SIP only goes as far as a PSTN gateway type device.