Hi,<div>Total Weight 2 and nodes weight as 1/1 was fine . you should do first "reloadxml" and then "distributor_ctl reload"<br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 2:24 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@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 dir="ltr">Dear users,<div><br></div><div>I'm trying to figure out how this mod_distributor works. I've a few questions to help me get this going.</div>
<div><br></div><div>I've defined two of my gateways in the distributor.conf.xml like this:</div>
<div><br></div><div><div><font face="courier new, monospace"><configuration name="distributor.conf" description="Distributor Configuration"></font></div><div><font face="courier new, monospace"> <lists></font></div>
<div><font face="courier new, monospace"> <list name="GWLB" total-weight="2"><br></font></div><div><font face="courier new, monospace"> <node name="OpenSIPS-A" weight="1"/></font></div>
<div><font face="courier new, monospace"> <node name="OpenSIPS-B" weight="1"/></font></div><div><font face="courier new, monospace"> </list></font></div><div><font face="courier new, monospace"> </lists></font></div>
<div><font face="courier new, monospace"></configuration></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> 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'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> expand distributor GWLB</font></div><div><font face="courier new, monospace">OpenSIPS-A</font></div><div><font face="courier new, monospace">freeswitch@internal> expand distributor GWLB</font></div>
<div><font face="courier new, monospace">OpenSIPS-B</font></div><div><font face="courier new, monospace">freeswitch@internal> expand distributor GWLB</font></div><div><font face="courier new, monospace">-err</font></div>
<div><font face="courier new, monospace">freeswitch@internal> expand distributor GWLB</font></div><div><font face="courier new, monospace">-err</font></div><div><font face="courier new, monospace">freeswitch@internal></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("{ignore_early_media=true,origination_caller_id_number="..outbound_cli.."}sofia/gateway/${distributor(GWLB)}/".. 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 '%{distributor(GWLB)}'</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>_________________________________________________________________________<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>