Hello Guys,

Im trying to implement a diferent feature using load balance, i check on maillist archive and check on this post ( http://www.openser.org/pipermail/users/2013-July/026269.html ) that we must use the same resource on load balance, when i try a diferent way i got this message

Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: ERROR:load_balancer:do_load_balance: failed to remove from profile
Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: Operadora: algar
Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: ERROR:load_balancer:do_load_balance: failed to remove from profile
Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: Operadora: oi
Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: ERROR:load_balancer:do_load_balance: failed to remove from profile
Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: Operadora: ebt
Nov 19 17:58:39 sipproxy01 /usr/sbin/opensips[32010]: ERROR:load_balancer:do_load_balance: failed to remove from profile


So, what i need to do is to check the kind of route (landline, mobile numbers, long distance, service number etc..) and with that information i use an array to choose the resource that i need on loadbalance, if that resource fail, i need to send to another group of resource, let my put a sample here:

if i got a call for local mobile number i create this array:

case "VC1":
                # Variaveis devem ser adicionadas em ordem inversa
                        $avp(max_operadora) = "7";
                        $avp(ordem_operadora) = "gvt";
                        $avp(ordem_operadora) = "ebt";
                        $avp(ordem_operadora) = "oi";
                        $avp(ordem_operadora) = "algar";
                        $avp(ordem_operadora) = "transit";
                        $avp(ordem_operadora) = "yama";
                        $avp(ordem_operadora) = "njgsm";
                        $avp(ordem_operadora) = "claro";
                break;

and so, i send to the load balancer

        if( !load_balance("10","$(avp(ordem_operadora)[$avp(contador)])")){

if i got a fail i will loop on loadbalance again and change the counter , so i will use the next carrier

If i cannot implement this on load_balance, which module should i use ?

If im not wrong with drouting i cannot create a load_balance right ?

The dispatcher module seems to be more accurate for this function, somebody can confirm that ?

Thank you guys.



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to