Pre-Submission Checklist

Type Of Change

Checklist:

Description

This pull request is intended to introduce a new, straightforward module that can efficiently stream output to files while also handling changes based on a specific interval. The module contains only one function that streams a chunk of text to the current output file handle associated with the given file index.

It's not 100% completed but the basic features are there. Any reviews and of course naming of the module, much appreciated.


How the module works:

Use the provided function file_out to write any text (including pvs) to a specific file you want.


Example:

Define parameters such as:

# kamailio.cfg
...
loadmodule "file_out.so"
modparam("file_out", "base_folder", "/tmp/kamailio/file_out/")
modparam("file_out", "base_filename", "accounting")
modparam("file_out", "base_filename", "missed_calls")
modparam("file_out","interval_seconds", 600)
modparam("file_out","extension", ".txt")
...

request_route {
...
	file_out("0", "Writing  to accounting.txt file $rm from $fu (IP:$si:$sp)");
	file_out("1", "Writing  to missed_calls.txt file $rm from $fu (IP:$si:$sp)");
...
}

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3741

Commit Summary

File Changes

(7 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3741@github.com>