<div dir="ltr"><div>Hi Jonathan,</div><div><br></div><div>Were you able to solve this problem? I'm running Kamailio in docker and need to write a different contact in each direction based on the flow - i.e the contact in the leg to the end device should be the external address, but the leg to another back end running in docker should be the internal address.</div><div><br></div><div>You mentioned previously fixing something like this with hash tables, I'm assuming you're rewriting the contact before sending, storing the original into a hash table and then over-writing any response and calling msg_apply_changes before the TOPOS processing?<br><br></div><div>Thanks</div><div>Matthew<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 3, 2021 at 9:44 PM Jonathan Hunter <<a href="mailto:hunterj91@hotmail.com">hunterj91@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div style="overflow-wrap: break-word;" lang="EN-GB">
<div class="gmail-m_-383077279431204352WordSection1">
<p class="MsoNormal">Hi Karsten,</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Ok cool thanks for that I am testing now. </p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I also have the fun on a NAT’d interface so I am playing with setting advertised address as well!</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Makes sense thank you for the reply.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="border:medium none;padding:0cm"><b>From: </b><a href="mailto:khorsmann@gmail.com" target="_blank">Karsten Horsmann</a><br>
<b>Sent: </b>03 December 2021 21:13<br>
<b>To: </b><a href="mailto:sr-users@lists.kamailio.org" target="_blank">Kamailio (SER) - Users Mailing List</a><br>
<b>Subject: </b>Re: [SR-Users] topos xavu_field_contact_host kamailio 5.5</p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Jonathan, <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I placed a new route and set the user part <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p>$xavu(_tps_=>a_contact) = "sbc_a";                $xavu(_tps_=>b_contact) = "sbc_b";     
<span style="color:rgb(153,153,153)">           </span></p>
<p>And for special cases I set the to user part to the To user for some silly pbx boxes.</p>
<div>
<p class="MsoNormal">Can also be that in this mode without setting a/b_contact the normal contact user part passes through, didn't test that. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Kind regards <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Karsten Horsmann <u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Jonathan Hunter <<a href="mailto:hunterj91@hotmail.com" target="_blank">hunterj91@hotmail.com</a>> schrieb am Fr., 3. Dez. 2021, 20:03:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Hi Karsten,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thank you for your reply.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thats interesting I will test it, so I see in the documentation it states;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<div>
<div style="border:1pt solid rgb(153,204,204);padding:0cm 0cm 0cm 15pt">
<pre style="background:rgb(252,255,252) none repeat scroll 0% 0%"><span style="font-size:11.5pt;color:black">$xavu(_tps_=>a_contact) = "...";</span></pre>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal">In your case what did you enter so that it just sets the user part?
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I assume I could just set it to $sel(contact.uri.user) for example and it would then add that and the appropriate listen/ socket value ?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Many thanks!</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal">Sent from
<a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244288948%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=VSgYRMddRbDW2G33ooYGms%2B3Hk8Cqq%2Bd%2B2DhWZk2s3o%3D&reserved=0" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal"> </p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>From:
</b><a href="mailto:khorsmann@gmail.com" target="_blank">Karsten Horsmann</a><br>
<b>Sent: </b>03 December 2021 18:49<br>
<b>To: </b><a href="mailto:sr-users@lists.kamailio.org" target="_blank">Kamailio (SER) - Users Mailing List</a><br>
<b>Subject: </b>Re: [SR-Users] topos xavu_field_contact_host kamailio 5.5</p>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal">Hi Jonathan, </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I use topos in mode 2 (rewrite user part) </p>
</div>
<div>
<p class="MsoNormal">and then it sets the domain part to the listen / socket value AFAIK if you only set user part and did not specify the contact host. </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal">#!ifdef WITH_TOPOS</p>
</div>
<div>
<p class="MsoNormal">modparam("topos", "storage", "redis")</p>
</div>
<div>
<p class="MsoNormal">modparam("topos_redis", "serverid", "CFG_REDIS_NAME")</p>
</div>
<div>
<p class="MsoNormal">modparam("topos", "branch_expire", 14400)     modparam("topos", "dialog_expire", 14400)</p>
</div>
<div>
<p class="MsoNormal">modparam("topos", "clean_interval", 60)</p>
</div>
<div>
<p class="MsoNormal">#!ifdef WITH_TOPOS_CONTACT                    modparam("topos", "contact_mode", 2)</p>
</div>
<div>
<p class="MsoNormal">modparam("topos", "xavu_cfg", "_tps_")        modparam("topos", "xavu_field_contact_host", "contact_host")                                modparam("topos", "xavu_field_a_contact",
 "a_contact")</p>
