[Users] avp error

jayesh nambiar jayesh_1017 at yahoo.com
Thu Sep 29 12:56:39 CEST 2005


hi bogdan,
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.
I've also added the column "acl" in subscriber table. But I am not sure about what exactly 
should be the values. I added only integer value like 1 for user allowed to dial only free destinations. 
will that be ok...
but I still cant figure out why there is a parse error in avp_check!!


 
Bogdan-Andrei Iancu <bogdan at voice-system.ro> wrote:
Jayesh,

the command syntax looks ok, but you are missing a ) at the end of the 
ifs with :avp_check".

regards,
bogdan

jayesh nambiar wrote:

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


		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20050929/397b1873/attachment.htm 


More information about the Users mailing list