Proxies are absolutely not to alter the To and From header. If A sends a request to B through proxy P, and P alters its To or From headers, those get copied into responses and in-dialog requests from B back to A.
A is well within its rights to say, "That's not my To header!"
Kamailio nevertheless has that capability:
https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.f.uac_replace_t...
It is done in a "clever" way that allows it to conceal the fact that it has been altered from A by restoring it to the original value in any messages destined for A. You can learn more about that in the module documentation, e.g.
https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.p.restore_mode
-- Alex
On Thu, Jun 21, 2018 at 10:57:54PM +0300, Igor Olhovskiy wrote:
Why proxy cannot alter To header?
Regards, Igor 21 июня 2018 г., 19:22 +0300, Kevin Olbrich ko@sv01.de, писал:
Hi!
I set up a proxy in front of an asterisk server to handle registration and similar.
This setup needs topology hiding. I enabled and configured TOPOH which is working well. The only header which leaks network details is "To". It lists the proxys internal IP.
Sure, a proxy should not alter the To and I am investigating if this can be changed in asterisk but is it even possible?
Kind regards Kevin _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users