[Freeswitch-users] How to test mod_distributor ?

Anthony Minessale anthony.minessale at gmail.com
Wed Nov 11 10:32:27 PST 2009


see conf/autoload_configs/distributor.conf.xml

<configuration name="distributor.conf" description="Distributor
Configuration">
  <lists>
    <!-- every 10 calls to test you will get foo1 once and foo2 9
times...yes NINE TIMES! -->
    <!-- this is not the same as 100 with 10 and 90 that would do foo1 10
times in a row then foo2 90 times in a row -->
    <list name="test" total-weight="10">
      <node name="foo1" weight="1"/>
      <node name="foo2" weight="9"/>
    </list>
  </lists>
</configuration>


in your dialplan you can use

${distributor(test)} which will cycle expanding to foo1 1/10 times and foo2
the other 9

so imagine if foo1 or foo2 were the names of gateways, or hosts of a remote
box

basic jist is to set total-weight to a number of arbitrary units then set
several nodes with weight elements that add up to that number to break down
how many times that node text should be returned out of the total.

Remember to use the most simplified reduced value for your fractions to get
the most variety.

Setting total weight to 1000 and then 2 nodes with 100 and 900 would result
in foo1 100 times in a row, then foo2 900 times in a row.



On Wed, Nov 11, 2009 at 9:49 AM, Dome Charoenyost <dome at tel.co.th> wrote:

> I found mod_distributor in SVN. I want to know how does it work ?
>
> BG
>
> Dome C.
>
> _______________________________________________
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091111/a826214b/attachment-0002.html 


More information about the FreeSWITCH-users mailing list