This error message looks a bit odd. Can you check that you are doing everything correct in your cfg regarding the handling of the INVITE? Maybe there is another error in the cfg?
`CRITICAL: {Thu Nov 3 12:42:58 2022 1 17733 INVITE 9326c0d2-2653-4041-8977-eecf1827a79c} [core/msg_translator.c:494]: lump_check_opt(): null send socket`
Regarding the order of the headers in the SIP message, this is usually not a problem as they can be sorted differently.