Dears,

 

I’m trying drouting module in kamailio , it’s working good when first gateway in the list is up , yet when first gateway is unrecheable , it’s not rerouted to second destination, meaning that fail over is not working.

 

Kindly find attached wireshark trace I’m getting .

 

Below is db entries I’m using :

 

dr_gateways:

Dr_gw_lists

 

Dr_groups:

 

Dr_rules:

 

Below is routing block I’m using :

 

request_route{

if (is_method("INVITE"))

                {

                                if (!do_routing("0")) {

                                send_reply("503", "Test No Rules matching the URI");

                                exit;

               }

                                route(10);

                                exit;

                }

 

}

route[10] {

    if (!do_routing("0")) {

        xlog("do_routing: No rules matching the URI\n");

        send_reply("503","No rules matching the URI");

        exit;

    }

               

    if (is_method("INVITE")) {

        t_on_failure("4");

    }

    route(1);

}

failure_route[4] {

    xlog("DEBUG: DROUTING failure route active\n");

    if (t_check_status("[34][0-9][0-9]")) {

        exit;

    }

    if (use_next_gw()) {

        t_relay();

        exit;

    } else {

    t_reply ("503", "Service not available");

        exit;

    }

}

route[1] {

        # send it out now; use stateful forwarding as it works

        # reliably even for UDP2TCP

        if (!t_relay()) {

         sl_reply_error();

        };

        exit;

}

 

Appreciating your prompt reply and assistance.

 

 

Description: Description: cid:image001.png@01CDB75E.FF3A44B0

 

Ali Taher

Technical Support Engineer

 

 

T&F         

M

W

A

+961-5-457437 Ext 215

+961-70-010600

http://www.vanrise.com

Vanrise Building, Facing Galerie Semaan

Hazmiyeh Highway – Beirut, Lebanon

 

Description: Description: cid:image002.png@01CDB75E.FF3A44B0

Join us at

 Description: Description: cid:image006.png@01CDB760.3643AA40 Description: Description: cid:image007.png@01CDB760.3643AA40 Description: Description: cid:image008.png@01CDB760.3643AA40