Missing SIP headers on outbound PJSIP channel

I’m missing the standard headers that are usually available on a PJSIP channel on the outbound leg. I know I have to set any headers I want to manually pass on in the pre-dial context (which I do!) but can’t seem to get access to the Call-ID, the From, the To… basically any of the standard SIP headers on that channel.

I turned on the PJSIP debug and see the packets with said information that corresponds to the outgoing channel but they never seem to get attached to the channel where I can access them. The headers, when accessed either through the pre-dial/pre-bridge context via the Dial command or by a rapid fire polling mechanism I whipped up through the AMI’s GetVar command, are always blank.

Any ideas on how I can get the Call-ID attached to the outgoing channel with PJSIP? I would be very appreciative of any pointers.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Function_CHANNEL

Try with CHANNEL(pjsip,call-id)