MI_FIFO module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “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.
FIFO command syntax
Section titled “FIFO command syntax”The external commands issued via FIFO interface must follow the following syntax: request = ’:‘(reply_fifo)?’:‘jsonrpc_command
If the reply_fifo is missing, the MI FIFO module will not send any reply back. A similar behavior happens when the jsonrpc_command does not contain the id element, and the command is considered a JSON-RPC notification.
Values Returned
Section titled “Values Returned”In case of success, a valid JSON-RPC response is replied back on the fifo file, containing a successful JSON-RPC response.
In case of failure of the MI command, a JSON-RPC reply error is sent back over the reply fifo file.
If case of an error generated by the MI engine, mostly internal errors, an error cause is sent back over the reply FIFO in plain text.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module:
- No dependencies on other OpenSIPS modules.
External Libraries or Applications
Section titled “External Libraries or Applications”The following libraries or applications must be installed before running OpenSIPS with this module loaded:
- none
Exported Parameters
Section titled “Exported Parameters”fifo_name (string)
Section titled “fifo_name (string)”The name of the FIFO file to be created for listening and reading external commands.
Default value is “/tmp/opensips_fifo”.
...modparam("mi_fifo", "fifo_name", "/tmp/opensips_b2b_fifo")...fifo_mode (integer)
Section titled “fifo_mode (integer)”Permission to be used for creating the listening FIFO file. It follows the UNIX conventions.
Default value is 0660 (rw-rw----).
...modparam("mi_fifo", "fifo_mode", 0600)...fifo_group (integer) fifo_group (string)
Section titled “fifo_group (integer) fifo_group (string)”Group to be used for creating the listening FIFO file.
Default value is the inherited one.
...modparam("mi_fifo", "fifo_group", 0)modparam("mi_fifo", "fifo_group", "root")...fifo_user (integer) fifo_group (string)
Section titled “fifo_user (integer) fifo_group (string)”User to be used for creating the listening FIFO file.
Default value is the inherited one.
...modparam("mi_fifo", "fifo_user", 0)modparam("mi_fifo", "fifo_user", "root")...reply_dir (string)
Section titled “reply_dir (string)”Directory to be used for creating the reply FIFO files.
Default value is “/tmp/“
...modparam("mi_fifo", "reply_dir", "/home/opensips/tmp/")...pretty_printing (int)
Section titled “pretty_printing (int)”Indicates whether the JSONRPC responses sent through MI should be pretty-printed or not.
Default value is “0 - no pretty-printing”.
...modparam("mi_fifo", "pretty_printing", 1)...trace_destination (string)
Section titled “trace_destination (string)”Trace destination as defined in the tracing module. Currently the only tracing module is proto_hep. This is where traced mi messages will go.
**WARNING:**A tracing module must be loaded in order for this parameter to work. (for example proto_hep).
Default value is none(not defined).
...modparam("proto_hep", "trace_destination", "[hep_dest]10.0.0.2;transport=tcp;version=3")
modparam("mi_fifo", "trace_destination", "hep_dest")...trace_bwlist (string)
Section titled “trace_bwlist (string)”Filter traced mi commands based on a blacklist or a whitelist. trace_destination must be defined for this parameter to have any purpose. Whitelists can be defined using ‘w’ or ‘W’, blacklists using ‘b’ or ‘B’. The type is separate by the actual blacklist by ’:’. The mi commands in the list must be separated by ’,’.
Defining a blacklists means all the commands that are not blacklisted will be traced. Defining a whitelist means all the commands that are not whitelisted will not be traced. WARNING: One can’t define both a whitelist and a blacklist. Only one of them is allowed. Defining the parameter a second time will just overwrite the first one.
Default value is none(not defined).
...## blacklist ps and which mi commands## all the other commands shall be tracedmodparam("mi_fifo", "trace_bwlist", "b: ps, which")...## allow only sip_trace mi command## all the other commands will not be tracedmodparam("mi_fifo", "trace_bwlist", "w: sip_trace")...Exported Functions
Section titled “Exported Functions”No function exported to be used from configuration file.
Example
Section titled “Example”This is an example showing the FIFO format for the “get_statistics dialog: tm:” MI commad: response.
:reply_fifo:{"jsonrpc":"2.0","method":"get_statistics","id":"5672","params":[["dialog:","tm:"]]}Contributors
Section titled “Contributors”By Commit Statistics
Section titled “By Commit Statistics”Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
| # | Name | DevScore | Commits | Lines++ | Lines— |
|---|---|---|---|---|---|
| 1. | Bogdan-Andrei Iancu (@bogdan-iancu) | 65 | 37 | 2437 | 396 |
| 2. | Razvan Crainea (@razvancrainea) | 43 | 20 | 584 | 1074 |
| 3. | Liviu Chircu (@liviuchircu) | 17 | 14 | 49 | 88 |
| 4. | Daniel-Constantin Mierla (@miconda) | 12 | 10 | 20 | 22 |
| 5. | Stefan Darius (@dariusstefan) | 10 | 4 | 363 | 77 |
| 6. | Ionut Ionita (@ionutrazvanionita) | 7 | 4 | 228 | 39 |
| 7. | Maksym Sobolyev (@sobomax) | 5 | 3 | 16 | 18 |
| 8. | Henning Westerholt (@henningw) | 5 | 2 | 62 | 109 |
| 9. | Zero King (@l2dy) | 3 | 1 | 5 | 3 |
| 10. | Jerome Martin | 3 | 1 | 3 | 3 |
All remaining contributors: Walter Doekes (@wdoekes), Konstantin Bokarius, Ovidiu Sas (@ovidiusas), Alexey Vasilyev (@vasilevalex), Peter Lemenkov (@lemenkov), Julián Moreno Patiño, Edson Gellert Schubert, Dusan Klinec (@ph4r05), Vlad Patrascu (@rvlad-patrascu).
(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
(3) ignoring whitespace edits, renamed files and auto-generated files
By Commit Activity
Section titled “By Commit Activity”| # | Name | Commit Activity |
|---|---|---|
| 1. | Stefan Darius (@dariusstefan) | Jun 2026 - Jul 2026 |
| 2. | Razvan Crainea (@razvancrainea) | Feb 2012 - Jun 2026 |
| 3. | Liviu Chircu (@liviuchircu) | Mar 2014 - May 2024 |
| 4. | Maksym Sobolyev (@sobomax) | Feb 2021 - Feb 2023 |
| 5. | Alexey Vasilyev (@vasilevalex) | Mar 2022 - Mar 2022 |
| 6. | Bogdan-Andrei Iancu (@bogdan-iancu) | Oct 2006 - Apr 2021 |
| 7. | Zero King (@l2dy) | Mar 2020 - Mar 2020 |
| 8. | Peter Lemenkov (@lemenkov) | Jun 2018 - Jun 2018 |
| 9. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - May 2017 |
| 10. | Ionut Ionita (@ionutrazvanionita) | Jan 2017 - Feb 2017 |
All remaining contributors: Julián Moreno Patiño, Dusan Klinec (@ph4r05), Walter Doekes (@wdoekes), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Ovidiu Sas (@ovidiusas), Henning Westerholt (@henningw), Jerome Martin.
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Alexey Vasilyev (@vasilevalex), Liviu Chircu (@liviuchircu), Peter Lemenkov (@lemenkov), Ionut Ionita (@ionutrazvanionita), Bogdan-Andrei Iancu (@bogdan-iancu), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Jerome Martin.
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0