<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style>if (is_method("</span><span style><font color="#ff0000">INVITE</font></span><span style>T"))</span> </blockquote>
<div><br></div>What exactly are you trying to do !! what I can understand is that you are trying to keep count of calls routed to a specific destination. I suggest don't reinvent the wheel and look for other modules which do this for you automatically like dialog module with profiles.or load-balancer module.<div>
<br></div><div><br></div><div><div><br><div class="gmail_quote">On Fri, Jun 22, 2012 at 1:15 PM, prasad kelkar <span dir="ltr"><<a href="mailto:durga144@gmail.com" target="_blank">durga144@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hello,<br>
I tried following<br>
if (is_method("INVITET"))<br>
{<br>
avp_db_query("select count from load_count where dest='1'","$avp(i:1)");<br>
avp_db_query("select count from load_count where dest='2'","$avp(i:2)");<br>
if ($(avp(i:1){<a href="http://s.int" target="_blank">s.int</a>})<$(avp(i:2){<a href="http://s.int" target="_blank">s.int</a>})<br>
{<br>
#$avp(i:3)=1+(avp(i:1){<a href="http://s.int" target="_blank">s.int</a>};<br>
#avp_db_query("update load_count set count='$(avp(i:3)' where dest='1';");<br>
avp_op("$avp(i:1)", "add/1/g");<br>
forward("<a href="http://172.29.9.140:5060" target="_blank">172.29.9.140:5060</a>");<br>
exit;<br>
}<br>
else<br>
{ #$avp(i:3)=1+(avp(i:2){<a href="http://s.int" target="_blank">s.int</a>};<br>
#avp_db_query("update load_count set count='$(avp(i:3)' where dest='2';");<br>
avp_op("$avp(i:2)", "add/1/g");<br>
forward("<a href="http://172.29.9.131:5060" target="_blank">172.29.9.131:5060</a>");<br>
exit;<br>
}<br>
<br>
}<br>
<br>
I think there is problem in update query<br>
How to add count?<br>
please help<br>
thank you<br><br><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>