Hi Ali,
On 09/05/2012 07:18 AM, Ali Jawad wrote:
Is it possible to store user logon/logout dates + user agent used. I know that the info is in the location table but it is not persistent, and I am using the accounting table to store calls. But I am not sure there is a way to store logon/logout/user agent.
By "logon" and "logout" I assume you are referring to registration, not something else.
You can capture a REGISTER request in the main request route and call a SQL operation via 'sqlops' to store that timestamp ($Ts) wherever you want.
There is no such thing as an "unregistration", technically, just a REGISTER request with an ;expires=0 parameter in the Contact header, or an Expires: 0 header. If you look for those parameters in your processing of the REGISTER request, e.g.
if((is_present_hf("Expires") && $hdr(Expires) == "0") || $hdr(Contact) =~ "expires=0")
you can store those times, too.
-- Alex