</div>
<div>
<p class="MsoNormal">modparam("topos", "xavu_field_b_contact", "b_contact")</p>
</div>
<div>
<p class="MsoNormal">#!endif</p>
</div>
<div>
<p class="MsoNormal">#!endif</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal">Jonathan Hunter <<a href="mailto:hunterj91@hotmail.com" target="_blank">hunterj91@hotmail.com</a>> schrieb am Fr., 3. Dez. 2021, 10:50:</p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal">Hello Henning,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Ok appreciate the confirmation, could this be a possible option moving forwards with the module?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">In the meantime I assume other approach is hash tables as I have done before?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks again appreciate your response.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Sent from
<a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244298942%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=RhHREw2f0afQZCS24A0%2BrIDshbsVO7%2F%2FFDb0e27MJNc%3D&reserved=0" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal"> </p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>From:
</b><a href="mailto:hw@gilawa.com" target="_blank">Henning Westerholt</a><br>
<b>Sent: </b>03 December 2021 09:36<br>
<b>To: </b><a href="mailto:sr-users@lists.kamailio.org" target="_blank">Kamailio (SER) - Users Mailing List</a><br>
<b>Cc: </b><a href="mailto:hunterj91@hotmail.com" target="_blank">Jonathan Hunter</a><br>
<b>Subject: </b>RE: topos xavu_field_contact_host kamailio 5.5</p>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Hello Jonathan,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I see, so you want basically configure different contact addresses for A-side and B-side of the call.</p>
<p class="MsoNormal">This is probably not supported from topos right now, its only possible for the user name.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Cheers,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Henning</p>
<p class="MsoNormal"> </p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt">
<b><span lang="DE">From:</span></b><span lang="DE"> Jonathan Hunter <<a href="mailto:hunterj91@hotmail.com" target="_blank">hunterj91@hotmail.com</a>>
<br>
<b>Sent:</b> Friday, December 3, 2021 10:07 AM<br>
<b>To:</b> Henning Westerholt <<a href="mailto:hw@gilawa.com" target="_blank">hw@gilawa.com</a>>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> RE: topos xavu_field_contact_host kamailio 5.5</span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="DE"> </span></p>
<p class="MsoNormal" style="margin-left:35.4pt">
Hello Henning,</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Yes your comments make perfect sense.</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Essentially I want to change the contact in-dialog as essentially the initial INVITE comes in on a private interface from the carrier, and then goes out on a public interface to the subscriber, so the subscriber only see’s public IP address in the SIP contact
 host and responds to it, and the carrier only see’s the private IP address in the contact host so they respond to the appropriate IP address, so its topology hiding IP addresses across interfaces.</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
