[OpenSER-Users] Error when using avp_db_load: "avpops:dbrow2avp: wrong field types in dbrow"

Noel R. Morais noelrocha at gmail.com
Thu Apr 17 03:44:15 CEST 2008


Hi all,

 I'm trying to load some attributes from DB to an avp and check if the
 value is greater than 0 (zero). I'm trying to limit the max sessions
 per user at domain. But when I execute "avp_db_load(..)" I get the error:
 "avpops:dbrow2avp: wrong field types in dbrow".
 I'm using unixodbc with oracle as DBRMs. The table DDL is:
 UUID(VARCHAR2), USERNAME(VARCHAR2), DOMAIN(VARCHAR2),
 ATTRIBUTE(VARCHAR2), VALUE(VARCHAR2), TYPE(NUMBER)

 Follow bellow the source:

  if (method == "REGISTER") {
      if ( avp_db_load("$fu","$avp(s:maxsessions)/avp_user_attributes")
 && avp_check("$avp(s:maxsessions)", "gt/0/g") ) {
        save("location") ;
        return;
      } else {
        sl_send_reply("503", "Service Unavailable");
        return;
      }
    }


 I've checked the AVP source and the field types seems to be ok. I
 don't what to do.

 Thanks in advance,

 Noel

 ps: Sorry about the poor English




More information about the sr-users mailing list