A Janus event handler plugin that writes events to a SQLite database.
Перейти к файлу
Marshall Polaris ca1ee81264 Clean up CoC 2019-04-01 18:18:23 -07:00
src Add event mask configurability 2018-03-29 16:30:51 -07:00
.gitignore Skeleton implementation 2018-03-20 18:46:55 -07:00
.travis.yml Fix up Travis build dependencies, README 2018-03-28 14:33:29 -07:00
CODE_OF_CONDUCT.md Clean up CoC 2019-04-01 18:18:23 -07:00
Cargo.toml Add event mask configurability 2018-03-29 16:30:51 -07:00
LICENSE Tidying things up 2018-03-28 14:24:01 -07:00
Makefile Skeleton implementation 2018-03-20 18:46:55 -07:00
README.md Add event mask configurability 2018-03-29 16:30:51 -07:00
rustfmt.toml Working prototype 2018-03-28 13:42:45 -07:00

README.md

janus-eventhandler-sqlite

Build Status

A simple Janus event handler to record events in a SQLite database on disk.

Configuration

This event handler will read janus.eventhandler.sqlite.cfg from the Janus config directory, if present. Like other Janus configuration, the config file should be in INI format. The following options are configurable in the general section of the config file:

  • enabled = yes|no: Whether this event handler does any work at all. Default yes.
  • db_path = /path/to/sqlite/db: The path to the SQLite DB in which events will be written. The database will be created and initialized if it's not already present. Defaults to events.db.
  • events = 65535: A 32-bit integer bitmask defining which events will be logged. See the Janus source for valid event types. Defaults to all events.

Dependencies

$ sudo apt install libjansson-dev libsqlite3-dev

Building

$ cargo build [--release]

Testing

$ cargo test

Installing

Install the library output by the build process (e.g. ./target/release/libjanus_eventhandler_sqlite.so) into the Janus event handlers directory (e.g. /usr/lib/janus/events). By default, event handlers may not be enabled in your Janus install; check your janus.cfg to make sure broadcast=yes is set in the events section. (If you are doing this for the first time, you might also want to double-check to make sure that there aren't other event handlers installed that you don't need.) Restart Janus to activate.