On 5/13/07, Jeremy George <jeremy@georgeco.us> wrote:
Bogdan,

  Thank you very much.  I'm a step closer, but I've still got something
wrong.  This code:

modparam("avpops", "avp_url", "mysql://openser:<XXX>@localhost/openser2")
modparam("avpops", "avp_table", "usr_preferences")

route {

   if (avp_db_load("$ru/username", "$avp(s:anonreject)")) {

      if (avp_check("$avp(s:anonreject)", "eq/y/i)") &&

This the Error ...
 second parameter is wrong argument to avp_check,
that it should be like eq/s:y/i

And the Type attribute in usr_preferences table...
                    it Should be the " 1 " type=0 ;
                   String to Integer.....

 

       search("^(f|F)rom:.*(a|A)nonymous")) {

       avp_delete("$avp(s:anonreject)");
    };
  };
}

yields these error messages:

WARNING: no fork mode
0(3491) init_tcp: using epoll_lt as the io watch method (auto detected)
0(0) INFO: statistics manager successfully initialized
0(0) StateLess module - initializing
0(0) TM - initializing...
0(0) ACC - initializing
0(0) Maxfwd module- initializing
0(0) INFO:ul_init_locks: locks array size 512
0(0) AUTH module - initializing
0(0) AUTH_DB module - initializing
0(0) TextOPS - initializing
0(0) EXEC - initializing
0(0) AVPops - initializing
0(0) ERROR:avpops:parse_check_value: unknown flag <)>
0(0) ERROR:avpops:fixup_check_avp: failed to parse checked value
0(0) ERROR: fix_actions: fixing failed (code=-1) at cfg line 74
0(0) ERROR: fix_expr : fix_actions error
ERROR: error -1 while trying to fix configuration
0(0) INFO:mi_fifo:mi_destroy: process hasn't been created -> nothing to
kill

  Thanks for the help; I appreciate it.

- Jeremy


-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]
Sent: Thursday, May 10, 2007 12:05 PM
To: Jeremy George
Cc: users@openser.org
Subject: Re: [Users] avp question

Hi Jeremy,

For openser 1.2 it will be:

        if (avp_db_load("$ru/username", "$avp(s:anonreject)")) {
           if (avp_check("$avp(s:anonreject)", "eq/y/i)") &&
search("^(f|F)rom:.*(a|A)nonymous")) {
              avp_delete("$avp(s:anonreject)");


regards,
bogdan

PS: see http://www.openser.org/docs/modules/1.2.x/avpops.html

Jeremy George wrote:
>   Can someone help me with translating this ser config snippet to openser?
> Thanks.
>
>         if (avp_db_load("$ruri/username", "s:anonreject")) {
>            if (avp_check("s:anonreject", "eq/y/i)") &&
> search("^(f|F)rom:.*(a|A)nonymous")) {
>               avp_delete("$avp(s:anonreject)");
>
> - Jeremy
>
>
> _______________________________________________
> Users mailing list
> Users@openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>




_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users



--
Thanks &Regards
Ravi Prakash Sunkara