Skip to content

Commit 02f6262

Browse files
committed
add documentation about opensips-mi script
1 parent dbeb47a commit 02f6262

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,25 @@ Currently, the following packages are available:
6060
* [MI](docs/mi.md) - contains information about supported MI communication types and required parameters for each type.
6161
* [Event Interface](docs/event.md) - lists the supported event transport protocols and provides information about the required parameters for each protocol.
6262

63+
## Scripts
64+
65+
After installing the package, you can use the provided [opensips-mi](scripts/opensips-mi) script to run MI commands. This script takes the following arguments:
66+
- `-t` or `--type` - the type of the MI communication ()`http` or `datagram`)
67+
- `-i` or `--ip` - the IP address of the OpenSIPS server.
68+
- `-p` or `--port` - the port of the OpenSIPS MI.
69+
70+
#### Usage
71+
```bash
72+
# general usage
73+
opensips-mi -t datagram -p 8080 command_name [command_args ...]
74+
75+
# this will execute get_statistics command
76+
opensips-mi -t datagram -p 8080 -s core: shmem:
77+
78+
# you can pass json string as argument with -j flag for commands that require arrays as arguments
79+
opensips-mi -t datagram -p 8080 get_statistics -j "{'statistics': ['core:', 'shmem:']}"
80+
```
81+
6382
## License
6483

6584
<!-- License source -->

0 commit comments

Comments
 (0)