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.
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
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.
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
Look at new patch please (opensips_b2bl_tc_init_time_v3.patch).
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