[Users] avp error
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Sep 29 12:34:55 CEST 2005
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 <and/i:0x01> 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 <http://store.yahoo.com/redcross-donate3/> to the
> Hurricane Katrina relief effort.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list