OpenSIPS / opensips-cli

OpenSIPS CLI tool - an interactive command line tool that can be used to control and monitor OpenSIPS servers.
GNU General Public License v3.0
85 stars 48 forks source link

ERROR: no module 'mi' loaded #33

Closed flipturn14 closed 4 years ago

flipturn14 commented 4 years ago

[root@localhost opensips-cli]# opensips-cli -i 135 OpenSIPS CLI for 192.168.2.135 instance (opensips-cli@192.168.2.135): clear database diagnose exit help history instance quit set tls trace trap user (opensips-cli@192.168.2.135): mi ERROR: no module 'mi' loaded

Why there is no module 'mi'? I followed the procedure exactly.

flipturn14 commented 4 years ago

I found that there was 'mi' without specifying the instance, and once I switched the instance, 'mi' disappeared

razvancrainea commented 4 years ago

most likely the 135 instance cannot connect to the mi endpoint, that's why mi module is not available.

liviuchircu commented 4 years ago

@suleil1 Each instance will inherit the [default] communication_type. So, for example, in the following ~/.opensips-cli.cfg:

[default]
log_level: INFO
prompt_name: opensips-cli
prompt_intro: Welcome to OpenSIPS Command Line Interface!
prompt_emptyline_repeat_cmd: False
history_file: ~/.opensips-cli.history
history_file_size: 1000
output_type: pretty-print

communication_type: http
#url: http://127.0.0.1:8888/mi

#communication_type: fifo
#fifo_file: /tmp/opensips_fifo

[1]
prompt_name: opensips-cli-1
history_file: ~/.opensips-cli-1.history

... instance -i 1 will actually try to connect to 127.0.0.1:8888, and NOT to the /tmp/opensips_fifo file! Be sure to explicitly specify your desired communication_type: fifo (for example) for each instance as well.

Closing for now.