<div dir="ltr">Dear Saboor,<div><br><div>Thanks for the quick reply, to share my luck with this, I&#39;v even tried a complete restart of freeswitch after trying reloadxml and sofia module reloading as well.</div><div><br>
</div><div>The total-weight Warning even if I configured it with 2 made me think that I&#39;m probably changing in the wrong file but the API command to expand distributor list gives results for the first two attempts so that is really weird for me.</div>
<div><br></div><div>Just to add info, this is my FS version:</div><div><br></div><div><div><font face="courier new, monospace">freeswitch@internal&gt; version</font></div><div><font face="courier new, monospace">FreeSWITCH Version 1.3.14b+git~20130305T150702Z~57d6495248 (git 57d6495 2013-03-05 15:07:02Z)</font></div>
</div><div><br></div><div>BR</div><div>Sammy</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 2:31 AM, Ahmed Sboor <span dir="ltr">&lt;<a href="mailto:ahmed@netelsat.net" target="_blank">ahmed@netelsat.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div>Total Weight 2 and nodes weight as 1/1 was fine . you should do first &quot;reloadxml&quot; and then &quot;distributor_ctl reload&quot;<br>
<br><div class="gmail_quote"><div><div class="h5">On Tue, Aug 6, 2013 at 2:24 PM, SamyGo <span dir="ltr">&lt;<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear users,<div><br></div><div>I&#39;m trying to figure out how this mod_distributor works. I&#39;ve a few questions to help me get this going.</div>

<div><br></div><div>I&#39;ve defined two of my gateways in the distributor.conf.xml like this:</div>
<div><br></div><div><div><font face="courier new, monospace">&lt;configuration name=&quot;distributor.conf&quot; description=&quot;Distributor Configuration&quot;&gt;</font></div><div><font face="courier new, monospace">  &lt;lists&gt;</font></div>


<div><font face="courier new, monospace">    &lt;list name=&quot;GWLB&quot; total-weight=&quot;2&quot;&gt;<br></font></div><div><font face="courier new, monospace">      &lt;node name=&quot;OpenSIPS-A&quot; weight=&quot;1&quot;/&gt;</font></div>


<div><font face="courier new, monospace">      &lt;node name=&quot;OpenSIPS-B&quot; weight=&quot;1&quot;/&gt;</font></div><div><font face="courier new, monospace">    &lt;/list&gt;</font></div><div><font face="courier new, monospace">  &lt;/lists&gt;</font></div>


<div><font face="courier new, monospace">&lt;/configuration&gt;</font></div></div><div><br></div><div>and so when I reload the distributor from API I get the following warning:</div><div><br></div><div><div><font face="courier new, monospace">freeswitch@internal&gt; distributor_ctl reload</font></div>


<div><font face="courier new, monospace">+ok reloaded.</font></div><div><font face="courier new, monospace">2013-08-06 14:17:16.652087 [WARNING] mod_distributor.c:201 Total weight does not add up to total weight 10</font></div>


</div><div><br></div><div>So I&#39;ve changed the total-weight to 10, and set weight of each node as 5. That gives the same warning as well.</div><div><br></div><div>A Warning is fine, but as soon as I just use API to expand the list I get a proper gateway name for the first two times only and then -err starts showing up until I reload the distributor.</div>


<div><br></div><div><div><font face="courier new, monospace">freeswitch@internal&gt; expand distributor GWLB</font></div><div><font face="courier new, monospace">OpenSIPS-A</font></div><div><font face="courier new, monospace">freeswitch@internal&gt; expand distributor GWLB</font></div>


<div><font face="courier new, monospace">OpenSIPS-B</font></div><div><font face="courier new, monospace">freeswitch@internal&gt; expand distributor GWLB</font></div><div><font face="courier new, monospace">-err</font></div>


<div><font face="courier new, monospace">freeswitch@internal&gt; expand distributor GWLB</font></div><div><font face="courier new, monospace">-err</font></div><div><font face="courier new, monospace">freeswitch@internal&gt;</font></div>


</div><div><br></div><div>The last question is regarding use of this distributor from LUA script.</div><div><br></div><div>I call in the distributor like this from my LUA.</div><div><br></div><div><div><font face="courier new, monospace">session = freeswitch.Session(&quot;{ignore_early_media=true,origination_caller_id_number=&quot;..outbound_cli..&quot;}sofia/gateway/${distributor(GWLB)}/&quot;.. phone_number);</font></div>


</div><div><br></div><div>and that gives a straight error:</div><div><br></div><div><font face="courier new, monospace">[ERR] mod_sofia.c:4668 Invalid Gateway &#39;%{distributor(GWLB)}&#39;</font><br></div><div><br></div>


<div><br></div><div>I hope somebody can share their knowledge on this module and help me move forward with my project.</div><div><br></div><div>Best Regards,</div><div>Sammy</div></div>
<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>