I have done a similar thing with hash tables before and using record_route_preset but was hoping I could do a similar thing with  topos and leave it to manage the dialog.</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Does that make sense?</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Jon</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Sent from <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244308936%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=tJSVPwkY2c8txXhDih8ut%2FmbhBAWdATpU2Rj%2Be0MpiY%3D&reserved=0" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt">
<b>From: </b><a href="mailto:hw@gilawa.com" target="_blank">Henning Westerholt</a><br>
<b>Sent: </b>03 December 2021 08:55<br>
<b>To: </b><a href="mailto:sr-users@lists.kamailio.org" target="_blank">Kamailio (SER) - Users Mailing List</a><br>
<b>Cc: </b><a href="mailto:hunterj91@hotmail.com" target="_blank">Jonathan Hunter</a><br>
<b>Subject: </b>RE: topos xavu_field_contact_host kamailio 5.5</p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="DE">Hello Jonathan,</span></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="DE"> </span></p>
<p class="MsoNormal" style="margin-left:35.4pt">
Usually, you want to set the appropriate contact host in the initial INVITE and then the dialog stays “with” this contact. This can be done by just setting the xavp and is the way the topology module usually works.</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Maybe you can elaborate why you want to change the contact in-dialog, or even in one transaction (onreply_route example below).</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Cheers,</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Henning</p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">
-- </p>
<p class="MsoNormal" style="margin-left:35.4pt">
Henning Westerholt – <span lang="DE"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244318939%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zL12E1LFL1L47la7gW%2BxV4WD9dBLMndluQbggl75jF8%3D&reserved=0" target="_blank"><span style="color:rgb(5,99,193)" lang="EN-GB">https://skalatan.de/blog/</span></a></span></p>
<p class="MsoNormal" style="margin-left:35.4pt">
Kamailio services – <span lang="DE"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244318939%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8hy0SYQIprCvSJ6GJBI25oW%2BrJV7boJZvmNZ9VVYjfo%3D&reserved=0" target="_blank"><span style="color:rgb(5,99,193)" lang="EN-GB">https://gilawa.com</span></a></span></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt">
<b><span lang="DE">From:</span></b><span lang="DE"> Jonathan Hunter <<a href="mailto:hunterj91@hotmail.com" target="_blank">hunterj91@hotmail.com</a>>
<br>
<b>Sent:</b> Friday, December 3, 2021 9:28 AM<br>
<b>To:</b> Henning Westerholt <<a href="mailto:hw@gilawa.com" target="_blank">hw@gilawa.com</a>>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> RE: topos xavu_field_contact_host kamailio 5.5</span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:70.8pt">
<span lang="DE"> </span></p>
<p class="MsoNormal" style="margin-left:70.8pt">
HI Henning,</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Yes sorry late night <span style="font-family:"Segoe UI Emoji",sans-serif">😊</span> and thank you for reply.</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Yes I conditionally want to set it, I have tried this but not sure it has worked to this point hence why I am wondering if I am missing something.</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Say for example I have request coming in from carrier on 10.10.10.10 interface and want to route to subscriber who is registered, so flow is simple its just;</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Carrier-<span style="font-family:Wingdings">à</span>kamailio<span style="font-family:Wingdings">à</span>subscriber</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
On branch route out I have set the contact_host to a particular IP address, however on_reply I want to change it again to another IP address, can I do that using the $xavu ?
</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
So branch sees contact host as one IP address, and onreply I change it to another IP.</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
As currently if I set the Host it stays the same on both sides.</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Does that make sense?</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Jon</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Sent from <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244328925%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CsYreC40U8IEaLgBctQ7G76W7%2B%2B1hp%2B2eCraxAwBeBA%3D&reserved=0" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt">
<b>From: </b><a href="mailto:hw@gilawa.com" target="_blank">Henning Westerholt</a><br>
<b>Sent: </b>03 December 2021 08:08<br>
<b>To: </b><a href="mailto:sr-users@lists.kamailio.org" target="_blank">Kamailio (SER) - Users Mailing List</a><br>
<b>Cc: </b><a href="mailto:hunterj91@hotmail.com" target="_blank">Jonathan Hunter</a><br>
<b>Subject: </b>RE: topos xavu_field_contact_host kamailio 5.5</p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
<span lang="DE">Hello,</span></p>
<p class="MsoNormal" style="margin-left:70.8pt">
<span lang="DE"> </span></p>
<p class="MsoNormal" style="margin-left:70.8pt">
There might be a spelling error below, you probably mean:</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
“$xavu(_tps_=>contact_host) = "2.2.2.2";</p>
<p class="MsoNormal" style="margin-left:70.8pt">
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.”</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
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.</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Cheers,</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Henning</p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
-- </p>
<p class="MsoNormal" style="margin-left:70.8pt">
Henning Westerholt – <span lang="DE"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244328925%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3vfjRGNKrG35hDG6gclcT3wGk61TBel9WwfjxyAuoJM%3D&reserved=0" target="_blank"><span style="color:rgb(5,99,193)" lang="EN-GB">https://skalatan.de/blog/</span></a></span></p>
<p class="MsoNormal" style="margin-left:70.8pt">
Kamailio services – <span lang="DE"><a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244338917%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6GvBmG1FTlHJsVgLumVxlZZpMHdgFds0Db425k3lzvE%3D&reserved=0" target="_blank"><span style="color:rgb(5,99,193)" lang="EN-GB">https://gilawa.com</span></a></span></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:106.2pt">
<b><span lang="DE">From:</span></b><span lang="DE"> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Jonathan Hunter<br>
<b>Sent:</b> Friday, December 3, 2021 8:57 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> [SR-Users] topos xavu_field_contact_host kamailio 5.5</span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:106.2pt">
<span lang="DE"> </span></p>
<p class="MsoNormal" style="margin-left:106.2pt">
Hi All,</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
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.</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
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).</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
I notice there is xavu for A-side contact and B-side contact, but what about just the contact host?</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
As I have set for example;</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
modparam("topos", "xavu_cfg", "_tps_")</p>
<p class="MsoNormal" style="margin-left:106.2pt">
modparam("topos", "xavu_field_contact_host", "contact_host")</p>
<p class="MsoNormal" style="margin-left:106.2pt">
...</p>
<p class="MsoNormal" style="margin-left:106.2pt">
    $xavu(_tps_=>contact_host) = "2.2.2.2";</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
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.</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
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?
 :)</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
Thanks in advance </p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
Jon</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:106.2pt">
Sent from <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244348915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=HTJGIXZyJBZu%2BqM7TcmWwN0WL%2B5y%2BA145WssJ9x506o%3D&reserved=0" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal" style="margin-left:106.2pt">
 </p>
<p class="MsoNormal" style="margin-left:70.8pt">
 </p>
<p class="MsoNormal" style="margin-left:35.4pt">
 </p>
<p class="MsoNormal"> </p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-left:4.8pt">
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244348915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vqUfCMJU8%2B9Bvm%2B%2FsOWa6LU58WvO1b%2FpRc3y0XeePEU%3D&reserved=0" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></p>
<p class="MsoNormal"> </p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-left:4.8pt">__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=04%7C01%7C%7C0a4a663af88843289b5108d9b6a1c8d2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637741628244358904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4ggmdtTBYrvruQJed9h%2FZdc%2BxrSl554xRmq9I8E6JW0%3D&reserved=0" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>