Dear all,<br><br>I&#39;m trying to create a service which when a call reach Kamailio, this call get&#39;s a number of gateways in round robin mode and from them I create uri and append_branches.<br><br>The all scenario works fine except that I don&#39;t get from Dispatcher the round robin mode. Is is the way I ask Dispatcher and i don&#39;t get the results I need.<br>
In other scenarios Dispatcher works fine. The other thing is that I tried the random alg of Dispatcher and that works.<br>I&#39;m trying to understand what I&#39;m doing wrong and why random alg works but round robin not.<br>
<br>I&#39;m attaching my code if anyone has an idea of what I&#39;m doing wrong.<br><br>Thank you<br>Alex<br><br><b>Scenario description:</b><br><b><br>Call enter  <br>                    --&gt; Dialplan (Here if has a match get the attributes which is a list of dispatcher gw group  in the form of 100.101.#)<br>
<br>                               --&gt; Dispatcher (For every dispatcher gw group appnd the branch)<br>                               <br>                                            --&gt; Redirect the call</b><br><br><br>
route[TEST]<br>{<br><br>  if(dp_translate(&quot;$avp(s:lcr_id)&quot;, &quot;$rU/$rU&quot;))<br>        {<br>            $var(i) = 0;<br>            while($(var(dpattrs){s.select,$var(i),.})!=&quot;#&quot;) <b>#attr example is gw group of disptcher in order 100.101.# or in my scenario is 200.# which in Dispatcher is 2 gw</b> <b>10.0.0.2 and 10.0.0.3</b><br>
            {<br>                $avp(s:disp_dstgrp) = $(var(dpattrs){s.select,$var(i),.}{<a href="http://s.int">s.int</a>});<br>                if(ds_select_domain(&quot;$avp(s:disp_dstgrp)&quot;, &quot;4&quot;))<br>                {<br>
<br>                append_branch();<br>                revert_uri();<br>                $avp(s:disp_dstgrp) = &quot;null&quot;;<br>                }<br>                $var(i) = $var(i) + 1; # for the while loop<br>           }<br>
                        ####################### REDIRECTION #####################<br>                        sl_send_reply(&quot;300&quot;, &quot;Multiple Choice&quot;); <br>                        #########################################################<br>
                        exit;<br>        } else {<br>                xlog(&quot; ----- No routing found for this call -----&quot;);<br>        }<br>}<br>