hello,
I tried following
if (is_method("INVITET"))
{
avp_db_query("select count from load_count where dest='1'","$avp(i:1)");
avp_db_query("select count from load_count where dest='2'","$avp(i:2)");
if ($(avp(i:1){s.int})<$(avp(i:2){s.int})
{
#$avp(i:3)=1+(avp(i:1){s.int};
#avp_db_query("update load_count set count='$(avp(i:3)' where
dest='1';");
avp_op("$avp(i:1)", "add/1/g");
forward("172.29.9.140:5060");
exit;
}
else
{ #$avp(i:3)=1+(avp(i:2){s.int};
#avp_db_query("update load_count set count='$(avp(i:3)' where
dest='2';");
avp_op("$avp(i:2)", "add/1/g");
forward("172.29.9.131:5060");
exit;
}
}
I think there is problem in update query
How to add count?
please help
thank you
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users