to test gws, I use kamcmd for example : kamcmd lcr.load_gws 1 s:0600000001 s:02111111111 s:0600000001 arg 1 : prefix or $rU arg 2 : from_uri arg 3 : request_uri
result is OK with 5 gateways selected
but in real test situation with the following config file :
kamailio.cfg :
request_route { ... if(!load_gws(1,$rU,$fU)) { sl_send_reply("500", "Cannot load gateways"); exit; } ## - dumping the list of lcr gateways $var(i) = 0; while( $(avp(lcr_gw_uri)[$var(i)]) != $null) { xlog("L_ERR","loaded gw_uri_avp[$var(i)]=’$(avp(lcr_gw_uri)[$var(i)])’\n"); $var(i) = $var(i) + 1; }
if(!next_gw()) { sl_send_reply("503", "No gateways found"); exit; }
Log values of load_gws arguments to see if they are the same as in kamcmd test.
-- Juha