Hello,

try to apply this setting for topos module.
modparam("topos", "contact_mode", 0)

10.10.70.70 does not put the full contact uri in the R-INVITE.

try put contact_mode to 0 (and not 1 or 2).


De : sr-users <sr-users-bounces@lists.kamailio.org> de la part de c c <c@netcontrol.fr>
Envoyé : lundi 23 mai 2022 08:38
À : sr-users@lists.kamailio.org <sr-users@lists.kamailio.org>
Objet : [SR-Users] TOPOS + RE-INVITE problem - Contact IP not updated
 

It seems that TOPOS is not working properly on RE-INVITE and stop masking IP and contact on some RE-INVITE.

When a RE-INVITE is send with Kamailio IP as Request-URI TOPOS is not operating.


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.


We use a standard configuration with 2 modifications.

  1. in route[DISPATCH] to set the HTABLE
if(is_method("INVITE")) {
 $sht(ct=>$ci::$ft) = $sel(contact.uri);
}
  1. in route[WITHINDLG] to find the call if R-URI = myself
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);
  }
}

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.


This behavior breaks the BYE procedure.


Any advice ?


Chris