Menu

#562 b2b_logic: too small setup timeout when topology hiding

1.8.x
closed-fixed
modules (454)
7
2012-10-30
2012-10-04
No

When b2b creates topology hiding scenario, it setups too small call setup time:
/* if it will not be confirmed -> delete */
tuple->lifetime = 60 + get_ticks();

When alice calls bob and bob don't answer for 60 seconds, b2b send CANCEL to both sides.
I think we should give possibility to configure this parameter, either in AVP or b2b_init_request flags like b2b_init_request("top hiding/t300").
I'd can to write the patch after discussion about what method to use.

Discussion

1 2 > >> (Page 1 of 2)
  • Bogdan-Andrei Iancu

    Hi Nick,

    Normally the lifetime is controlled via the scenario XML, so it is per scenario. Of course, the TH does not have a scenario XML. I would go for a module param or by a flag-like approach - depending if we want to control this per scenario (like for other cases) or per instance of scenario.

    Regards,
    Bogdan

     
  • Nick Altmann

    Nick Altmann - 2012-10-15

    Here are two patches:
    1. opensips_b2bl_tc_init_time_v1.patch
    Adds module param b2bl_th_init_timeout with default value 60 to setup initial b2b timeout for topology hiding scenario.

    2. opensips_b2bl_tc_init_time_v1.patch
    Adds module parameter as previous patch, but also adds per b2b session flag "t[number]" for b2b_init_request.
    Usage examples: b2b_init_request("top hiding/t60"), b2b_init_request("top hiding/t300").
    Number length is not fixed.

    You may choose. :-)
    If one or another patch will be applied, I'll add documentation patch for it.

     
  • Nick Altmann

    Nick Altmann - 2012-10-15
     
  • Nick Altmann

    Nick Altmann - 2012-10-15
     
  • Bogdan-Andrei Iancu

    Hi Nick,

    I will go for v2, but I have some objection regarding your approach - I see you moved the scenario lookup from the fixup function to runtime part, which is totally inefficient - instead of doing the lookup once, you do it for each call.

    What I suggest here is to do both the scenario lookup and the flag detection in the fixup function. You can simply do that by replacing the param 1 (after fixup) with a structure (pkg) holding the scenario ID (as originally) plus the flag string. Or even better, the structure can already parse & expend the flags, so that at runtime you have everything prepared. If you have doubts on how to do this, just let me know and I will do it as soon as I'll get available time.

    Regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> bogdan_iancu
    • status: open --> open-accepted
     
  • Nick Altmann

    Nick Altmann - 2012-10-22

    Look at new patch please (opensips_b2bl_tc_init_time_v3.patch).

     
  • Nick Altmann

    Nick Altmann - 2012-10-22
     
  • Bogdan-Andrei Iancu

    • priority: 5 --> 7
    • status: open-accepted --> open-fixed
     
  • Bogdan-Andrei Iancu

    Hi Nick,

    Thank you for your patches - for 1.8 I uploaded the fix with the minimal change (v1) - but please provide a small patch with the corresponding docs.

    For trunk I used the v3 patch, with some changes - please let me know if still works ok :).

    Regards,
    Bogdan

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.