Based on the xlog output, the following doesn't appear to be working - remove_hf("Contact"); append_hf("Contact: $var(newct)\r\n");
I've actually had a similar issue before replacing a hdr so I'm wondering if I'm doing something wrong?
Header manipulation is doesn't update the already parsed message that is being used for $hdr etc. You have to apply the changes with http://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.msg...