module_add_mi_command
Add a new MI command to an OpenSIPS module by inserting the handler function and updating the mi_cmds array in the C source code.
Instructions
Add an MI command to an existing OpenSIPS module C source.
Inserts the MI command handler function and updates the mi_cmds array.
Parameters
module_source:
The existing C source code of the module.
command_name:
Name of the MI command to add (e.g. my_status).
command_description:
Description of what the MI command does.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"module_source": "<module_source>",
"command_name": "<command_name>"
},
"name": "module_add_mi_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_source | Yes | ||
| command_name | Yes | ||
| command_description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||