Hello,
Thank you very much, I will study this I proposed :-).
Regards
2011/9/5 Daniel-Constantin Mierla <miconda(a)gmail.com>om>:
Hello,
On 9/2/11 8:40 PM, Anto wrote:
Hello
I want to store in a file access and disconnections to the system. To
access (registrar), I thought scheduling a perl script and executed
with the perl module, the problem I find with disconnections. Since
the user can be disconnected for various reasons, had planned to do a
script that runs an SQL table location and according to the expires
field, see if disconnection has occurred or not. Would have to run
this script in cron every X minutes. Is there a simpler way to check
this or have Kamailio some function for it?. Thank you.
un-registration can be done by user (phone) itself (when sending REGISTER
with Expires 0) or because of a timeout of previous registration. The first
one can be caught in config file route block, for the second you either
write a small module and register for callback from usrloc module, or as you
said, monitor the database.
There are other options, for example, using pua_usrloc module to send
PUBLISH requests with online/offline states when there are a
registration/unregistration (including the timeout) events.
In the devel version (upcoming 3.2.0) you can look also to
pua/presence_reginfo modules.
Cheers,
Daniel
--
Daniel-Constantin Mierla --
http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin:
http://asipto.com/u/kat
http://linkedin.com/in/miconda --
http://twitter.com/miconda