SIP_HEADER() behaviour on reINVITE

I’m using SIP_HEADER() to extract a header like X-Cust-Id that’s sent in the initial INVITE. Asterisk then uses that value in the dial plan. The issue i’m seeing is that for some calls where we get a reINVITE very quickly, usually within 1ms from 200 OK, this value seems to be nulled. My theory is that it comes quickly enough that asterisk is using the reinvite instead of the initial invite.

Is SIP_HEADER supposed to use the last reINVITE or the initial INVITE or did i hit a bug here?

Do you have the same issue with PJSIP?

https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/Dialplan_Functions/PJSIP_HEADER/

I could try it out but unfortunately this system is a bit legacy so i can’t easily just swap over to PJSIP.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.