# &adminguide;

## Overview

This is a module which provides a FIFO transport layer implementation for the Management Interface.

## FIFO command syntax

The external commands issued via the 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}

## Dependencies

### &kamailio; Modules

The following modules must be loaded before this module:

- No dependencies on other &kamailio; modules.

### External Libraries or Applications

The following libraries or applications must be installed before running &kamailio; with this module loaded:

- none

## Parameters

### `fifo_name` (string)

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

Default value is NONE.

#### Set `fifo_name` parameter

    ...
    modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
    ...

### `fifo_mode` (integer)

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

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

#### Set `fifo_mode` parameter

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

### `fifo_group` (integer) `fifo_group` (string)

System Group to be used for creating the listening FIFO file.

Default value is the inherited one (process group).

#### Set `fifo_group` parameter

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

### `fifo_user` (integer) `fifo_group` (string)

System User to be used for creating the listening FIFO file.

Default value is the inherited one (process user).

#### Set `fifo_user` parameter

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

### `reply_dir` (string)

Directory to be used for creating the reply FIFO files.

Default value is /tmp/

#### Set `reply_dir` parameter

    ...
    modparam("mi_fifo", "reply_dir", "/home/kamailio/tmp/")
    ...

### `reply_indent` (string)

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

Default value is "\t" (TAB).

#### Set `reply_indent` parameter

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

## Functions

No function exported to be used from configuration file.

## Example

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

### FIFO request

    :get_statistics:reply_fifo\n
    dialog:\n
    tm:\n
    \n