>
> if (is_method("INVITET"))
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.
On Fri, Jun 22, 2012 at 1:15 PM, prasad kelkar <[email protected]> wrote:
> 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
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users