<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
try to apply this setting for topos module.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<pre class="programlisting" style="font-family:monospace;background-color:rgb(252, 255, 252);border:1px solid rgb(153, 204, 204);padding-left:15pt;overflow:auto;border-radius:2.5px;font-size:15px">modparam("topos", "contact_mode", 0)</pre>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
10.10.70.70 does not put the full contact uri in the R-INVITE.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
try put contact_mode to 0 (and not 1 or 2).</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De :</b> sr-users <sr-users-bounces@lists.kamailio.org> de la part de c c <c@netcontrol.fr><br>
<b>Envoyé :</b> lundi 23 mai 2022 08:38<br>
<b>À :</b> sr-users@lists.kamailio.org <sr-users@lists.kamailio.org><br>
<b>Objet :</b> [SR-Users] TOPOS + RE-INVITE problem - Contact IP not updated</font>
<div> </div>
</div>
<div>
<div style="font-family:arial,helvetica,sans-serif; font-size:12pt; color:#000000">
<div>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
It seems that TOPOS is not working properly on RE-INVITE and stop masking IP and contact on some RE-INVITE.</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
When a RE-INVITE is send with Kamailio IP as Request-URI TOPOS is not operating.</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
<br>
</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
Note : we are using the HTABLE trick to rewrite $ru and match the call but we would need to have TOPOS re-evaluating the dialog once done.</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
<br>
</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
We use a standard configuration with 2 modifications.</p>
<ol dir="auto" style="box-sizing:border-box; padding-left:2em; margin-top:0px; margin-bottom:16px; color:#24292f; font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:#ffffff; text-decoration-style:initial; text-decoration-color:initial">
<li style="box-sizing:border-box; margin-left:0px">in route[DISPATCH] to set the HTABLE</li></ol>
<div class="x_snippet-clipboard-content x_notranslate x_position-relative x_overflow-auto" style="box-sizing:border-box; overflow:auto!important; color:#24292f; font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:#ffffff; text-decoration-style:initial; text-decoration-color:initial">
<pre class="x_notranslate" style="box-sizing:border-box; font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace; font-size:11.9px; margin-top:0px; margin-bottom:16px; padding:16px; overflow:auto; line-height:1.45; border-radius:6px"><code style="box-sizing:border-box; font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace; font-size:11.9px; padding:0px; margin:0px; background:transparent; border-radius:6px; word-break:normal; white-space:pre; border:0px; display:inline; overflow:visible; line-height:inherit">if(is_method("INVITE")) {
 $sht(ct=>$ci::$ft) = $sel(contact.uri);
}
</code></pre>
</div>
<ol start="2" dir="auto" style="box-sizing:border-box; padding-left:2em; margin-top:0px; margin-bottom:16px; color:#24292f; font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:#ffffff; text-decoration-style:initial; text-decoration-color:initial">
<li style="box-sizing:border-box; margin-left:0px">in route[WITHINDLG] to find the call if R-URI = myself</li></ol>
<div class="x_snippet-clipboard-content x_notranslate x_position-relative x_overflow-auto" style="box-sizing:border-box; overflow:auto!important; color:#24292f; font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:#ffffff; text-decoration-style:initial; text-decoration-color:initial">
<pre class="x_notranslate" style="box-sizing:border-box; font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace; font-size:11.9px; margin-top:0px; margin-bottom:16px; padding:16px; overflow:auto; line-height:1.45; border-radius:6px"><code style="box-sizing:border-box; font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,'Liberation Mono',monospace; font-size:11.9px; padding:0px; margin:0px; background:transparent; border-radius:6px; word-break:normal; white-space:pre; border:0px; display:inline; overflow:visible; line-height:inherit">if(has_totag() && uri==myself) {
 if($sht(ct=>$ci::$ft) != $null && $T_reply_code > 400) $shtex(ct=>$ci::$ft) = 10 ; 
  if($sht(ct=>$ci::$tt) != $null) {
     $ru = $sht(ct=>$ci::$tt);
     if (is_method("BYE")) $shtex(ct=>$ci::$tt) = 10 ;
     route(RELAY);
  }
}
</code></pre>
</div>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
As you can see in the PCAP the RE-INVITE goes directly to calling stating with the Contact not updated and the 200 OK is also sent to called party with wrong Contact info too.</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
<a href="https://github.com/kamailio/kamailio/files/8730489/topos-issue.zip" data-auth="NotApplicable" style="box-sizing:border-box; background-color:transparent; text-decoration:none"></a></p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
<br>
</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
This behavior breaks the BYE procedure.</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
<br>
</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
Any advice ?</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
<br>
</p>
<p dir="auto" style="box-sizing:border-box; margin:0px; color:rgb(36,41,47); font-size:14px; font-style:normal; font-variant-ligatures:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; background-color:rgb(255,255,255); text-decoration-style:initial; text-decoration-color:initial">
Chris</p>
</div>
</div>
</div>
</body>
</html>