<div>Hi all,</div> <div>I was trying to do the following:</div> <div>Whenever a user presses *86 and then any number, first openser should check</div> <div>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).</div> <div>If the value is 0, he should be replied with the message Forbidden.</div> <div>I tried doing the following:</div> <div> </div> <div>modparam("avpops","db_scheme",<BR> "scheme1:username_col=username;value_col=features;table=subscriber")</div> <div> </div> <div>if(uri=~"sip:\*86[0-9]*@") {<BR> log(1,"entered condition");<BR> if(avp_db_load("$fU", "$avp(s:features)/$scheme1"))
{<BR> log(1,"db load succeeded");<BR> if(!avp_check("$avp(s:features)", "eq/1/g")) {<BR> sl_send_reply("403", "Forbidden");<BR> exit;<BR> };<BR> strip(3);<BR>
log(1,"stripped");<BR> avp_db_query("insert into usr_preferences values('', '$fU', '', 'callfwd', '', '$ruri', 'CURRENT_TIMESTAMP')");<BR> sl_send_reply("200", "OK");<BR> exit;<BR> };</div> <div> };<BR></div> <div>But in the logs I only get "condition succeeded" which means it does not do the avp_db_load() properly.</div> <div> </div> <div>Can someone please help me in what should be the exact syntax to load it from the db and then check the value.</div> <div> </div> <div>thanks in advance,</div> <div>jayesh</div><p>
        
        
                <hr size=1>
Jiyo cricket on <a href="http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.com/cricket/">Yahoo! India cricket</a><br>
<a href="http://us.rd.yahoo.com/mail/in/mailmobilemessenger/*http://in.mobile.yahoo.com/new/messenger/">Yahoo! Messenger Mobile</a> Stay in touch with your buddies all the time.