[OpenSIPS-Users] LOOSE Route and NAT not being fixed

Mike O'Connor mike at oeg.com.au
Sun May 30 09:55:39 CEST 2010


Hi All

Just found in the mailing list history a comment about the onreply
branch needing to have a call to fix_contact().

I've just added this and the problem mentioned in my first email has
been fixed.

Thanks
Mike



On 30/05/10 11:13 AM, Mike O'Connor wrote:
> Hi All
>
> I seem to have broken my loose routing for NAT'd users, but I can not
> see what I have wrong.
>
> Any ideas what I might have wrong ?
>
> Thanks as always.
> Mike
>
>   if (client_nat_test("3")) {
>       fix_contact();
>   }
>
>   xlog("L_INFO", "New request - Request/failure/branch routes: M=$rm
> RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>
>   if (has_totag()) {
>     # sequential request withing a dialog should
>     # take the path determined by record-routing
>     if (loose_route()) {
>       xlog("L_NOTICE", "LOOSEROUTE: $ruri");
>       if (is_method("BYE")) {
>         setflag(1); # do accounting ...
>         setflag(3); # ... even if the transaction fails
>         $avp(s:can_uri) = $ru;
>       } else if (is_method("INVITE")) {
>         # even if in most of the cases is useless, do RR for
>         # re-INVITEs alos, as some buggy clients do change route set
>         # during the dialog.
>         if (client_nat_test("3"))
>           record_route(";nat=yes");
>         else
>           record_route();
>       }
>       # route it out to whatever destination was set by loose_route()
>       # in $du (destination URI).
>       route(ROUTE_DEFAULTHANDLER);
>     } else {
>       if ( is_method("ACK") ) {
>         if ( t_check_trans() ) {
>           # non loose-route, but stateful ACK; must be an ACK after
>           # a 487 or e.g. 404 from upstream server
>           t_relay();
>           exit;
>         } else {
>           # ACK without matching transaction ->
>           # ignore and discard
>           exit;
>         }
>       }
>       sl_send_reply("404","Not here");
>     }
>     exit;
>   }
>
> May 29 22:53:40 ser1 /usr/sbin/opensips[18161]: New request -
> Request/failure/branch routes: M=INVITE RURI=sip:035242499
> 2 at 202.1xx.1xx.195:5060;user=phone F=sip:0407551651 at 202.xx.xx.33:5060
> T=sip:0352424992 at 202.1xx.1xx.195:5060 IP=202.xx.xx.
> 33 ID=13189688682712200051636 at 202.xx.xx.58
> May 29 22:53:40 ser1 /usr/sbin/opensips[18161]: engage_media_proxy:
> sip:0352424992 at 202.1xx.1xx.195:5060;user=phone
> May 29 22:53:40 ser1 /usr/sbin/opensips[18161]: Call Group: 1
> May 29 22:53:40 ser1 /usr/sbin/opensips[18161]: LOOKUPALIAS: Found Local
> Alias for User via sip:500601 at sip.xxxx.net.au
> May 29 22:53:40 ser1 /usr/sbin/opensips[18161]: ONBRANCH:
> sip:500601 at 118.2xx.2xx.250:5060
> May 29 22:53:41 ser1 /usr/sbin/opensips[18162]: ONREPLY: 100
> May 29 22:53:41 ser1 /usr/sbin/opensips[18159]: ONREPLY: 180
> May 29 22:53:51 ser1 /usr/sbin/opensips[18162]: ONREPLY: 200
> May 29 22:53:51 ser1 /usr/sbin/opensips[18162]: ACC: transaction
> answered: timestamp=1275139431;method=INVITE;from_tag=4
> 2106e94-co4971-INS001;to_tag=as5e4b03b1;call_id=13189688682712200051636 at 202.xx.xx.58;code=200;reason=OK
>
> May 29 22:53:51 ser1 /usr/sbin/opensips[18159]: New request -
> Request/failure/branch routes: M=ACK RURI=sip:500601 at 192.1
> 68.1.3 F=sip:0407551651 at 202.xx.xx.33:5060
> T=sip:0352424992 at 202.1xx.1xx.195:5060 IP=202.xx.xx.33
> ID=13189688682712200051
> 636 at 202.xx.xx.58
> May 29 22:53:51 ser1 /usr/sbin/opensips[18159]: LOOSEROUTE:
> sip:500601 at 192.168.1.3
> May 29 22:53:51 ser1 /usr/sbin/opensips[18159]: ACC: request
> acknowledged: timestamp=1275139431;method=ACK;from_tag=4210
> 6e94-co4971-INS001;to_tag=as5e4b03b1;call_id=13189688682712200051636 at 202.xx.xx.58;code=200;reason=OK
>
> May 29 22:53:53 ser1 /usr/sbin/opensips[18160]: ONREPLY: 200
> May 29 22:53:53 ser1 /usr/sbin/opensips[18161]: New request -
> Request/failure/branch routes: M=ACK RURI=sip:500601 at 192.1
> 68.1.3 F=sip:0407551651 at 202.xx.xx.33:5060
> T=sip:0352424992 at 202.1xx.1xx.195:5060 IP=202.xx.xx.33
> ID=13189688682712200051
> 636 at 202.xx.xx.58
> May 29 22:53:53 ser1 /usr/sbin/opensips[18161]: LOOSEROUTE:
> sip:500601 at 192.168.1.3
> May 29 22:53:55 ser1 /usr/sbin/opensips[18159]: ONREPLY: 200
> May 29 22:53:56 ser1 /usr/sbin/opensips[18160]: New request -
> Request/failure/branch routes: M=ACK RURI=sip:500601 at 192.1
> 68.1.3 F=sip:0407551651 at 202.xx.xx.33:5060
> T=sip:0352424992 at 202.1xx.1xx.195:5060 IP=202.xx.xx.33
> ID=13189688682712200051
> 636 at 202.xx.xx.58
> May 29 22:53:56 ser1 /usr/sbin/opensips[18160]: LOOSEROUTE:
> sip:500601 at 192.168.1.3
> May 29 22:54:48 ser1 /usr/sbin/opensips[18160]: New request -
> Request/failure/branch routes: M=BYE RURI=sip:500601 at 192.1
> 68.1.3 F=sip:0407551651 at 202.xx.xx.33:5060
> T=sip:0352424992 at 202.1xx.1xx.195:5060 IP=202.xx.xx.33
> ID=13189688682712200051
> 636 at 202.xx.xx.58
> May 29 22:54:48 ser1 /usr/sbin/opensips[18160]: LOOSEROUTE:
> sip:500601 at 192.168.1.3
> May 29 22:54:50 ser1 /usr/sbin/opensips[18161]: New request -
> Request/failure/branch routes: M=BYE RURI=sip:500601 at 192.1
> 68.1.3 F=sip:0407551651 at 202.xx.xx.33:5060
> T=sip:0352424992 at 202.1xx.1xx.195:5060 IP=202.xx.xx.33
> ID=13189688682712200051
> 636 at 202.xx.xx.58
> May 29 22:54:50 ser1 /usr/sbin/opensips[18161]:
> WARNING:dialog:dlg_onroute: unable to find dialog for BYE with route par
> am '1e4.d4c4b33'
> May 29 22:54:50 ser1 /usr/sbin/opensips[18161]: LOOSEROUTE:
> sip:500601 at 192.168.1.3
> May 29 22:54:54 ser1 /usr/sbin/opensips[18168]: ACC: transaction
> answered:
> timestamp=1275139494;method=BYE;from_tag=42106e94-co4971-INS001;to_tag=as5e4b03b1;call_id=13189688682712200051636 at 202.xx.xx.58;code=408;reason=Request
> Timeout
> May 29 22:55:03 ser1 /usr/sbin/opensips[18160]: New request -
> Request/failure/branch routes: M=REGISTER RURI=sip:sip.xxxx.net.au
> F=sip:500100 at sip.xxxx.net.au T=sip:500100 at sip.xxxx.net.au
> IP=203.33.246.67 ID=OTE4Mjc3ZDAxNDI2OTE1MDE1NGQ4ZGRjYWFjY2ZiMDQ.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list