diff --git a/components/gateway/client_gateway/opensips.cfg b/components/gateway/client_gateway/opensips.cfg index 2e939f997..6744d514c 100644 --- a/components/gateway/client_gateway/opensips.cfg +++ b/components/gateway/client_gateway/opensips.cfg @@ -389,10 +389,12 @@ failure_route[GW_FAILOVER] { if (t_check_status("(408)|([56][0-9][0-9])")) { xlog("L_NOTICE", "$T_reply_code-lb-response-error-$avp(lb_dest)"); - if ( lb_next() ) { - t_on_failure("GW_FAILOVER"); - t_relay(); - exit; + if (!t_check_status("408")) { + if ( lb_next() ) { + t_on_failure("GW_FAILOVER"); + t_relay(); + exit; + } } send_reply(500, "All GW are down"); diff --git a/components/gateway/public_gateway/opensips.cfg b/components/gateway/public_gateway/opensips.cfg index f257b8339..8f3623b38 100644 --- a/components/gateway/public_gateway/opensips.cfg +++ b/components/gateway/public_gateway/opensips.cfg @@ -283,10 +283,12 @@ failure_route[GW_FAILOVER] { if (t_check_status("(408)|([56][0-9][0-9])")) { xlog("L_NOTICE", "$T_reply_code-lb-response-error-$avp(lb_dest)"); - if ( lb_next() ) { - t_on_failure("GW_FAILOVER"); - t_relay(); - exit; + if (!t_check_status("408")) { + if ( lb_next() ) { + t_on_failure("GW_FAILOVER"); + t_relay(); + exit; + } } send_reply(500, "All GW are down");