<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
On 5/18/11 9:50 AM, alex pappas wrote:
<blockquote
cite="mid:BANLkTin6QxTxrgDCKs8qXeS23bFFDVP-wA@mail.gmail.com"
type="cite">Daniel hi,
<div><br>
</div>
<div>I noticed that I was not using the ds_next_domain(). I was
looping inside a ds_select_domain("$avp(s:disp_dstgrp)", "4").</div>
<div><br>
</div>
<div><br>
</div>
<div>I changed that to:</div>
<div><br>
</div>
<div>For every gw_group:</div>
<div><br>
</div>
<div> The first gw_group the $rd is getting fed from
ds_select_domain("$avp(s:disp_dstgrp)", "4") and all the other
times is getting fed from ds_next_domain(). In this way
everything works as expected.</div>
</blockquote>
ok, thanks for reporting back what was the cause.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:BANLkTin6QxTxrgDCKs8qXeS23bFFDVP-wA@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>Thank you very match for your replay</div>
<div><br>
</div>
<div>Regards</div>
<div>Alex</div>
<div><br>
<br>
<div class="gmail_quote">On Mon, May 16, 2011 at 10:38 AM,
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
<br>
can you put some xlog messages with the uri after
ds_select_domain() execution? Do several tests to see what
destination address is selected.<br>
<br>
Also, put here the content of the records for the
dispatcher groups in use.<br>
<br>
Cheers,<br>
Daniel
<div>
<div class="h5"><br>
<br>
On 5/11/11 11:12 AM, alex pappas wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Dear all,<br>
<br>
I'm trying to create a service which when a call
reach Kamailio, this call get'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't get
from Dispatcher the round robin mode. Is is the way
I ask Dispatcher and i don'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'm trying to understand what I'm doing wrong and
why random alg works but round robin not.<br>
<br>
I'm attaching my code if anyone has an idea of what
I'm doing wrong.<br>
<br>
Thank you<br>
Alex<br>
<br>
<b>Scenario description:</b><br>
<b><br>
Call enter <br>
--> 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>
--> Dispatcher
(For every dispatcher gw group appnd the branch)<br>
<br>
-->
Redirect the call</b><br>
<br>
<br>
route[TEST]<br>
{<br>
<br>
if(dp_translate("$avp(s:lcr_id)", "$rU/$rU"))<br>
{<br>
$var(i) = 0;<br>
while($(var(dpattrs){s.select,$var(i),.})!="#") <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
moz-do-not-send="true" href="http://s.int"
target="_blank">s.int</a>});<br>
if(ds_select_domain("$avp(s:disp_dstgrp)", "4"))<br>
{<br>
<br>
append_branch();<br>
revert_uri();<br>
$avp(s:disp_dstgrp) = "null";<br>
}<br>
$var(i) = $var(i) + 1; # for the
while loop<br>
}<br>
#######################
REDIRECTION #####################<br>
sl_send_reply("300",
"Multiple Choice"); <br>
#########################################################<br>
exit;<br>
} else {<br>
xlog(" ----- No routing found for
this call -----");<br>
}<br>
}<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>