If you know the number of calls the GW can handle in advance, you can limit the call attempts before sending the call to the gateway: http://wiki.freeswitch.org/wiki/Limit There are several ways to use that. You can reroute calls to a 2nd gateway on error: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge#Implementing_Fai... There are channel variables that let you control what to consider a reroutable error and what is a give-up error: http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail http://wiki.freeswitch.org/wiki/Channel_Variables#failure_causes This might also be useful, particularly with mod_limit: http://wiki.freeswitch.org/wiki/Channel_Variables#transfer_on_fail You could use mod_lcr to get a list of all the GWs, but in a random order. That'd let you load balance (randomly) but reroute when required without duplicates unlike mod_distributor. Hopefully that's enough building blocks to give you somewhere to start... -Steve On 20 April 2011 08:27, Charles <fieldpeak@gmail.com> wrote:
i have two media GWs connected with FS for PSTN calls, FS route the first one in normal case, once the first GW get full (all of channels were occupied), i need FS route to the second GW. i found once the first GW get full, it will reply '404 not found' to FS, can FS route to the second one according to this condition or any other alternative?
although i know there is mod_distributor for load balancing, however, i need if only first one full then route to second one, so it looks this module not suitable for this senario...
Thanks.
Regards, Charles
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org