Hello,

 

There might be a spelling error below, you probably mean:

 

“$xavu(_tps_=>contact_host) = "2.2.2.2";

And this works fine but obviously sets the contact_host to 2.2.2.2 across both interfaces, I ideally want it to change between 10.10.10.10 and 2.2.2.2.”

 

Not sure if I understand your question correctly. You could just conditionally set the contact host to the different values, depending on your configuration logic.

 

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 Jonathan Hunter
Sent: Friday, December 3, 2021 8:57 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] topos xavu_field_contact_host kamailio 5.5

 

Hi All,

 

I was wondering if anyone can help, and advise me if I am missing something when using topos in an environment where I have more than one interface for kamailio.

 

Essentially I would like to set the contact_host to 2 different values depending on the flow of the SIP requests, as we have a private LAN interconnect for example 10.10.10.10, and a public interconnect using 2.2.2.2 (for example).

 

I notice there is xavu for A-side contact and B-side contact, but what about just the contact host?

 

As I have set for example;

 

modparam("topos", "xavu_cfg", "_tps_")

modparam("topos", "xavu_field_contact_host", "contact_host")

...

    $xavu(_tps_=>contact_host) = "2.2.2.2";

 

And this works fine but obviously sets the contact_host to 8.8.8.8 across both interfaces, I ideally want it to change between 10.10.10.10 and 2.2.2.2.

 

How can I set more than one contact_host $xavu that topos can use? As my understanding is you can only set $xavu once, so is there another way to manipulate the contact_host on requests coming in and out on different interfaces?  I assume I am missing something? :)

 

Thanks in advance

 

Jon

 

Sent from Mail for Windows