<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>