Hi,
I am using Kamailio 4.4. I would like to forward the request to a different port number of my endpoint. I have changed the destination URI and the INVITE  correctly reached to the new port. But the To header in the INVITE request has the old port. so the endpoint is not responding to the request. 
Then I tried to remove and replace To header using remove_hf("To") and insert_hf("To: $var(modified_to_header) \r\n"); functions. But the to header not changed. 
So, is there any way to change the To header URI.