Hello,

are you executing record_route()? Do you get any errors in the logs?

Cheers,
Daniel

On 16.02.23 23:45, E. Schmidbauer wrote:
Hi Patrick,
I'm running into a similar issue with `topos`
I have kamailio setup to use 2 interfaces, one for ingress, and one for egress traffic. In this setup, `topos` routing does not work
Were you able to find a solution? 


On Fri, Mar 18, 2022 at 4:34 AM Patrick Karton <patrickarton@hotmail.com> wrote:

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@lists.kamailio.org> de la part de Patrick Karton <patrickarton@hotmail.com>
Envoyé : jeudi 17 mars 2022 19:39
À : Henning Westerholt <hw@gilawa.com>; Kamailio (SER) - Users Mailing List <sr-users@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@gilawa.com>
Envoyé : jeudi 17 mars 2022 17:37
À : Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Cc : Patrick Karton <patrickarton@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

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Patrick Karton
Sent: Wednesday, March 16, 2022 7:28 PM
To: sr-users@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

 

 

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Kamailio Advanced Training - Online - March 27-30, 2023 - www.asipto.com