| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
OpenSIPS CLI is an interactive command line tool that can be used to control and monitor OpenSIPS SIP servers. It uses the Management Interface exported by OpenSIPS over JSON-RPC to gather raw information from OpenSIPS and display it in a nicer, more structured manner to the user.
The tool is very flexible and has a modular design, consisting of multiple modules that implement different features. New modules can be easily added by creating a new module that implements the OpenSIPS CLI Module Interface.
OpenSIPS CLI is an interactive console that features auto-completion and reverse/forward command history search, but can also be used to execute one-liners for automation purposes.
OpenSIPS CLI can communicate with an OpenSIPS server using different transport methods, such as fifo or http.
This tool uses the new JSON-RPC interface added in OpenSIPS 3.0, therefore it can only be used with OpenSIPS versions higher than or equal to 3.0. For older versions of OpenSIPS, use the classic opensipsctl tool from the opensips project.
Simply run opensips-cli tool directly in your cli. By default the tool will start in interactive mode.
OpenSIPS CLI accepts the following arguments:
In order to run opensips-cli without installing it, you have to export the PYTHONPATH variable to the root of the opensipscli package. If you are in the root of the project, simply do:
export PYTHONPATH=. bin/opensips-cli
OpenSIPS CLI accepts a configuration file, formatted as an ini or cfg file, that can store certain parameters that influence the behavior of the OpenSIPS CLI tool. You can find here an example of a configuration file that behaves exactly as the default parameters. The set of default values used, when no configuration file is specified, can be found here.
The configuration file can have multiple sections/instances, managed by the Instance module. One can choose different instances from the configuration file by specifying the -i INSTANCE argument when starting the cli tool.
If no configuration file is specified by the -f|--config argument, OpenSIPS CLI searches for one in the following locations:
If no file is found, it starts with the default configuration.
The OpenSIPS CLI core can use the following parameters:
Each module can use each of the parameters above, but can also declare their own. You can find in each module's documentation page the parameters that they are using.
It is also possible to set a parameters dynamically, using the set command. This configuration is only available during the current interactive session, and also gets cleaned up when an instance is switched.
The OpenSIPS CLI tool consists of the following modules:
OpenSIPS CLI can communicate with an OpenSIPS instance through MI using different transports. Supported transports at the moment are:
Please follow the details provided in the Installation section, for a complete guide on how to install opensips-cli as a replacement for the deprecated opensipsctl shell script.
Feel free to contribute to this project with any module, or functionality you find useful by opening a pull request.
This project was started by Dorin Geman (dorin98) as part of the ROSEdu 2018 program. It has later been adapted to the new OpenSIPS 3.0 MI interface and became the main external tool for managing OpenSIPS.
The opensips-cli source code is licensed under the GNU General Public License v3.0
All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0
© 2018 - 2020 OpenSIPS Solutions
| Back | FazBrowse Home | New Git URL |