Hi All,
I am testing the p_usrloc module in order to write the location information of my kamailo server (Kamailio is on version 4.0.2) in two db
As first test both DB are on the same machine, as well as the master db. On final version master and one db would probably be on the same machine and the second db on a different one.
I have read on the p_usrloc module the following note:
The p_usrloc module still has some missing feature, like automatic expiry of contacts and dumping of all users via the fifo cmd.
And I can sadly see that the locations are not being deleted automatically after expiring.
My users are mobile apps, that are programmed to be always logged in, and reconnecting to sip and IM servers if the devices detects a drop on the connection (bad wi-fi connection), or the user just move between different 3G cells. So the locations are most likely not going to be properly "unregistered" (expire 0)
Have anyone found a solution or can give me some advice on how can I force the expired locations to be erased from the db, just as the usrloc module does?
Thanks in advanced!
Helena
Am Donnerstag, 23. Januar 2014, 16:59:30 schrieb Helena Garcia-Nieto:
I am testing the p_usrloc module in order to write the location information of my kamailo server (Kamailio is on version 4.0.2) in two db
As first test both DB are on the same machine, as well as the master db. On final version master and one db would probably be on the same machine and the second db on a different one.
I have read on the p_usrloc module the following note:
The p_usrloc module still has some missing feature, like automatic expiry of contacts and dumping of all users via the fifo cmd.
And I can sadly see that the locations are not being deleted automatically after expiring. [..] Have anyone found a solution or can give me some advice on how can I force the expired locations to be erased from the db, just as the usrloc module does?
Hallo Helena,
we use just a simple regular job (started with linux standard tools like cron etc..) that deletes regularly all old registrations on the databases. Use plain SQL, "DELETE FROM $table WHERE expires < NOW()" or similar.
Best regards,
Henning Westerholt
Hello Henning
Thanks for the advice!
We probably need to do that! But... there is no module configuration or simple kamailio configuration to do it?
Thanks again!!
Helena
-----Original Message----- From: Henning Westerholt [mailto:hw@kamailio.org] Sent: jueves, 23 de enero de 2014 17:05 To: sr-users@lists.sip-router.org Cc: Helena Garcia-Nieto Subject: Re: [SR-Users] P_usrloc - expired locations
Am Donnerstag, 23. Januar 2014, 16:59:30 schrieb Helena Garcia-Nieto:
I am testing the p_usrloc module in order to write the location information of my kamailo server (Kamailio is on version 4.0.2) in two db
As first test both DB are on the same machine, as well as the master db. On final version master and one db would probably be on the same machine and the second db on a different one.
I have read on the p_usrloc module the following note:
The p_usrloc module still has some missing feature, like automatic expiry of contacts and dumping of all users via the fifo cmd.
And I can sadly see that the locations are not being deleted automatically after expiring. [..] Have anyone found a solution or can give me some advice on how can I force the expired locations to be erased from the db, just as the usrloc module does?
Hallo Helena,
we use just a simple regular job (started with linux standard tools like cron etc..) that deletes regularly all old registrations on the databases. Use plain SQL, "DELETE FROM $table WHERE expires < NOW()" or similar.
Best regards,
Henning Westerholt
Am Donnerstag, 23. Januar 2014, 17:06:12 schrieb Helena Garcia-Nieto:
Thanks for the advice!
We probably need to do that! But... there is no module configuration or simple kamailio configuration to do it?
Hello Helena,
no, there is no module configuration for that. I a big distributed setup there are some scenarios where you e.g. want to stop the deletion of old user contacts. Therefore the isolated solution, as a simple script, to gives you the flexiblity you need.
And besides that, its just easier to implement, as you don't need to keep state with regards to the location data deletion process in Kamailio.
Henning Westerholt
Ok!
Thank you very much for the advice, I'll set up some crontab job for that!
Helena
-----Original Message----- From: Henning Westerholt [mailto:hw@kamailio.org] Sent: jueves, 23 de enero de 2014 17:11 To: Helena Garcia-Nieto Cc: sr-users@lists.sip-router.org Subject: Re: [SR-Users] P_usrloc - expired locations
Am Donnerstag, 23. Januar 2014, 17:06:12 schrieb Helena Garcia-Nieto:
Thanks for the advice!
We probably need to do that! But... there is no module configuration or simple kamailio configuration to do it?
Hello Helena,
no, there is no module configuration for that. I a big distributed setup there are some scenarios where you e.g. want to stop the deletion of old user contacts. Therefore the isolated solution, as a simple script, to gives you the flexiblity you need.
And besides that, its just easier to implement, as you don't need to keep state with regards to the location data deletion process in Kamailio.
Henning Westerholt
Am Donnerstag, 23. Januar 2014, 17:13:11 schrieb Helena Garcia-Nieto:
Ok!
Thank you very much for the advice, I'll set up some crontab job for that!
Hello Helena,
ok, you could implement it with the help of the timer and sqlops module as well. Just before somebody else correct me here. ;-) But its probably easier for you as cron, if you don't know the details of the mentioned modules.
Best regards
Henning Westerholt