OK, I am running into some errors when starting my script:<br><br>if(to_gw(&quot;1&quot;)){<br>    force_send_socket(X.X.X.180:5060);<br>}else if(to_gw(&quot;3&quot;)){<br>    force_send_socket(X.X.X.179:5060);<br>}else if(to_gw(&quot;4&quot;)){<br>
    force_send_socket(X.X.X.189:5060);<br>}<br><br>Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]: ERROR:core:pv_parse_spec: bad parameters<br>Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]: ERROR:core:fixup_pvar: parsing of pseudo variable 1 failed!<br>
Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]: ERROR:core:fix_actions: fixing failed (code=-1) at cfg line 348<br>Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]: CRITICAL:core:fix_expr: fix_actions error<br>
Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]: ERROR:core:main: failed to fix configuration with err code -1<br><br><br>Perhaps I an confused about how the to_gw() function of the LCR module is to be used.  In my &quot;gw&quot; table, I have gateways with grp_id 1, 3, and 4.  I am assuming that is the value I should be checking for in the to_gw() function, but it seems to be expecting a pseudo variable or something.<br>
<br>What am I missing?<br><br>Thanks!<br><br><br><br><br><div class="gmail_quote">On Fri, Jun 25, 2010 at 4:31 PM, Geoffrey Mina <span dir="ltr">&lt;<a href="mailto:geoffreymina@gmail.com">geoffreymina@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The only reason I would choose to keep the values at the top is because I have 4 machines which all need a copy of the script.... but would need the IP changed per machine.  Since the IP will be referenced in both REQUEST_ROUTE and FAILURE_ROUTE, i just figured it was easier to store in a PV instead of having to change it 2 places for each machine.<br>

<br>Thanks.<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Jun 25, 2010 at 4:12 PM, Juha Heinanen <span dir="ltr">&lt;<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Geoffrey Mina writes:<br>
<br>
&gt; modparam(&quot;pv&quot;,&quot;shvset&quot;,&quot;gw_one=s:<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a>&quot;)<br>
&gt; modparam(&quot;pv&quot;,&quot;shvset&quot;,&quot;gw_two=s:<a href="http://1.1.1.2:5060" target="_blank">1.1.1.2:5060</a>&quot;)<br>
&gt;<br>
&gt; route{<br>
&gt;<br>
&gt;   load_gws();<br>
&gt;   next_gw();<br>
&gt;<br>
&gt;   if(to_gw(&quot;1&quot;)){<br>
&gt;       force_send_socket($shv(gw_one));<br>
&gt;    }else if(to_gw(&quot;2&quot;)){<br>
&gt;       force_send_socket($shv(gw_two));<br>
&gt;   }<br>
&gt;<br>
&gt; }<br>
<br>
</div>force_send_socket does what do want to do, but i don&#39;t know if it<br>
accepts pv argument.  also, i don&#39;t see why you need to use pv argument,<br>
rather than write force_send_socket(<a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a>), etc.<br>
<font color="#888888"><br>
-- juha<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>