[OpenSER-Users] AVP Setup

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Jun 6 18:45:43 CEST 2008


Hi Ali,

use avp_db_load("$tU", "$avp(s:disabled)/$scheme1")

See: http://www.openser.org/docs/modules/1.3.x/avpops.html#AEN227

Regards,
Bogdan

Ali Jawad wrote:
>
> 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 ( )
>
> {
>
> 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.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>   





More information about the Users mailing list