I have attempted to ask questions on IRC with no response.  I really appreciate any help from anybody!

I am using Kamailio 3.2.2.

I am unable to get anything loaded in $avp(i:709).

I am attempting to route between 2 media handling asterisk boxes.  I am trying to load balance between them. I have the following entries in my tables...



1, 1, media1,,,  5060,  , 1, 1, 0, 0, 0
2, 1, media2,,,  5060,  , 1, 1, 0, 0, 0



1, 1, [1][0-9][0-9][0-9][0-9], 0, 1


1, 1, 1, 1, 1, 5
2, 1, 1, 2, 1, 5

I was under the impression that, if my from URI was 15555, and I have 2 gateways, that I can call load_gws("1","$fU") and return the gateways that match the from_uri rule of 15555 , then look the rule_id up in lcr_rule_target and return the 2 gws gw_id[1] and gw_id[2], which are the 2 entries in the lcr_gw table..... and it would be weighted 5 and 5 so that it would load balance.

Right now..... I get nothing loaded in $avp(i:709).  I thought this would show the IP/Hostname of the media1 or media2 gws.  The variable is null far before the call to load_gws
I'm loading it at the top in a modparam like

modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")

When i get the result of calling the load_gws() function into a variable.  The variable is 2.  Is that the number of rows returned?

Why is that parameter [avp(i:709)] always empty?

How can i get next_gw() to complete and not fail?

Thank you so much....

I am very new to Kamailio and am very interested...

Kamailio Padawan Learner