<DIV>hi bogdan,</DIV>
<DIV>I jus forgot to add the ) in the mail. I've added it. I am using openser 0.9.5 and I also get an error for the "return" command. I've added break in place of return!! hope that works.</DIV>
<DIV>I've also added the column "acl" in subscriber table. But I am not sure about what exactly </DIV>
<DIV>should be the values. I added only integer value like 1 for user allowed to dial only free destinations. </DIV>
<DIV>will that be ok...</DIV>
<DIV>but I still cant figure out why there is a parse error in avp_check!!<BR><BR></DIV><B><I></I></B>
<DIV><B><I></I></B>&nbsp;</DIV>
<DIV><B><I>Bogdan-Andrei Iancu &lt;bogdan@voice-system.ro&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Jayesh,<BR><BR>the command syntax looks ok, but you are missing a ) at the end of the <BR>ifs with :avp_check".<BR><BR>regards,<BR>bogdan<BR><BR>jayesh nambiar wrote:<BR><BR>&gt; hi bogdan,<BR>&gt; Thanks for the help. atleast I got rid of that error but got a new <BR>&gt; error. I am trying to implement the ACL Bitmap example provided in the <BR>&gt; avp_docs. The idea is as follows:<BR>&gt; <BR>&gt; # 1 - free destination<BR>&gt; # 2 - local call<BR>&gt; # 3 - long distance call<BR>&gt; # 4 - international call<BR>&gt; #<BR>&gt; if(uri=~"sip:0900[0-9]+") /* free destinations */<BR>&gt; {<BR>&gt; if (!avp_check("$acl", "and/i:0x01")<BR>&gt; {<BR>&gt; sl_send_reply("403","Forbidden - Free Destinations Not Allowed");<BR>&gt; return;<BR>&gt; };<BR>&gt; } else if(uri=~"sip:0[1-9][0-9]+") {<BR>&gt; if (!avp_check("$acl", "and/i:0x04")<BR>&gt; {<BR>&gt; sl_send_reply("403","Forbidden -
 Long Distance Calls Not Allowed");<BR>&gt; return;<BR>&gt; };<BR>&gt; } else if(uri=~"sip:00[1-9][0-9]+") {<BR>&gt; if (!avp_check("$acl", "and/i:0x08")<BR>&gt; {<BR>&gt; sl_send_reply("403","Forbidden - International Calls Not Allowed");<BR>&gt; return;<BR>&gt; };<BR>&gt; } else {<BR>&gt; if (!avp_check("$acl", "and/i:0x02")<BR>&gt; {<BR>&gt; sl_send_reply("403","Forbidden - Local Calls Not Allowed");<BR>&gt; return;<BR>&gt; };<BR>&gt; };<BR>&gt;<BR>&gt; # authorized<BR>&gt;<BR>&gt; # rewritehostport("gateway_ip:gateway_port");<BR>&gt; rewritehostport("10.10.10.10:5060");<BR>&gt;<BR>&gt; But now I get the following error:<BR>&gt; <BR>&gt; ERROR:avpops:parse_check_value: parse error in <AND i:0x01>pos 3<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: <BR>&gt; ERROR:avpops:fixup_check_avp: failed to parse checked value<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: ERROR: <BR>&gt; fix_expr : fix_actions error<BR>&gt; Sep 29 15:33:31 localhost
 /usr/local/sbin/openser[15481]: Binding <BR>&gt; '2204','sip:2204@192.168.2.20:8484' has expired<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: use_table(): <BR>&gt; Invalid parameter value<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: <BR>&gt; db_del_ucontact: Error in use_table<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: wb_timer(): <BR>&gt; Can't delete contact from the database<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: Binding <BR>&gt; '2207','sip:2207@192.168.2.18:8467' has expired<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: use_table(): <BR>&gt; Invalid parameter value<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: <BR>&gt; db_del_ucontact: Error in use_table<BR>&gt; Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: wb_timer(): <BR>&gt; Can't delete contact from the database<BR>&gt; Is there anything wrong with the expression syntax or there
 could <BR>&gt; be problem with the entry in the table. Can you pls help me figure it out.<BR>&gt; <BR>&gt; thanx in advance.<BR>&gt; jayesh<BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; Yahoo! for Good<BR>&gt; Click here to donate <HTTP: redcross-donate3 store.yahoo.com />to the <BR>&gt; Hurricane Katrina relief effort.<BR>&gt;<BR>&gt;------------------------------------------------------------------------<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;Users mailing list<BR>&gt;Users@openser.org<BR>&gt;http://openser.org/cgi-bin/mailman/listinfo/users<BR>&gt; <BR>&gt;<BR><BR></BLOCKQUOTE><p>
                <hr size=1>Yahoo! for Good<br> 
<a href="http://store.yahoo.com/redcross-donate3/">Click here to donate</a> to the Hurricane Katrina relief effort.