[SR-Users] enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header

Patrick Karton patrickarton at hotmail.com
Fri Mar 18 09:34:06 CET 2022


Caller <--> (internal_IP) Kamailio (external_IP) <---> Callee


I have this set up of kamailio with 2 interfaces.

i use topos module for topology hiding and what i want to do is to
send  external_IP in Contact Header of request relayed to Callee and internal_IP
in Contact Header of response relayed to Caller.

i noticed that :
when i use topos module with contact_mode to 0
all Record-Route and Caller Via Header are removed and thats great.
but i dont find way to put 2 different  ip addresses in Request and Response Contact Header?

when i use contact_mode to 2 Record-Route and Caller Via Header are not anymore removed thats bad for
topology hiding. And its seems we can not $xavu(_tps_=>contact_host)  parameter of module
to put 2 different  ip addresses in Request and Response Contact Header.


What i want is :
- remove all Record-Route and Caller Via Header for request like when contact_mode to 0
- and put 2 different  ip addresses in Request and Response Contact Header

is it possible to achieve it ?

Thanks.
________________________________
De : sr-users <sr-users-bounces at lists.kamailio.org> de la part de Patrick Karton <patrickarton at hotmail.com>
Envoyé : jeudi 17 mars 2022 19:39
À : Henning Westerholt <hw at gilawa.com>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Objet : Re: [SR-Users] enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header

Thanks For the link.

but i dont know exactly how to make the topos module work!

i have enabled it on my kamailio script but i have some issues.


  *    in the relayed request, received Via is removed and only kamailio Via is left. thats great for topology hiding.

  *   in the relayed request there is no Contact Header. i assume the module removes the received one  and must insert a new one .

loadmodule "db_text.so"
loadmodule "topos.so"


modparam("db_text", "db_mode", 0)
modparam("db_text", "emptystring", 0)
modparam("db_text", "file_buffer_size", 8192)
modparam("db_text", "max_result_rows", 1000)

modparam("topos", "storage", "db")
modparam("topos", "db_url", "text:///home/sbc/database")
modparam("topos", "mask_callid", 0)
modparam("topos", "sanity_checks", 0)
modparam("topos", "contact_host", "127.0.0.1")
modparam("topos", "contact_mode", 0)


########### topos_t file table
id(int,auto) rectime(int,null) x_context(string,null) s_method(string,null) s_cseq(string,null) a_callid(string,null) a_uuid(string,null) b_uuid(string,null) direction(int,null) x_via(string,null) x_vbranch(string,null) x_rr(string,null) y_rr(string,null) s_rr(string,null) x_uri(string,null) a_contact(string,null) b_contact(string,null) as_contact(string,null) bs_contact(string,null) x_tag(string,null) a_tag(string,null) b_tag(string,null) a_srcaddr(string,null) b_srcaddr(string,null) a_socket(string,null) b_socket(string,null)

do i need to insert some records in table or the module does it ?



________________________________
De : Henning Westerholt <hw at gilawa.com>
Envoyé : jeudi 17 mars 2022 17:37
À : Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Cc : Patrick Karton <patrickarton at hotmail.com>
Objet : RE: enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header


Hello,



have a look at this event route: https://kamailio.org/docs/modules/5.5.x/modules/topos.html#topos.e.msg_outgoing



Cheers,



Henning



--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com<https://gilawa.com/>



From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Patrick Karton
Sent: Wednesday, March 16, 2022 7:28 PM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header



Hello ,



im using kamailio with two interfaces external and internal.



i need a way either to :



·         enable topoh hiding only when outgoing interface is external ( mask contact and Via ip only when ougoing interface is external

·         or if it is not possible to enable it only in one direction.i want to know how to configure dynamic(for example in xavp or avp) ip to put in Contact and Via when topoh is enabled.

i see that the 'mask_ip' parameter of topoh module is a string. so we can not set a dynamic value here unfortunately.



Thanks




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220318/00a85435/attachment.htm>


More information about the sr-users mailing list