[SR-Users] LCR Failover

Daniel W. Graham dan at cmsinter.net
Thu Nov 29 16:09:13 CET 2012


I am having issues with LCR failure route. I have two gateways specified in LCR table, if I change the address of the gateway with highest priority to a bogus IP, the failure route never seems to takes place and call is never routed to second gateway.
Also, I have tested successful calls to both gateways by switching the priorities around.

Here is what I receive after the first gateway times out:

U kamailio:5060 -> asterisk:5060
SIP/2.0 408 Request Timeout.
Via: SIP/2.0/UDP asterisk:5060;branch=z9hG4bK633b44d8;rport=5060.
From: "user" <sip:user at asterisk>;tag=as67c0037f.
To: <sip:dialednumber at domain>;tag=d7177f97ed67076dddc3163c85ab0656-f2e5.
Call-ID: 248d69ed6495d0a65315458e2ba6c528 at asterisk:5060.
CSeq: 102 INVITE.
Server: SIP Proxy.
Content-Length: 0.

Config:

modparam("tm", "fr_timer", 10000)
modparam("tm", "fr_inv_timer", 120000)

modparam("lcr", "db_url", DBURL)
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
modparam("lcr", "flags_avp", "$avp(i:712)")
modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)")

route[LCR] {
        if (!load_gws(1)) {
                sl_send_reply("503", "Internal Server Error, Unable to load gateways");
        exit;
        } else {
                if (next_gw()) {
                        t_on_failure("LCR_FAIL");
                        route(RELAY);
                } else {
                        sl_send_reply("503", "Service Unavailable, No available gateways");
                        exit;
                };
        };
        exit;
}

failure_route[LCR_FAIL] {
                if (next_gw()) {
                        t_on_failure("LCR_FAIL");
                        route(RELAY);
                } else {
                        t_reply("503", "Service Unavailable, No gateways");
                        exit;
                };
               exit;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121129/f5493595/attachment-0001.htm>


More information about the sr-users mailing list