<div>Hello,</div><div><br></div><div>I have attempted to ask questions on IRC with no response.  I really appreciate any help from anybody!</div><div><br></div><div>I am using Kamailio 3.2.2.</div><div><br></div>I am unable to get anything loaded in $avp(i:709).<div>
<br></div><div>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...</div><div><br></div><div><u>lcr_gw</u></div><div><br>
</div><div><u>id,lcr_id,gw_name,ip_addr,hostname,port,params,uri_scheme,transport,strip,prefix,tag,flags,defunct</u></div><div><br></div><div><div>1, 1, media1, <b>1.1.3.123</b>,  <b>1.1.3.123</b>,  5060,  , 1, 1, 0, 0, 0</div>
<div>2, 1, media2, <b>1.1.4.123</b>,  <b>1.1.4.123</b>,  5060,  , 1, 1, 0, 0, 0</div></div><div><br></div><div><br></div><div><br></div><div><u>lcr_rule</u></div><div><br></div><div><u>id,lcr_id,prefix,from_uri,stopper,enabled</u></div>
<div><u><br></u></div><div>1, 1, <b>[1][0-9][0-9][0-9][0-9]</b>, 0, 1</div><div><br></div><div><br></div><div><br></div><div><u>lcr_rule_target</u></div><div><br></div><div><u>id,lcr_id,rule_id,gw_id,priority,weight</u></div>
<div><div>1, 1, 1, <b><font size="4">1</font></b>, 1, 5</div><div>2, 1, 1, <b><font size="4">2</font></b>, 1, 5</div></div><div><br></div><div><br></div><div><br></div><div>I was under the impression that, if my from URI was 15555, and I have 2 gateways, that I can call <b>load_gws(&quot;1&quot;,&quot;$fU&quot;)</b> and return the gateways that match the <b>from_uri</b> rule of 15555 , then look the rule_id up in <b>lcr_rule_target</b> and return the <b>2</b> gws gw_id[1] and gw_id[2], which are the 2 entries in the<b> lcr_gw</b> table..... and it would be weighted 5 and 5 so that it would load balance.</div>
<div><br></div><div>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 <b>load_gws</b>. </div><div>I&#39;m loading it at the top in a modparam like</div>
<div><br></div><div><div><b>modparam(&quot;lcr&quot;, &quot;gw_uri_avp&quot;, &quot;$avp(i:709)&quot;)</b></div><div><b>modparam(&quot;lcr&quot;, &quot;ruri_user_avp&quot;, &quot;$avp(i:500)&quot;)</b></div></div><div><br>
</div><div>When i get the result of calling the <b>load_gws</b>() function into a variable.  The variable is <b>2</b>.  Is that the number of rows returned?</div><div><br></div><div>Why is that parameter [avp(i:709)] always empty?</div>
<div><br></div><div>How can i get next_gw() to complete and not fail?</div><div><br></div><div>Thank you so much....</div><div><br></div><div>I am very new to Kamailio and am very interested...</div><div><br></div><div>Kamailio Padawan Learner</div>
<div><br></div><div><br></div><div><br></div><div><br></div>