Hi, in failure route I call next_gw(), it success and the request is sent to a second gateway (inspecting with ngrep I see that the sent request has the gw IP as RURI). But if I print (xlog) $ru it still shows the previously selected gw (the first one).
This is, the behaviour is correct but $ru is not updated in the script process. I show an example which hopefully would show the issue (xlogs). Basically the script invokes ROUTE_GW which uses LCR to select the first gw, sets FAILURE_ROUTE_GW and calls ROUTE_DEFAULT (in which t_relay is done). FAILURE_ROUTE block also sets FAILURE_ROUTE block, uses LCR to select a new gw and calls to ROUTE_DEFAULT: INVITE sip:[email protected] - From: ibc - from 222.230.253.254:48254 (Twinkle/1.4.2) [ROUTE GW] LCR: Selected gw ($rd): 222.230.249.81 [ROUTE DEFAULT] $ru = sip:[email protected]:0 <---- Seems to be OK 500 "Internal Error" from 222.230.249.81:5060 (GW1) [FAILURE ROUTE GW] CRITICAL: LCR: 500 replied by gw 222.230.249.81 --> Doing failover... [FAILURE ROUTE GW] Selected gw ($rd): 222.230.249.81 <----- WRONG !!! [ROUTE DEFAULT] $ru = sip:[email protected]:0 <----- WRONG !!! 503 "Service Unavailable" from 99.121.79.216:5060 (GW2) <----- But the used gw is the expected. [FAILURE ROUTE GW] CRITICAL: LCR: 503 replied by gw 99.121.79.216 --> Doing failover... [FAILURE ROUTE GW] CRITICAL: LCR: No gateways available --> 503 Kamailio 1.5 rev 5925. -- Iñaki Baz Castillo <[email protected]> _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
