https://github.com/mozilla/janus-eventhandler-sqlite
A Janus event handler plugin that writes events to a SQLite database.
https://github.com/mozilla/janus-eventhandler-sqlite
janus janus-gateway
Last synced: 4 months ago
JSON representation
A Janus event handler plugin that writes events to a SQLite database.
- Host: GitHub
- URL: https://github.com/mozilla/janus-eventhandler-sqlite
- Owner: mozilla
- License: mpl-2.0
- Created: 2018-03-28T20:37:10.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-10T13:58:12.000Z (about 2 years ago)
- Last Synced: 2025-02-02T12:31:17.228Z (4 months ago)
- Topics: janus, janus-gateway
- Language: Rust
- Size: 15.6 KB
- Stars: 16
- Watchers: 17
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# janus-eventhandler-sqlite
[](https://travis-ci.org/mozilla/janus-eventhandler-sqlite)
A simple [Janus][] [event handler][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][Janus event definitions] 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.[Janus]: https://janus.conf.meetecho.com/
[Janus event handler]: https://janus.conf.meetecho.com/docs/group__eventhandlerapi.html
[Janus event definitions]: https://github.com/meetecho/janus-gateway/blob/master/events/eventhandler.h#L128