Don't ask me why anyone would want to do this, but, for simple stateful relay scenario:
UAC --> Kamailio --> UAS
This:
remove_hf("Via"); msg_apply_changes();
will crash Kamailio:
Feb 10 18:54:22 diminuendo-1 /usr/local/sbin/kamailio[30982]: ERROR: tm [t_lookup.c:540]: ERROR: t_lookup_request: no via Feb 10 18:54:22 diminuendo-1 /usr/local/sbin/kamailio[30981]: ALERT: <core> [main.c:741]: child process 30982 exited by a signal 11