mirror of https://github.com/sipwise/kamailio.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
3.0 KiB
154 lines
3.0 KiB
MI_RPC Module
|
|
|
|
Daniel-Constantin Mierla
|
|
|
|
asipto.com
|
|
<miconda@gmail.com>
|
|
|
|
Edited by
|
|
|
|
Daniel-Constantin Mierla
|
|
|
|
<miconda@gmail.com>
|
|
|
|
Copyright © 2009 http://www.asipto.com
|
|
__________________________________________________________________
|
|
|
|
Table of Contents
|
|
|
|
1. Admin Guide
|
|
|
|
1. Overview
|
|
2. Dependencies
|
|
|
|
2.1. Kamailio Modules
|
|
2.2. External Libraries or Applications
|
|
|
|
3. Parameters
|
|
|
|
3.1. rpc_url (string)
|
|
|
|
4. Functions
|
|
5. Exported RPC commands
|
|
|
|
5.1. mi mi_dg mi_fifo mi_xmlrpc
|
|
|
|
6. MI Commands
|
|
|
|
6.1. rpc
|
|
|
|
List of Examples
|
|
|
|
1.1. Set rpc_url parameter
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
Table of Contents
|
|
|
|
1. Overview
|
|
2. Dependencies
|
|
|
|
2.1. Kamailio Modules
|
|
2.2. External Libraries or Applications
|
|
|
|
3. Parameters
|
|
|
|
3.1. rpc_url (string)
|
|
|
|
4. Functions
|
|
5. Exported RPC commands
|
|
|
|
5.1. mi mi_dg mi_fifo mi_xmlrpc
|
|
|
|
6. MI Commands
|
|
|
|
6.1. rpc
|
|
|
|
1. Overview
|
|
|
|
The module exports a RPC command to execute MI commands and an MI
|
|
command to run RPC commands.
|
|
|
|
2. Dependencies
|
|
|
|
2.1. Kamailio Modules
|
|
2.2. External Libraries or Applications
|
|
|
|
2.1. Kamailio Modules
|
|
|
|
The following modules must be loaded before this module:
|
|
* No dependencies on other Kamailio modules.
|
|
|
|
2.2. External Libraries or Applications
|
|
|
|
The following libraries or applications must be installed before
|
|
running Kamailio with this module loaded:
|
|
* None.
|
|
|
|
3. Parameters
|
|
|
|
3.1. rpc_url (string)
|
|
|
|
3.1. rpc_url (string)
|
|
|
|
Note: this parameter is used for MI to RPC connections.
|
|
|
|
This parameters specifies the connection to use for running RPC
|
|
commands from the mangement interface.
|
|
|
|
This parameter is required if you need to run RPC commands from the MI.
|
|
It must match a URL to which the RPC is bound.
|
|
|
|
Example 1.1. Set rpc_url parameter
|
|
...
|
|
modparam("mi_rpc","rpc_url","tcp:localhost:2046")
|
|
...
|
|
|
|
4. Functions
|
|
|
|
none
|
|
|
|
5. Exported RPC commands
|
|
|
|
5.1. mi mi_dg mi_fifo mi_xmlrpc
|
|
|
|
5.1. mi mi_dg mi_fifo mi_xmlrpc
|
|
|
|
Execute a MI command.
|
|
|
|
Depending on the version (e.g. mi, mi_dg) it formats the output in a
|
|
similar way to the corresponding kamailio mi module:
|
|
* mi - uses a special, "pretty" format which generates nicer (more
|
|
readable) output when used with sercmd.
|
|
* mi_dg - uses an output format similar to the kamailio mi_datagram
|
|
module.
|
|
* mi_fifo - uses an output format similar to the kamailio mi_fifo
|
|
module.
|
|
* mi_xmlrpc - uses an output format similar to the kamailio mi_xmlrpc
|
|
module.
|
|
|
|
Name: mi
|
|
|
|
Parameters:
|
|
|
|
_mi_command_ - the MI command to execute (mandatory).
|
|
|
|
_parameters_ - the MI command parameters (optional).
|
|
|
|
Example using 'sercmd':
|
|
sercmd> mi uptime
|
|
Now:: Thu Sep 24 18:17:15 2009
|
|
Up since:: Thu Sep 24 17:35:45 2009
|
|
Up time:: 2490 [sec]
|
|
|
|
6. MI Commands
|
|
|
|
6.1. rpc
|
|
|
|
6.1. rpc
|
|
|
|
This MI commands runs a RPC command.
|
|
|
|
It must be passed the name of the RPC command, and any parameters that
|
|
the RPC command requires.
|