Tried to clean it up and rebase on top of current master and fix some code indentation etc.
However, it doesn't seem to work as expected to me.
What works: [x] Hiding Via header
What doesn't: [ ] Contact hiding [ ] No typos key param added to Contact, so the 401 is not rewritten back (regarding Via) and Kamailio doesn't know where to send the response to
@toharish could you please post an example of a REGISTER leaving Kamailio, so we can check what's supposed to be hidden?