Thanks for the tips!
I guess I could also use JSON RPC to read the event log, that would work with standard firmware, which is always a benefit.
I played with the eventslog command but I can't find documentation other than the --help usage.
Filtering with -n or --type doesn't seem to work. (It doesn't recognize the long option at all!)
This seems to do the trick:
eventslog -p -t EVENTS -q "WHERE NAME='Call'"
But is there a way to limit results to e.g. *last* ten lines (without piping the output to other tools, this is not possible over JSON RPC or is it)?
Using the limit option e.g. -l 10 gives the *first* ten lines.
I also tried negative numbers, -l "-10" and -l "-10,10", didn't work.
When the number of calls in log grows, it could eventually cause problems. Although realistically the log probably rotates before there are too many calls recorded.
EDIT: Figured this out already. This can be done with the db query.
E.g. "WHERE NAME='Call' ORDER BY Time DESC LIMIT 10" would output the last 10 entries, although in descending order (sub-queries to re-order is not possible?).
Or, if I have saved the timestamp of the last call event I have read, I could query new ones in ascending order: "WHERE NAME='Call' AND Time > 1234567890"