[SR-Users] p_usrloc registration update problem
Hans Goossens
hans at onsmail.nl
Tue Dec 18 09:18:29 CET 2012
Hi,
I'm testing the p_usrloc module (Kamailio version 3.3.2, installed via ubuntu package) and it looks like it's working but for some reason a re-registration is causing a new entry being added to the distributed location table instead of updating the existing one.
The kamailio configuration looks like this:
#!define DBURL "mysql://openser:openserrw@localhost/openser"
loadmodule "p_usrloc.so"
modparam("p_usrloc", "db_mode", 3)
modparam("p_usrloc", "write_db_url", DBURL)
modparam("p_usrloc", "read_db_url", DBURL)
modparam("p_usrloc", "write_on_db", 1)
modparam("p_usrloc", "alg_location", 1)
modparam("p_usrloc", "reg_db_table", "locdb")
mysql> select * from locdb;
+----+----+-------------------------------------------+--------+--------+---------------------+-------+----+
| id | no | url | status | errors | failover | spare | rg |
+----+----+-------------------------------------------+--------+--------+---------------------+-------+----+
| 1 | 1 | mysql://root:secret@172.16.10.131/openser | 1 | 0 | 1900-01-01 00:00:01 | 0 | 0 |
| 1 | 2 | mysql://root:secret@172.16.10.132/openser | 1 | 0 | 1900-01-01 00:00:01 | 0 | 0 |
+----+----+-------------------------------------------+--------+--------+---------------------+-------+----+
When using the default usrloc functionality everything is working fine. The only difference I noticed is that the default usrloc is using MYSQL UPDATE to update the location entry and that p_usrloc is using MYSQL REPLACE.
Regards
Hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121218/ce10e9c2/attachment-0001.htm>
More information about the sr-users
mailing list