Documentation.Interface-MI-1-8 History

Show minor edits - Show changes to markup

August 05, 2013, at 04:17 PM by -
Changed line 4 from:

Page for other versions: devel 1.9 1.8 old versions: 1.7 1.6 1.5 1.4


(:allVersions Interface-MI 1.8:)

June 13, 2013, at 03:51 PM by -
Changed line 10 from:
May 29, 2013, at 02:23 AM by -
Added lines 1-63:
Documentation -> Manuals -> Manual 1.8 -> Management Interface

(:title Management Interface - ver 1.8 :)

Page for other versions: devel 1.9 1.8 old versions: 1.7 1.6 1.5 1.4

Management Interface v1.8

The Management Interface (or MI) is an OpenSIPS interface that allows external applications to trigger predefined commands inside OpenSIPS.


Such commands typically allows an external app to :

  1. push data into OpenSIPS (like setting debug level, registering a contact, etc)
  2. fetch data from OpenSIPS (see registered users, see ongoing calls, get statistics, etc)
  3. trigger an internal action in OpenSIPS (reloading data, sending a message, etc)

The MI commands are provided by the OpenSIPS core (see full list) and also by modules (check the commands provided by each module).


Several protocols are available in order to connect (from external apps) to the OpenSIPS MI . While the interface itself is provided by OpenSIPS core, each protocol is provided by a separate OpenSIPS module. You can load multiple MI modules in order to use multiple MI protocols in the same time.

Available protocols are :

  • mi_fifo - protocol is text oriented (see the syntax in the module documentation), communications is done via a FIFO file; OpenSIPS reads from a predefined FIFO file, where the external apps are writing down the MI commands. As the file is actually as stream of data, there is no restrictions here on the amount of data OpenSIPS may return (when fetching data from OpenSIPS)
  • mi_datagram - protocol is text oriented, similar for fifo (see the syntax in the module documentation), communication is done either via UNIX SOCKETS , either via UDP packages ; OpenSIPS listens for MI commands on UDP port(s) or unisock files; The transported data is limited to the size of a Datagram (65K).
  • mi_xmlrpc - protocol is XMLRPC (XML over HTTP). As TCP is used, there is no limit in regards to the amount of transfered data.

All protocols do allow multiple applications (clients) to connect in the same time to the MI interface.


A simple example of interacting with OpenSIPS via MI interfaces is when using the opensipsctl utility - it uses FIFO or XMLRPC protocols to push MI commands into OpenSIPS.

The 'opensipsctl utility allows you explicitly run an MI command via the FIFO file:

    opensipsctl fifo _mi_cmd_
    opensipsctl fifo ps
    opensipsctl fifo debug 4

or it internally and transparently uses MI command them when providing different or more complex functionalities.

A simple program in Python to trigger to run a MI command in OpenSIPs via XMLRPC protocol:

import xmlrpclib
opensips = xmlrpclib.ServerProxy('')

Page last modified on August 05, 2013, at 04:17 PM