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; }
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; }
Daniel W. Graham writes:
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.
perhaps failure route is not executed in that case.
-- juha
Makes sense, would LCR module permit this scenario to work in a different configuration? Or should I be looking at another module? I could use dispatcher but I'd like the ability to add additional routes based on prefix in the future.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Juha Heinanen Sent: Thursday, November 29, 2012 5:37 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: [SR-Users] LCR Failover
Daniel W. Graham writes:
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.
perhaps failure route is not executed in that case.
-- juha
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel W. Graham writes:
Makes sense, would LCR module permit this scenario to work in a different configuration? Or should I be looking at another module? I could use dispatcher but I'd like the ability to add additional routes based on prefix in the future.
if t_relay fails and failure route is not executed, you should call next_gw in route block.
-- juha
Gave that a try still without success.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Juha Heinanen Sent: Friday, November 30, 2012 1:34 AM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] LCR Failover
Daniel W. Graham writes:
Makes sense, would LCR module permit this scenario to work in a different configuration? Or should I be looking at another module? I could use dispatcher but I'd like the ability to add additional routes based on prefix in the future.
if t_relay fails and failure route is not executed, you should call next_gw in route block.
-- juha
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Kamailio sends the following when the first gateway times out. Failure route is never executed and next_gw specified in route block still results in the following.
Asterisk placed call to kamailio:
U kamailio:5060 -> asterisk:5060 SIP/2.0 408 Request Timeout. Via: SIP/2.0/UDP asterisk:5060;branch=z9hG4bK670647ee;rport=5060. From: "user" sip:asterisk;tag=as12708af4. To: sip:dialednumber@domain;tag=d7177f97ed67076dddc3163c85ab0656-a8a1. Call-ID: 35e9d8016fec2d9011d470a53224e923@asterisk:5060. CSeq: 102 INVITE. Server: SIP Proxy. Content-Length: 0.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel W. Graham Sent: Friday, November 30, 2012 12:42 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] LCR Failover
Gave that a try still without success.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Juha Heinanen Sent: Friday, November 30, 2012 1:34 AM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] LCR Failover
Daniel W. Graham writes:
Makes sense, would LCR module permit this scenario to work in a different configuration? Or should I be looking at another module? I could use dispatcher but I'd like the ability to add additional routes based on prefix in the future.
if t_relay fails and failure route is not executed, you should call next_gw in route block.
-- juha
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I was able to figure out why my logic didn't work. I was calling the default route(RELAY) in LCR route, since route(RELAY) has t_on_failure already specified, setting t_on_failure in LCR route did nothing.
I am now calling t_relay directly from LCR route and failure route is now working. I just need to tweak timers and make sure I do not need to call any other functions such as NATMANAGE that are specified in default route(RELAY).
-----Original Message----- From: Daniel W. Graham Sent: Friday, November 30, 2012 3:50 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: RE: [SR-Users] LCR Failover
Kamailio sends the following when the first gateway times out. Failure route is never executed and next_gw specified in route block still results in the following.
Asterisk placed call to kamailio:
U kamailio:5060 -> asterisk:5060 SIP/2.0 408 Request Timeout. Via: SIP/2.0/UDP asterisk:5060;branch=z9hG4bK670647ee;rport=5060. From: "user" sip:asterisk;tag=as12708af4. To: sip:dialednumber@domain;tag=d7177f97ed67076dddc3163c85ab0656-a8a1. Call-ID: 35e9d8016fec2d9011d470a53224e923@asterisk:5060. CSeq: 102 INVITE. Server: SIP Proxy. Content-Length: 0.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel W. Graham Sent: Friday, November 30, 2012 12:42 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] LCR Failover
Gave that a try still without success.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Juha Heinanen Sent: Friday, November 30, 2012 1:34 AM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Subject: Re: [SR-Users] LCR Failover
Daniel W. Graham writes:
Makes sense, would LCR module permit this scenario to work in a different configuration? Or should I be looking at another module? I could use dispatcher but I'd like the ability to add additional routes based on prefix in the future.
if t_relay fails and failure route is not executed, you should call next_gw in route block.
-- juha
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users