[OpenSIPS-Devel] [ opensips-Bugs-3578383 ] Path+usrloc+b2b=lost transport (Multihomed B2B. Again.)

SourceForge.net noreply at sourceforge.net
Fri Oct 26 13:02:31 CEST 2012


Bugs item #3578383, was opened at 2012-10-19 07:18
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3578383&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Path+usrloc+b2b=lost transport (Multihomed B2B. Again.)

Initial Comment:
B2B doesn't take attention on transport tag in RURI.

For example: B2B receives UDP packet with transport=TCP in RURI, but whatever sends it via UDP.


----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-10-26 04:02

Message:
Hi Nick,

Thanks for debugging and fixing - I uploaded your patch on SVN trunk, 1.8
and 1.7

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2012-10-23 03:27

Message:
Here is my patch for path module:
1. To add transport to first route if transport != udp.
2. To parse transport tag when doing path_rr_callback.

opensips_path_tcp_v1.patch


----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2012-10-23 01:42

Message:
The problem is fixed on b2b, before b2b_init_request:

if (($du != null) && ($hdr(Route) =~ ";transport=tcp")) $du = "sip:" + $dd
+ ":" + $dp + ";transport=tcp";

But I think the path module needs to be patched:
1. To add transport to first route if transport != udp.
2. To parse transport tag when doing path_rr_callback.


----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2012-10-21 22:18

Message:
I have mixed multiple opensips setup with b2b, usrloc, path and another
modules.
I deeply investigated the problem and it's not in b2b.
In my setup b2b sometimes receives packets with preloaded routes using path
module with use_received=1.
I found that when REGISTER passes from one opensips to another, path module
adds something like:
with enable_double_path=0:
<sip:2.2.2.2;lr;received=sip:8.8.8.8:55952>
with enable_double_path=1 (I use this):
<sip:2.2.2.2;r2=on;lr;received=sip:8.8.8.8:55947>,<sip:2.2.2.2;transport=tcp;r2=on;lr>
Then it saved by save("table", "p0") on second opensips in database.

The next step is call from second opensips.
It receives INVITE, calls lookup("table") and adds preloaded route:
Route:
<sip:2.2.2.2;r2=on;lr;received=sip:8.8.8.8:55947>,<sip:2.2.2.2;transport=tcp;r2=on;lr>
then sends it to first (b2b) opensips.

b2b-opensips receives this packet and in debug I see:
Oct 22 08:40:57 opensips-test-2-1 opensips[20655]: DBG:rr:after_loose:
Topmost route URI: 'sip:2.2.2.2;r2=on;lr;received=sip:8.8.8.8:55947' is me
Oct 22 08:40:57 opensips-test-2-1 opensips[20655]: DBG:rr:run_rr_callbacks:
callback id 0 entered with <r2=on;lr;received=sip:8.8.8.8:55947>
Oct 22 08:40:57 opensips-test-2-1 opensips[20655]: DBG:core:parse_params:
Parsing params for:[r2=on;lr;received=sip:8.8.8.8:55947]
then, in script output
$du=sip:8.8.8.8:55947
As expected, b2b uses $du to route the packet, ignoring $ru.

So, it lost transport because transport is in second Route header.


----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-10-21 08:14

Message:
Hi Nick,

If running in debug mode, when the initial request is processed by opensips
you should have a log like:
    tm:t_uac: next_hop=<uri>

Could you confirm that the "uri" you have there points is the same as RURI
you had is script before triggering the b2b, and it still contain the
"transport" parameter.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3578383&group_id=232389



More information about the Devel mailing list