We have people in our office that use softphones to connect to our Asterisk system. The softphones are online when they are in the office, and offline when they are not. So the Reachable/UNREACHABLE notices in the log are an accurate enough representation for us to determine when someone is "logged in" or "logged out."
I want to build a reporting system to generate how long users were available, but I'm not sure of the best way to get the data.
I could poll the logs; run a cron job occasionally that would parse through the log looking for these occurrences, and then log them. I don't particularly care for this option, but will use it if it's the only one available.
Ideally, Asterisk would have some sort of event or trigger that I could tie into that would kick off some script that I'd write which would log the event into a database. Is there anything like that? My searches haven't revealed anything.