[OpenSIPS-Users] to connect mysql using avpops

prasad kelkar durga144 at gmail.com
Tue Jun 19 12:16:14 CEST 2012


hello,
I tried following in route script.

route{

    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_check("$avp(i:1)", "eq/1/i"))
    {
        avp_db_query("update load_count set count='0' where dest='1';");

        forward("172.29.9.140:5060");
        #forward();
        exit();
    }
    else
    {    avp_db_query("update load_count set count='1' where dest='1';");

       # forward();
        forward("172.29.9.136:5060");
        exit;
    }
    }
   }

only else part is working. All calls are forwarded to 136 only.
I think it is not modifying database or its not persistent.
Please tell if that update query is correct and anything else i have to do
to make db persistent?
thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120619/b65ba8e5/attachment.htm>


More information about the Users mailing list