R: R: [Users] avp_db_load problem

Daniel-Constantin Mierla daniel at voice-system.ro
Fri Apr 14 19:04:59 CEST 2006



On 04/14/06 15:04, D'Addelfio Davide wrote:
> Hi daniel,
>
> My version is 1.0.x, do you think is  wrong notation?
>   
looks like, please check the readme file for 1.0.x:

http://openser.org/docs/modules/1.0.x/avpops.html

Cheers,
Daniel

> -----Messaggio originale-----
> Da: Daniel-Constantin Mierla [mailto:daniel at voice-system.ro] 
> Inviato: venerdì 14 aprile 2006 13.32
> A: D'Addelfio Davide
> Cc: Jayesh Nambiar; users at openser.org
> Oggetto: Re: R: [Users] avp_db_load problem
>
> Hello,
>
> what version of openser do you use. Looks like you use the avp notation 
> from 1.1.x within a 1.0.x version.
>
> Cheers,
> Daniel
>
>
> On 04/14/06 11:22, D'Addelfio Davide wrote:
>   
>> Hi Jayesh, I have a problem similar at yours, could you help me ?
>>
>>  
>>
>> I need to load data from acc table using avp_db_load. I setup my cfg 
>> file in this way:
>>
>>  
>>
>> modparam("avpops", "db_scheme", 
>> "scheme0:username_col=username;value_col=sip_callid;table=acc")
>>
>>  
>>
>> if (avp_db_load("$to", "$avp(s:sip_callid)/scheme0")) {
>>
>>    xlog("L_INFO","Lettura OK");
>>
>> };
>>
>>  
>>
>> But I have this error in the log:
>>
>>  
>>
>> Apr 14 01:07:55 localhost /usr/sbin/openser[6799]: 
>> ERROR:avpops:parse_avp_db: unknow alias"avp(s:sip_callid)/scheme0"
>>
>> Apr 14 01:07:55 localhost /usr/sbin/openser[6799]: 
>> ERROR:avpops:fixup_db_avp: parse failed Apr 14 01:07:55 localhost 
>> /usr/sbin/openser[6799]: ERROR: fix_expr : fix_actions error
>>
>>  
>>
>> Any thought?
>>
>> Thanks for help
>>
>> Davide
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> *Da:* users-bounces at openser.org [mailto:users-bounces at openser.org] 
>> *Per conto di *Jayesh Nambiar
>> *Inviato:* mercoledì 12 aprile 2006 0.06
>> *A:* openser
>> *Oggetto:* [Users] avp_db_load problem
>>
>>  
>>
>> Hi all,
>>
>> I was trying to do the following:
>>
>> Whenever a user presses *86 and then any number, first openser should 
>> check
>>
>> in the subscriber table, whether the value for features column is 1. 
>> (I've added an extra column features in the table subscriber with 
>> datatype int).
>>
>> If the value is 0, he should be replied with the message Forbidden.
>>
>> I tried doing the following:
>>
>>  
>>
>> modparam("avpops","db_scheme",
>>        "scheme1:username_col=username;value_col=features;table=subscriber")
>>
>>  
>>
>> if(uri=~"sip:\*86[0-9]*@") {
>>                 log(1,"entered condition");
>>                 if(avp_db_load("$fU", "$avp(s:features)/$scheme1")) {
>>                 log(1,"db load succeeded");
>>                 if(!avp_check("$avp(s:features)", "eq/1/g")) {
>>                         sl_send_reply("403", "Forbidden");
>>                         exit;
>>                 };
>>                 strip(3);
>>                 log(1,"stripped");
>>                 avp_db_query("insert into usr_preferences values('', 
>> '$fU', '', 'callfwd', '', '$ruri', 'CURRENT_TIMESTAMP')");
>>                 sl_send_reply("200", "OK");
>>                 exit;
>>         };
>>
>>         };
>>
>> But in the logs I only get "condition succeeded" which means it does 
>> not do the avp_db_load() properly.
>>
>>  
>>
>> Can someone please help me in what should be the exact syntax to load 
>> it from the db and then check the value.
>>
>>  
>>
>> thanks in advance,
>>
>> jayesh
>>
>> ------------------------------------------------------------------------
>>
>> Jiyo cricket on Yahoo! India cricket 
>> <http://us.rd.yahoo.com/mail/in/mailcricket/*http:/in.sports.yahoo.com/cricket/>
>> Yahoo! Messenger Mobile 
>> <http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http:/in.mobile.yahoo.com/new/messenger/> 
>> Stay in touch with your buddies all the time.
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>   
>>     
>
>   




More information about the Users mailing list