Sorry all, my message got cut off.

 

I have the following in database tables:

Lcr_gw -

Lcr_id 1, gw_name gw1, ip_addr x.x.x.x

Lcr_id 1, gw_name gw1, ip_addr x.x.x.x

 

Rule_target-

Lcr_id 1, rule_id 1, gw_id 1, priority 1, weight 1

Lcr_id-1, rule_id 1, gw_id 2, priority 2, weight 1

 

Lcr_rule -

Lcr_id 1, prefix null, from_uri null, request_uri null, stopper 0, enabled 1

 

Any ideas what could cause this?

 

Any help is much appreciated.

 

Thanks,

-dan

 

From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel W. Graham
Sent: Thursday, November 29, 2012 10:09 AM
To: sr-users@lists.sip-router.org
Subject: [SR-Users] LCR Failover

 

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@asterisk>;tag=as67c0037f.

To: <sip:dialednumber@domain>;tag=d7177f97ed67076dddc3163c85ab0656-f2e5.

Call-ID: 248d69ed6495d0a65315458e2ba6c528@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;

}