[OpenSER-Users] AVP Setup

Ali Jawad ali.jawad at splendor.net
Fri Jun 6 13:19:00 CEST 2008


Dear All

 

I am trying to do the following:

 

I want to enable/disable users, to do that I added a column named status
to the subscribers table. It contains a string saying enabled or
disabled. I did add the following info to the config file.

 

# ----- AVP params --------

modparam("avpops", "avp_url",
"mysql://openser:0o0o0o0o0@xx.xx.xx.xx/openser")

modparam("avpops","avp_table","subscriber")

modparam("avpops","db_scheme",
"scheme1:username_col=username;value_col=status;value_type=string;table=
subscriber")

 

And in the route statement I added "This is a sample provided by
MPWizard..thanks for that" however it apparently needs some changes to
work for me.

 

if (avp_db_load("$tU", "$avp(s:disabled)"))

{

  xlog("L_INFO", "User is local but disabled, denying registration")

}

 

The error I get in the log file is as follows:

 

Jun  6 11:20:38 [21919] ERROR:mysql:db_mysql_submit_query: driver error:
Unknown column 'value' in 'field list'

Jun  6 11:20:38 [21919] ERROR:mysql:db_mysql_query: error while
submitting query

Jun  6 11:20:38 [21919] ERROR:avpops:ops_dbload_avps: db_load failed

 

Any suggestions please.

 

Thanks to all of you guys. For all the support now and before ..you
rock.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20080606/ed04ef69/attachment.htm 


More information about the Users mailing list