[OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

Alain Bieuzent alain.bieuzent at free.fr
Thu Aug 31 10:22:11 EDT 2017


Hi Razvan,

 

Yes, when i change with the new function i have the same error log, 

 

I trying to replace with lb_next() in failure route but same error logs.

I’m trying to reproduce in my labs, but I never succeeded with manual calls.

 

In my production proxy, i changed my script to disable failure route, same error message, so for me the issue is not in that part.

 

thanks

 

De : Users <users-bounces at lists.opensips.org> au nom de Răzvan Crainea <razvan at opensips.org>
Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
Date : jeudi 31 août 2017 à 14:47
À : <users at lists.opensips.org>
Objet : Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

 

Hi, Alain!

When you are saying "without success", you mean you have the same error? 
In failure route, instead of lb_start_or_next(), why don't you simply use lb_next()?

Best regards,


Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 08/30/2017 04:26 PM, Alain Bieuzent wrote:

Razvan, I’m trying to modify my code but without succes, please tell me what i’m wrong :

 

if (is_present_hf("X-Provider"))

                {

                 $avp(lb_res) = $hdr(X-Provider);

        } else {

                send_reply("403","Forbidden");

                        exit;

        }

          if ( !lb_start("1","$avp(lb_res)") ) {

             send_reply("503","Service full");

               exit;

        }

        xlog("L_INFO","Sending Call to Provider $avp(lb_res), Gateway is : $du\n");

        # arm a failure route for be able to catch a failure event and to do

        # failover to the next available destination

        t_on_failure("LB_failed");

 

        # send it out

        $rd = $dd ;

        if (!t_relay()) {

                sl_reply_error();

                }

        }

 

failure_route[LB_failed]

{

        # skip if call was canceled

        if (t_was_cancelled()) {

                exit;

        }

 

        # was a destination failure ? (we do not want to do failover

        # if it was a call setup failure, so we look for 500 and 600

        # class replied and for local timeouts)

     if ( t_check_status("[56][0][03]") ||

        (t_check_status("408") && t_local_replied("all") ) ) {

                # this is a case for failover

                xlog("L_INFO","Gateway for provider $avp(lb_res) failed with code $T_reply_code for call to $rU");

                    # try to re-route to next available destination

                      if ( !lb_start_or_next("1","$avp(lb_res)") ) {

                      send_reply("503","Service full");

                        xlog("L_INFO","Route 2 : No resource for provider $avp(lb_res) for call to : $rU");

                      exit;

                }

                xlog("L_INFO","Re-routing call for Provider $avp(lb_res) to $du \n");

                t_relay();

        }

xlog("L_INFO","Gateway for provider $avp(lb_res) failed with code $T_reply_code for call to $rU");

}

 

I sent you my database ressources offlist, because there is some confidential data.

 

Thaks

 

 

De : Users <users-bounces at lists.opensips.org> au nom de Alain Bieuzent <alain.bieuzent at free.fr>
Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
Date : mercredi 30 août 2017 à 11:30
À : OpenSIPS users mailling list <users at lists.opensips.org>
Objet : Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

 

Hi Razvan, 

 

No i don’t modify my script, will check this new functions before continuing to bother you.

 

Many thanks

 

De : Users <users-bounces at lists.opensips.org> au nom de Răzvan Crainea <razvan at opensips.org>
Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
Date : mercredi 30 août 2017 à 11:01
À : <users at lists.opensips.org>
Objet : Re: [OpenSIPS-Users] Migrating from opensips 2.1.5 to 2.2.5

 

Hi, Alain!

Did you also migrate your script functions from load_balancer() to lb_start() and lb_next()?
Can you post your database resources and the way you are using load_balancer in the script?

Best regards,



Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 08/30/2017 11:40 AM, Alain Bieuzent wrote:

Hi all,

 

I’m trying to migrate my proxy from 2.1.5 to 2.2.5, since i migrate, i found a lot of log about load_balancer module (of course in 2.1.5 i don’t have this error logs). 

For me this message have not impact on the call flow, but i think it’s not normal …..

 

Someone can help me ?

 

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7719]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 <sip:X.X.X.X:5060> - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7722]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 112 <sip:X.X.X.X:5060> - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 <sip:Y.Y.Y.Y:5060> - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7720]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 102 <sip:Z.Z.Z.Z:5060> - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7721]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 <sip:Y.Y.Y.Y:5060> - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7718]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 <sip:Y.Y.Y.Y:5060> - unable to calculate free resources

Aug 30 10:30:27 ded-lb-out-master opensips[7723]: CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Aug 30 10:30:27 ded-lb-out-master opensips[7723]: WARNING:load_balancer:lb_route: initial call of LB - skipping destination 101 <sip:Y.Y.Y.Y:5060> - unable to calculate free resources

 

Regards, Alain

 

 






_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users 

_______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users 




_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170831/0ed2eeed/attachment-0001.html>


More information about the Users mailing list