Hello,

On 4/1/11 5:21 PM, Ricardo Martinez wrote:

Hello.

I’m having a problems using the avpops with the kamailio version 3.1.2

I have the next configuration:

modparam("avpops", "db_url", "mysql://openser:openserrw@localhost/openser")

modparam("avpops", "avp_table", "usr_preferences")

-----

route[REQINIT]  {

if( !(avp_db_load("pike", "s:ip_origen") && avp_check("s:ip_origen", "eq/$src_ip/gi")) )


you have to use full avp names in the parameters, like $avp(ip_origen) . Note that 's:' is optional now if the name of the avp is string.

Cheers,
Daniel

       {

       …

       }

mysql> select * from usr_preferences;

+----+------+----------+--------+-----------+------+---------------+---------------------+

| id | uuid | username | domain | attribute | type | value | last_modified |

+----+------+----------+--------+-----------+------+---------------+---------------------+

| 1 | pike | 0 | | ip_origen | 0 | 100.20.100.20 | 1900-01-01 00:00:01 |

+----+------+----------+--------+-----------+------+---------------+---------------------+

1 row in set (0.00 sec)

When I try to start kamailio I’m getting the next error :

Apr 1 10:36:08 kamailio[15418]: ERROR: avpops [avpops_parse.c:129]: error - bad avp flags

Apr 1 10:36:08 kamailio[15418]: ERROR: avpops [avpops.c:299]: parse failed

Apr 1 10:36:08 kamailio[15418]: ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:238

Apr 1 10:36:08 kamailio[15418]: ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:263

I can’t find the problem.

Can someone help me?

Regards.

Ricardo.-


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
http://www.asipto.com

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to