<div dir="ltr">Hi Liviu, <div>Thank u so much . It works . </div><div><br></div><div>flag based routing is still there is the doc . please do update that if possible. </div><div><br></div><div>Thanks again . </div><div><br></div><div><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><i>Thanks & Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Senior Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 24, 2020 at 2:48 PM Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 24.11.2020 10:21, Sasmita Panda wrote:<br>
><br>
> In my config file the function is like<br>
> do_routing(,"W")<br>
><br>
> Till opensips-3.0 I have tested this function and this was working <br>
> fine . Opensips used to fork calls randomly within the gateways when <br>
> both have similar weight .<br>
> But in opensips-3.1 its not working . I have tested this with mysql <br>
> and mongodb also . In both case it's not working . In openisps-1.11 <br>
> even I am not setting this "W" flag in the function still its working .<br>
<br>
Hi, Sasmita!<br>
<br>
In 3.1, the sorting logic has been moved at table level, as part of the <br>
integration of the "qrouting" module (see the "sort_alg" columns for <br>
`dr_rules` and `dr_carriers`). As far as I can remember, the "W" flag <br>
of do_routing() has no purpose anymore in this new scheme of things. I <br>
will look into cleaning up the docs if it is still there, thanks!<br>
<br>
TL;DR: the solution is to put "W" into the `dr_rules.sort_alg` field. <br>
Let me know if this fixes your issue.<br>
<br>
Best regards,<br>
<br>
-- <br>
Liviu Chircu<br>
<a href="http://www.twitter.com/liviuchircu" rel="noreferrer" target="_blank">www.twitter.com/liviuchircu</a> | <a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">www.opensips-solutions.com</a><br>
<br>
</blockquote></div>