Documentation |
Documentation.Interface-MI-3-6 HistoryHide minor edits - Show changes to markup August 24, 2021, at 11:41 AM
by
- Changed line 133 from:
A simple program in Python to run a MI command in OpenSIPs via XMLRPC protocol: to:
Example of sending a JSON-RPC OpenSIPS MI command from the command-line, using curl: Changed lines 135-138 from:
import xmlrpclib opensips = xmlrpclib.ServerProxy('http://127.0.0.1:8080/RPC2') print opensips.ps(); to:
$ curl -X POST localhost:8888/mi -H 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "id": "1", "method": "ps"}' June 23, 2021, at 06:39 PM
by
- Added lines 45-46:
Changed lines 126-127 from:
A simple example of interacting with OpenSIPS via MI interfaces is the opensipsctl utility - it uses FIFO to push MI commands into OpenSIPS: to:
A simple example of interacting with OpenSIPS via MI interfaces is the opensips-cli utility - it uses FIFO to push MI commands into OpenSIPS: Changed lines 129-130 from:
opensipsctl fifo ps opensipsctl fifo log_level 4 9472 to:
opensips-cli -x mi ps opensips-cli -x mi log_level 4 9472 February 01, 2019, at 05:43 PM
by
- Changed lines 29-40 from:
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. to:
The protocols available in order to connect (from external apps) to the OpenSIPS MI are JSON-RPC over several transports and XML-RPC. While the interface itself (tailored around the JSON format) is provided by the OpenSIPS core, each actual transport protocol is provided by a separate OpenSIPS module. You can load multiple MI modules in order to use multiple MI transport protocols at the same time. The majority of the MI backend modules only provide the transport, while the command parsing and response formatting (as JSON-RPC) is done by the OpenSIPS core. The only exceptions are the mi_html and mi_xmlrpc_ng modules, which use a different format. The available MI modules are :
All protocols do allow multiple applications (clients) to connect at the same time to the MI interface. Changed lines 51-54 from:
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: to:
A few examples of JSON-RPC calls for OpenSIPS: Changed lines 54-56 from:
opensipsctl fifo _mi_cmd_ opensipsctl fifo ps opensipsctl fifo debug 4 to:
{ "jsonrpc": "2.0", "method": "ps", "id": 10 }
{ "jsonrpc": "2.0", "result": { "Processes": [{ "ID": 0, "PID": 9467, "Type": "attendant" }, { "ID": 1, "PID": 9468, "Type": "HTTPD 127.0.0.1:8008" }, { "ID": 3, "PID": 9470, "Type": "time_keeper" }, { "ID": 4, "PID": 9471, "Type": "timer" }, { "ID": 5, "PID": 9472, "Type": "SIP receiver udp:127.0.0.1:5060 " }, { "ID": 7, "PID": 9483, "Type": "Timer handler" }, ] }, "id": 10 }
{ "jsonrpc": "2.0", "method": "log_level", "params": [4, 9472], "id": 11 }
{ "jsonrpc": "2.0", "method": "log_level", "params": { "level": 4, "pid": 9472 }, "id": 11 }
{ "jsonrpc": "2.0", "method": "get_statistics", "params": { "statistics": ["shmem:", "core:"] }, "id": 11 } Changed lines 124-126 from:
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: to:
A simple example of interacting with OpenSIPS via MI interfaces is the opensipsctl utility - it uses FIFO to push MI commands into OpenSIPS: opensipsctl fifo ps opensipsctl fifo log_level 4 9472 A simple program in Python to run a MI command in OpenSIPs via XMLRPC protocol: October 10, 2014, at 01:16 PM
by
- Changed line 4 from:
(:allVersions Interface-MI 3.6:) to:
(:allVersions Interface-MI 3.6 :) March 20, 2014, at 08:54 PM
by
- Changed line 23 from:
The MI commands are provided by the OpenSIPS core (see full list) and also by modules (check the commands provided by each module). to:
The MI commands are provided by the OpenSIPS core (see full list) and also by modules (check the commands provided by each module). March 20, 2014, at 08:53 PM
by
- Added lines 1-63:
Documentation -> Manuals -> Manual devel -> Management Interface(:title Management Interface - 3.6:) (:allVersions Interface-MI 3.6:)
The Management Interface (or MI) is an OpenSIPS interface that allows external applications to trigger predefined commands inside OpenSIPS. OverviewSuch commands typically allows an external app to :
The MI commands are provided by the OpenSIPS core (see full list) and also by modules (check the commands provided by each module). ProtocolsSeveral 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. ExamplesA 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(); |