[SR-Users] Bad AVP Flags When Using avp_db_load()

Simpson Chua simpsonchua at yahoo.com
Tue Mar 13 17:05:09 CET 2012


Hi,

I'm trying to use avp_db_load to check for some IPs but I'm getting bad avp flags errors. As far as I understand, the syntax is correct. 

TableName: labservers
uuid   username    domain      attribute          value            type
""      ""       "domain1"    "lab1"      "192.168.55.1"        0 
""      ""       "domain1"    "lab1"      "192.168.55.2"        0 
""      ""    "domain2"    "lab2"      "192.168.55.3"        0 
""      ""    "domain2"    "lab2"      "192.168.55.4"        0 

if ((avp_db_load("$ruri/domain","s:lab1/labservers") && avp_check("s:lab1", "eq/$Ri/gi"))) {
# Do something

}


Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2857]: RV fixing type 3
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2865]: RV is str: "REGISTER"
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [route.c:506]: right EXP optimized: op10(O51, _ST22_) => op10(O51, _ST1_)
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: DEBUG: <core> [route.c:929]: fixing avp_db_load()
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: avpops [avpops_parse.c:129]: error - bad avp flags
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: avpops [avpops.c:299]: parse failed
Mar 13 10:55:24 ubuntu /usr/local/sbin/kamailio[12012]: ERROR: <core> [route.c:1216]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio//kamailio.cfg:71

Line 71 is the "if" statement above. Could someone see could be the issue?

Thanks,
Simpson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120313/d84d561e/attachment.htm>


More information about the sr-users mailing list