<p></p>
<p><strong>Description</strong><br>
We use below config to test the topology hiding function,when kamailio receive “update” message,doesn't send out,it will send to itself with destination port 5060;<br>
Sorry for raising this question again,I really don’t know what parameters need to be configured。And after I modified some codes, it could succeed probabilistically...<br>
Sorry again, excuse me</p>
<p><strong>Troubleshooting</strong></p>
<pre><code>loadmodule "ndb_redis.so"
loadmodule "topos_redis.so"
loadmodule "topos.so"
modparam("ndb_redis", "server", "name=srv8;addr=127.0.0.1;port=6381;db=2")
modparam("topos", "storage", "redis")
modparam("topos", "db_url", "redis://127.0.0.1:6381/2")
modparam("topos_redis", "serverid", "srv8")

...Omit the configuration in the middle...

route[WITHINDLG] {
        if (has_totag()) {
        # sequential request withing a dialog should
        # take the path determined by record-routing
                xlog("L_INFO","yang yangyang testin to not here");
                if (loose_route()){
                        if(is_method("INFO")){
                                route("INFO_SELF");
                        }

                        route(BYE);
                        route(REINVITE);
                        route(ACK);
                        route(RELAY);
                } else {
                        if ( is_method("ACK")) {
                                if ( t_check_trans() ) {
                                # no loose-route, but stateful ACK;
                                # must be an ACK after a 487
                                # or e.g. 404            $var(obj) = $sht(call_objects=>$ci);
                                        xlog("L_INFO","Call $ci: ACK received in A-Leg, $fU@$si:$sp -----> $rU@$Ri:$Rp relaying downstreamrouteWITHINDLG\n");
                                        t_relay();
                                        exit;
                                } else {
                                        exit;
                                }
                        }
                        xlog("L_INFO","yang in to not here");
                        sl_send_reply("404","Not here");
                }
                exit;
        }
}



</code></pre>
<hr>
<p>Call flow</p>
<pre><code>UE-----------------PROXY-------------B2bua
invite-------------->|------------------>invite
183<----------------|<------------------183
Prack------------ ->|------------------>Prack
200ok<-------------|<-----------------200ok
update1---------->|
                              |update2<-----------|
                              | 404 not here------->     |                              
</code></pre>
<p><strong>Additional Information</strong></p>
<pre><code>version: kamailio master (x86_64/linux) 

</code></pre>
<h3>Possible Solutions</h3>
<p>I set the log level to debug, and the comparison found that the logic of prack and update is different。After checking the code of topos, it is found that kamailio/src/modules/topos/tps_msg.c has a separate processing for prack.according to<br>
commit <a href="https://github.com/kamailio/kamailio/commit/37830f53b1f21fba5beef5d8e22913c431dcd708">37830f5</a><br>
So I added update to the prack processing method,Later I found that when the B-side update message comes, it should follow the original logic。<br>
So I distinguish whether to follow the modified logic according to ONREPLY_ROUTE。<br>
But after probabilistic success,The problem is that the value returned by get_route_type() is sometimes 1 and sometimes 4<br>
Call flow after modification:</p>
<pre><code>UE-----------------PROXY-------------B2bua
invite-------------->|------------------>invite
183<----------------|<------------------183
Prack------------ ->|------------------>Prack
200ok<-------------|<-----------------200ok
update1---------->|----------------->|update
200ok<-------------|<-----------------200ok
                         |<-----------------|update2
                        | 404 not here---------> |                              
</code></pre>
<p>Here is the code I modified:<br>
/src/modules/topos/tps_msg.c<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/16113837/109925737-107b0580-7cfd-11eb-9eaf-7a66ba224b55.png"><img src="https://user-images.githubusercontent.com/16113837/109925737-107b0580-7cfd-11eb-9eaf-7a66ba224b55.png" alt="image" style="max-width:100%;"></a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2659">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZO3EBQHPFLJBDVVBEDTB42CHANCNFSM4YSW5IWA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNLHNTSI573LS5R6FTTB42CHA5CNFSM4YSW5IWKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MH4P4EA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2659",
"url": "https://github.com/kamailio/kamailio/issues/2659",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>