mi_fifo Module

Table of Contents

1. Admin Guide
1.1. Overview
1.2. FIFO command syntax
1.3. Dependencies
1.3.1. OpenSIPS Modules
1.3.2. External Libraries or Applications
1.4. Exported Parameters
1.4.1. fifo_name (string)
1.4.2. fifo_mode (integer)
1.4.3. fifo_group (integer) fifo_group (string)
1.4.4. fifo_user (integer) fifo_group (string)
1.4.5. reply_dir (string)
1.4.6. reply_indent (string)
1.5. Exported Functions
1.6. Example
2. Contributors
2.1. By Commit Statistics
2.2. By Commit Activity
3. Documentation
3.1. Contributors

List of Tables

2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
2.2. Most recently active contributors(1) to this module

List of Examples

1.1. Set fifo_name parameter
1.2. Set fifo_mode parameter
1.3. Set fifo_group parameter
1.4. Set fifo_user parameter
1.5. Set reply_dir parameter
1.6. Set reply_indent parameter
1.7. FIFO request

Chapter 1. Admin Guide

1.1. Overview

This is a module which provides a FIFO transport layer implementation for Management Interface. It receives the command over a FIFO file and returns the output through the reply_fifo specified.

The module checks every 30 seconds if the FIFO file exists, and if it was deleted, it recreates it. If one wants to force the fifo file recreation, it should send a SIGHUP signal to the MI process PID.

1.2. FIFO command syntax

The external commands issued via FIFO interface must follow the following syntax:

  • request = first_line argument*

  • first_line = ':'command_name':'reply_fifo'\n'

  • argument = (arg_name '::' (arg_value)? ) | (arg_value)

  • arg_name = not-quoted_string

  • arg_value = not-quoted_string | '"' string '"'

  • not-quoted_string = string - {',",\n,\r}

1.3. Dependencies

1.3.1. OpenSIPS Modules

The following modules must be loaded before this module:

  • No dependencies on other OpenSIPS modules.

1.3.2. External Libraries or Applications

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • none

1.4. Exported Parameters

1.4.1. fifo_name (string)

The name of the FIFO file to be created for listening and reading external commands.

Default value is NONE.

Example 1.1. Set fifo_name parameter

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

1.4.2. fifo_mode (integer)

Permission to be used for creating the listening FIFO file. It follows the UNIX conventions.

Default value is 0660 (rw-rw----).

Example 1.2. Set fifo_mode parameter

modparam("mi_fifo", "fifo_mode", 0600)

1.4.3. fifo_group (integer) fifo_group (string)

Group to be used for creating the listening FIFO file.

Default value is the inherited one.

Example 1.3. Set fifo_group parameter

modparam("mi_fifo", "fifo_group", 0)
modparam("mi_fifo", "fifo_group", "root")

1.4.4. fifo_user (integer) fifo_group (string)

User to be used for creating the listening FIFO file.

Default value is the inherited one.

Example 1.4. Set fifo_user parameter

modparam("mi_fifo", "fifo_user", 0)
modparam("mi_fifo", "fifo_user", "root")

1.4.5. reply_dir (string)

Directory to be used for creating the reply FIFO files.

Default value is /tmp/

Example 1.5. Set reply_dir parameter

modparam("mi_fifo", "reply_dir", "/home/opensips/tmp/")

1.4.6. reply_indent (string)

Strings to be used for line indentation. As the MI data structure is tree oriendeted, the depth level will printed as indentation.

Default value is "\t" (TAB).

Example 1.6. Set reply_indent parameter

modparam("mi_fifo", "reply_indent", "    ")

1.5. Exported Functions

No function exported to be used from configuration file.

1.6. Example

This is an example showing the FIFO format for the get_statistics dialog: tm: MI commad: response.

Example 1.7. FIFO request


Chapter 2. Contributors

2.1. By Commit Statistics

Table 2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

 NameDevScoreCommitsLines ++Lines --
1. Bogdan-Andrei Iancu (@bogdan-iancu)54312237231
2. Daniel-Constantin Mierla (@miconda)12102022
3. Liviu Chircu (@liviuchircu)86841
4. Razvan Crainea (@razvancrainea)7415354
5. Henning Westerholt (@henningw)5262109
6. Jerome Martin3133
7. Konstantin Bokarius3125
8. Ovidiu Sas (@ovidiusas)3122
9. Julián Moreno Patiño3111
10. Edson Gellert Schubert310103

All remaining contributors: Dusan Klinec, Walter Doekes (@wdoekes).

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits. Regarding imported patches/code, we do our best to count the work on behalf of the proper owner, as per the "fix_authors" and "mod_renames" arrays in opensips/doc/build-contrib.sh. If you identify any patches/commits which do not get properly attributed to you, please submit a pull request which extends "fix_authors" and/or "mod_renames".

(3) ignoring whitespace edits, renamed files and auto-generated files

2.2. By Commit Activity

Table 2.2. Most recently active contributors(1) to this module

 NameCommit Activity
1. Bogdan-Andrei Iancu (@bogdan-iancu)Oct 2006 - Jun 2018
2. Liviu Chircu (@liviuchircu)Mar 2014 - Jun 2018
3. Razvan Crainea (@razvancrainea)Feb 2012 - Nov 2016
4. Julián Moreno PatiñoFeb 2016 - Feb 2016
5. Dusan KlinecDec 2015 - Dec 2015
6. Walter Doekes (@wdoekes)May 2014 - May 2014
7. Daniel-Constantin Mierla (@miconda)Nov 2006 - Mar 2008
8. Konstantin BokariusMar 2008 - Mar 2008
9. Edson Gellert SchubertFeb 2008 - Feb 2008
10. Ovidiu Sas (@ovidiusas)Feb 2008 - Feb 2008

All remaining contributors: Henning Westerholt (@henningw), Jerome Martin.

(1) including any documentation-related commits, excluding merge commits

Chapter 3. Documentation

3.1. Contributors

Last edited by: Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Razvan Crainea (@razvancrainea), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Jerome Martin.

doc copyrights:

Copyright © 2006 Voice Sistem SRL