<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> </DIV>
<DIV><B><I>Bogdan-Andrei Iancu <bogdan@voice-system.ro></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>> hi bogdan,<BR>> Thanks for the help. atleast I got rid of that error but got a new <BR>> error. I am trying to implement the ACL Bitmap example provided in the <BR>> avp_docs. The idea is as follows:<BR>> <BR>> # 1 - free destination<BR>> # 2 - local call<BR>> # 3 - long distance call<BR>> # 4 - international call<BR>> #<BR>> if(uri=~"sip:0900[0-9]+") /* free destinations */<BR>> {<BR>> if (!avp_check("$acl", "and/i:0x01")<BR>> {<BR>> sl_send_reply("403","Forbidden - Free Destinations Not Allowed");<BR>> return;<BR>> };<BR>> } else if(uri=~"sip:0[1-9][0-9]+") {<BR>> if (!avp_check("$acl", "and/i:0x04")<BR>> {<BR>> sl_send_reply("403","Forbidden -
Long Distance Calls Not Allowed");<BR>> return;<BR>> };<BR>> } else if(uri=~"sip:00[1-9][0-9]+") {<BR>> if (!avp_check("$acl", "and/i:0x08")<BR>> {<BR>> sl_send_reply("403","Forbidden - International Calls Not Allowed");<BR>> return;<BR>> };<BR>> } else {<BR>> if (!avp_check("$acl", "and/i:0x02")<BR>> {<BR>> sl_send_reply("403","Forbidden - Local Calls Not Allowed");<BR>> return;<BR>> };<BR>> };<BR>><BR>> # authorized<BR>><BR>> # rewritehostport("gateway_ip:gateway_port");<BR>> rewritehostport("10.10.10.10:5060");<BR>><BR>> But now I get the following error:<BR>> <BR>> ERROR:avpops:parse_check_value: parse error in <AND i:0x01>pos 3<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: <BR>> ERROR:avpops:fixup_check_avp: failed to parse checked value<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: ERROR: <BR>> fix_expr : fix_actions error<BR>> Sep 29 15:33:31 localhost
/usr/local/sbin/openser[15481]: Binding <BR>> '2204','sip:2204@192.168.2.20:8484' has expired<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: use_table(): <BR>> Invalid parameter value<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: <BR>> db_del_ucontact: Error in use_table<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: wb_timer(): <BR>> Can't delete contact from the database<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: Binding <BR>> '2207','sip:2207@192.168.2.18:8467' has expired<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: use_table(): <BR>> Invalid parameter value<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: <BR>> db_del_ucontact: Error in use_table<BR>> Sep 29 15:33:31 localhost /usr/local/sbin/openser[15481]: wb_timer(): <BR>> Can't delete contact from the database<BR>> Is there anything wrong with the expression syntax or there
could <BR>> be problem with the entry in the table. Can you pls help me figure it out.<BR>> <BR>> thanx in advance.<BR>> jayesh<BR>><BR>> ------------------------------------------------------------------------<BR>> Yahoo! for Good<BR>> Click here to donate <HTTP: redcross-donate3 store.yahoo.com />to the <BR>> Hurricane Katrina relief effort.<BR>><BR>>------------------------------------------------------------------------<BR>><BR>>_______________________________________________<BR>>Users mailing list<BR>>Users@openser.org<BR>>http://openser.org/cgi-bin/mailman/listinfo/users<BR>> <BR>><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.