← Volver al índice de módulos

file_out

This is a small module to support fast streaming output to files and process this changes depending on an interval. It implements only one function that streams a chunk of text to the current output f
🛠️ Utilidades y Varios Kamailio 6.1 8 parámetros 2 funciones

Descripción general

This is a small module to support fast streaming output to files and process this changes depending on an interval. It implements only one function that streams a chunk of text to the current output file handle. The module can be used to write logs for up to 10 different log files. Each log file can be configured to have a different name and extension. The processed string can contain pseudo-variables. The module will replace the pseudo-variables with the actual values. The module will also rotate the log files at a specified interval. The interval is specified in seconds. Known limitations on the rotation interval are: * If there is no messages coming, the rotation will not be done until the next message arrives.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/file_out.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/file_out

Parámetros de configuración

ParámetroTipoDescripción
base_folder string 3.2. file (string) 3.3. worker_usleep (int) 3.4. timer_interval (int)
file string 3.3. worker_usleep (int) 3.4. timer_interval (int)
worker_usleep int 3.4. timer_interval (int)
timer_interval int 3.1. base_folder (string)
base_folder string Absolute path to the folder where log files should be saved.
file string The definition of a file and its properties. The value of the parameter may have the following format: * "name=accounting;extension=.out;interval=20;prefix=accounting:"
worker_usleep int The time in microseconds which worker will sleep for until next iteration.
timer_interval int The time in seconds which timer will trigger for rotating the files. Make sure that this value is lower than the interval of the files.

Funciones exportadas

file_out(filename, string)

4.1. file_out(filename, string)

file_out(filename, string)

This function is used to write a string to a file. The file is determined by the filename parameter. The string parameter is the string to be written to the file. Filename is the name of the file defined in the configuration file as name=filename.

Autores y contribuidores

Xenofon KaramanosGILAWA Ltd <xk@gilawa.com>

Copyright © 2024 GILAWA Ltd

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj