[Freeswitch-users] Mod_distributor question

Ahmed Sboor ahmed at netelsat.net
Tue Aug 6 13:31:46 MSD 2013


Hi,
Total Weight 2 and nodes weight as 1/1 was fine . you should do first
"reloadxml" and then "distributor_ctl reload"

On Tue, Aug 6, 2013 at 2:24 PM, SamyGo <govoiper at gmail.com> wrote:

> Dear users,
>
> I'm trying to figure out how this mod_distributor works. I've a few
> questions to help me get this going.
>
> I've defined two of my gateways in the distributor.conf.xml like this:
>
> <configuration name="distributor.conf" description="Distributor
> Configuration">
>   <lists>
>     <list name="GWLB" total-weight="2">
>       <node name="OpenSIPS-A" weight="1"/>
>       <node name="OpenSIPS-B" weight="1"/>
>     </list>
>   </lists>
> </configuration>
>
> and so when I reload the distributor from API I get the following warning:
>
> freeswitch at internal> distributor_ctl reload
> +ok reloaded.
> 2013-08-06 14:17:16.652087 [WARNING] mod_distributor.c:201 Total weight
> does not add up to total weight 10
>
> So I've changed the total-weight to 10, and set weight of each node as 5.
> That gives the same warning as well.
>
> 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.
>
> freeswitch at internal> expand distributor GWLB
> OpenSIPS-A
> freeswitch at internal> expand distributor GWLB
> OpenSIPS-B
> freeswitch at internal> expand distributor GWLB
> -err
> freeswitch at internal> expand distributor GWLB
> -err
> freeswitch at internal>
>
> The last question is regarding use of this distributor from LUA script.
>
> I call in the distributor like this from my LUA.
>
> session =
> freeswitch.Session("{ignore_early_media=true,origination_caller_id_number="..outbound_cli.."}sofia/gateway/${distributor(GWLB)}/"..
> phone_number);
>
> and that gives a straight error:
>
> [ERR] mod_sofia.c:4668 Invalid Gateway '%{distributor(GWLB)}'
>
>
> I hope somebody can share their knowledge on this module and help me move
> forward with my project.
>
> Best Regards,
> Sammy
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130806/5811511b/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list