[Users] Avpops Module

Klaus Darilion klaus.mailinglists at pernau.at
Mon Nov 28 11:46:52 CET 2005


from my config:

# we do never read from the default AVP table, thus we define a dummy
# table which will never be used (and does not even exist)
modparam("avpops", "avp_table", "dummy")


klaus


Elena Ramona Modroiu wrote:
> Hi Douglas,
> 
> I haven't got it right first time. Yes, setting avp_table parameter is 
> mandatory, it is the default table to be used when scheme is not used 
> or  when the name of the table is not given explicitely to the 
> avp_db_load(). See also: 
> http://voice-system.ro/docs/avpops/ar01s05.html#avp_table.
> 
> Bye,
> Ramona
> 
> Douglas Garstang wrote:
> 
>> Elena,
>>
>> My parameters to avp_db_load, as requested, are:
>>
>> modparam("avpops","avp_url","mysql://openser:openserrw@localhost/openser") 
>>
>> ...
>> modparam("avpops","db_scheme",
>>        
>> "scheme1:uuid_col=uuid;value_col=phone;value_type=string;table=subscriber") 
>>
>>
>> The columns uuid, and phone are valid columns from the subscriber table.
>>
>> This causes the following to be logged to syslog on openser startup:
>> Nov 27 23:53:08 ser1 openser[2085]: Maxfwd module- initializing Nov 27 
>> 23:53:08 ser1 openser[2085]: AVPops - initializing Nov 27 23:53:08 
>> ser1 openser[2085]: ERROR:avpops_init: "AVP_DB" present but 
>> "AVP_TABLE" found empty Nov 27 23:53:08 ser1 openser[2085]: 
>> init_mod(): Error while initializing module avpops
>> I did base it on the example from the avpops tutorial. I don't 
>> understand why this error is generated. I thought the whole point of 
>> using db_scheme was that you didn't have to call modparam on the table 
>> name (as well as the uuid, attribute columns etc).
>>
>> I could really do with a little help!
>>
>> Thanks.
>> Douglas.
>>
>>
>>     -----Original Message-----     From: Elena Ramona Modroiu 
>> [mailto:ramona at voice-system.ro]     Sent: Sun 11/27/2005 4:26 PM 
>>     To: Douglas Garstang     Cc: users at openser.org     Subject: Re: 
>> [Users] Avpops Module
>>     
>>     
>>
>>     Hi,
>>     
>>     Douglas Garstang wrote:
>>     
>>     >I swear, getting OpenSER to do anything is worse than pulling teeth.
>>     >     >
>>     :)
>>     
>>     >
>>     >The avpops module documentation at:
>>     >http://www.openser.org/docs/modules/1.0.x/avpops.html#AEN165
>>     >
>>     >has the following example under the db_scheme command:
>>     >...
>>     >modparam("avpops","db_scheme",
>>     >"scheme1:table=subscriber;uuid_column=uuid;value_column=first_name")
>>     >...
>>     >
>>     >which causes the following error to be reported in syslog.conf:
>>     >Nov 27 14:24:52 ser1 openser: ERROR:avpops:parse_avp_sb_scheme: 
>> unknown attribute <uuid_column>
>>     >Nov 27 14:24:52 ser1 openser: ERROR:avpops:avp_add_db_scheme: 
>> falied to parse scheme
>>     >Nov 27 14:24:52 ser1 openser: parse error (102,3-4): Can't set 
>> module parameter
>>     >
>>     >Why?
>>     >     >
>>     Thanks for reporting this, docs will be updated.
>>     
>>     >
>>     >The example at the 'alleged' tutorial at:
>>     >http://www.voice-system.ro/docs/avpops/
>>     >
>>     >which is just the docs at openser.org cut and pasted mostly has 
>> this example:
>>     >...
>>     >modparam("avpops","db_scheme",
>>     >"scheme1:uuid_col=uid;value_col=job;value_type=string;table=emp")
>>     >...
>>     >
>>     >which does not generate any errors in syslog.
>>     >HOWEVER, when avp_db_load() is called, the following is logged to 
>> syslog.conf:
>>     >
>>     >Nov 27 14:21:42 ser1 openser[2424]: ERROR:avpops_init: "AVP_DB" 
>> present but "AVP_TABLE" found empty
>>     >Nov 27 14:21:42 ser1 openser[2424]: init_mod(): Error while 
>> initializing module avpops
>>     >
>>     >Why??? The docs say I can use dbscheme to use a non standard AVP 
>> table, which is what I am trying to do, namely the subscriber table. 
>> If I can use dbscheme to define the columns from another table, why is 
>> OpenSER complaining that I haven't called 
>> modparam("avpops","avp_table","avptable")?????
>>     >     >
>>     What are the parameters of avp_db_load() in your case? Maybe this
>>     example (also from avpops tutorial) helps you:
>>     
>>     modparam("avpops","db_scheme",
>>             
>> "scheme1:uuid_col=uid;value_col=job;value_type=string;table=emp")
>>                avp_db_load("$uuid","s:jobs/*$scheme1*");
>>     - load from table 'emp', using 'uid' column as uuid and       
>> 'job' column as string value into AVP name 'jobs'
>>     
>>     
>>     Bye,
>>     Ramona
>>     
>>     >Doug.
>>     >
>>     >
>>     >
>>     >
>>     >
>>     >
>>     >
>>     >     >
>>     >------------------------------------------------------------------------ 
>>
>>     >
>>     >_______________________________________________
>>     >Users mailing list
>>     >Users at openser.org
>>     >http://openser.org/cgi-bin/mailman/listinfo/users
>>     >     >
>>     
>>     
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>  
>>
> 
> 
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
> 
> 





More information about the sr-users mailing list