Hi,

 

I’m trying to remove all custom headers starting with X-, except a certain header, but Kamailio won’t start due to an error.

ERROR: <core> [route.c:1154]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:455

 

remove_hf_re("^(?!X-ThisHeaderShouldNotBeRemoved)X-.*")

or

remove_hf_re("^(?!X- ThisHeaderShouldNotBeRemoved)X-")

 

This is valid regex according to https://regex101.com/

 

Any idea’s why this won’t compile?

 

Regards,

 

Grant