#569 Path+usrloc+b2b=lost transport (Multihomed B2B. Again.)

trunk
closed-fixed
modules (454)
5
2012-10-26
2012-10-19
No

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.

Discussion

  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> bogdan_iancu
     
  • Bogdan-Andrei Iancu

    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

     
  • Nick Altmann

    Nick Altmann - 2012-10-22
    • summary: Multihomed B2B. Again. --> Path+usrloc+b2b=lost transport (Multihomed B2B. Again.)
     
  • Nick Altmann

    Nick Altmann - 2012-10-22

    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.

     
  • Nick Altmann

    Nick Altmann - 2012-10-23

    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.

     
  • Nick Altmann

    Nick Altmann - 2012-10-23

    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

     
  • Bogdan-Andrei Iancu

    Hi Nick,

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

    Regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks