From openSIPS

Documentation: Management Interface - 2.3

Documentation -> Manuals -> Manual 2.3 -> Management Interface

Pages for other versions: devel 3.4 3.3 3.2 3.1 Older versions: 3.0 2.4 2.3 2.2 2.1 1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4


Management Interface v2.3
PrevNext

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

Overview

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).


Protocols

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 :

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


Examples

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:

#!/usr/bin/python
import xmlrpclib
opensips = xmlrpclib.ServerProxy('http://127.0.0.1:8080/RPC2')
print opensips.ps();
Retrieved from https://www.opensips.org/Documentation/Interface-MI-2-3
Page last modified on October 10, 2014, at 01:16 PM