Hi Max,

Something like:

if( (t_check_status("444") || (t_check_status("408") && t_local_replied("all")) ) || !goes_to_gw("1") ) {

Do failover if 444 reply or if 408 without any reply received (internal 408).

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 01/20/2017 01:21 PM, Max Mühlbronner wrote:
Hi,


my scenario is a special setup where we are checking for the reply code (t_check_status) and only do a failover to the next gateway when there is a 444 reply or gateway type is not "1".

...

        if (use_next_gw()) {
                if( t_check_status("444") || !goes_to_gw("1") ) {
                        t_on_failure("2");
                        t_relay();
                        exit;
                }


The problem is, there are multiple gateways in a carrier/gatewaylist (gateway type 1) which are not responding (t1 timer hits and invite is re-transmitted) and there is no failover after the first gateway anymore. Is there anything i am missing, is it even possible to do failover only for the 444 reply while at the same time still doing a failover in case of Timeout-based failover ? (t1/t2 timers)


I didn't try yet, but is something like !t_check_status("\d") feasible? E.g. doing a failover if there is no t_check_status (checking regular expression for !digits?) but i guess it does not work that way?


        if (use_next_gw()) {
                if( t_check_status("444") || !goes_to_gw("1") ) {
                        t_on_failure("2");
                        t_relay();
                        exit;
                }

                if(!t_check_status("\d")) {

                        t_on_failure("2");
                        t_relay();
                        exit;

                 }

    ...



BR



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

Reply via email to