Documentation

Documentation.Interface-CoreMI-3-4 History

Hide minor edits - Show changes to markup

June 21, 2023, at 08:20 PM by rvlad_patrascu -
Changed lines 171-172 from:

Get or set the level of the extra filtering applied to log messages for a specific logging "consumer"(stderror or syslog). If log_level_filter is not given, the command will print the current level filter for the specified consumer.

to:

Get or set the level of the extra filtering applied to log messages for a specific logging "consumer"(stderror, syslog or event). If log_level_filter is not given, the command will print the current level filter for the specified consumer.

Changed line 174 from:
  • consumer (optional) - logging consumer: stderror or syslog;
to:
  • consumer (optional) - logging consumer: stderror, syslog or event;
Changed lines 189-190 from:

Get or set the mute state (printing enabled/disabled) of a specific logging "consumer"(stderror or syslog). If mute_state is not given, the command will print the current mute state for the specified consumer.

to:

Get or set the mute state (printing enabled/disabled) of a specific logging "consumer"(stderror, syslog or event). If mute_state is not given, the command will print the current mute state for the specified consumer.

Changed line 192 from:
  • consumer (optional) - logging consumer: stderror or syslog;
to:
  • consumer (optional) - logging consumer: stderror, syslog or event;
May 17, 2023, at 12:23 AM by rvlad_patrascu -
Added lines 167-202:

@]

log_level_filter 🔗 consumer [level_filter]

Get or set the level of the extra filtering applied to log messages for a specific logging "consumer"(stderror or syslog). If log_level_filter is not given, the command will print the current level filter for the specified consumer.

Arguments:

  • consumer (optional) - logging consumer: stderror or syslog;
  • log_level_filter (optional) - the log level filter.

Examples of usage:

    # opensips-cli -x mi log_level_filter stderror
    {
        "Log level filter": 3
    }
    # opensips-cli -x mi log_level_filter stderror 1
    "OK"

log_mute_state 🔗 consumer [mute_state]

Get or set the mute state (printing enabled/disabled) of a specific logging "consumer"(stderror or syslog). If mute_state is not given, the command will print the current mute state for the specified consumer.

Arguments:

  • consumer (optional) - logging consumer: stderror or syslog;
  • mute_state (optional) - the new mute state: 1 - muted or 0 - unmuted (enabled)

Examples of usage: [@

    # opensips-cli -x mi log_mute_state syslog
    {
        "mmute state": 0
    }
    # opensips-cli -x mi log_mute_state syslog 1
    "OK"
May 15, 2023, at 02:39 PM by liviu -
Changed lines 720-721 from:
		  "expire": 1100
to:
		  "expire": 1100,
		  "ttl": 1046
April 10, 2023, at 02:09 PM by vlad_paiu -
Added lines 577-587:

reset_all_statistics 🔗

Reset (to zero) the value of all statistic variables that can be reset. Note that not all variables allow reset (depending of the nature of the information they carry - example "shmem:used_size").
Output: none.

Examples of usage:


    # opensips-cli -x mi reset_all_statistics
December 08, 2022, at 10:30 AM by razvancrainea -
Changed line 662 from:
  • params (optional) - array of elements, or a JSON object containing key-value pairs
to:
  • params (optional) - array of elements, or a string consisting of a JSON object containing key-value pairs
Changed lines 666-667 from:
    # opensips-cli -x mi raise_event E_PIKE_BLOCKED 127.0.0.1
to:
    # opensips-cli -x mi raise_event E_PIKE_BLOCKED 127.0.0.1 # array mode
    # opensips-cli -x -- mi -j raise_event event=E_PIKE_BLOCKED params='{"ip":"127.0.0.1"}' # json mode
October 28, 2022, at 04:40 PM by razvancrainea -
Changed lines 47-48 from:

Arguments: none\\

to:

Arguments:

  • name (optional) - filter and print only rules in a specific blacklist
October 28, 2022, at 04:25 PM by razvancrainea -
Changed lines 55-60 from:

list_tcp_conns 🔗

The command lists all ongoing TCP/TLS connection from OpenSIPS.
Arguments: none
Output: an array with one object per connection with the following attributes : ID, type, state, source, destination, lifetime, alias port.

to:

check_blacklists 🔗

The command returns all the blacklists that match an proto:IP:port+pattern.
Arguments:

  • proto (optional) - protocol of the check rule - if missing, "any" protocol is used. Note that an "any" protocol check can only match an "any" protocol rule.
  • ip - the mandatory IP that is used to match the rules
  • port (optional) - the port of the check rule - if missing, 0/any port is used. Note that a 0 port will only match a 0 port rule.
  • pattern (optional) - optional pattern to check against the rules

Output: an array with the names of each blacklist that matched.

Changed lines 67-68 from:
    # opensips-cli -x mi list_tcp_conns
to:
    # opensips-cli -x mi check_blacklists 127.0.0.1
    # opensips-cli -x mi check_blacklists udp 127.0.0.1 5060
Changed lines 71-74 from:

log_level 🔗 [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.\\

to:

check_blacklist 🔗

The command check whether a proto:IP:port+pattern matches any rule of a blacklist.\\

Changed lines 75-77 from:
  • level (optional) - logging level (-3...4) (see meaning of the values)
  • pid (optional) - Unix pid (validated by OpenSIPS)
to:
  • name = the name of the blacklist to check against
  • proto (optional) - protocol of the check rule - if missing, "any" protocol is used. Note that an "any" protocol check can only match an "any" protocol rule.
  • ip - the mandatory IP that is used to match the rules
  • port (optional) - the port of the check rule - if missing, 0/any port is used. Note that a 0 port will only match a 0 port rule.
  • pattern (optional) - optional pattern to check against the rules

Output: an object containing the first rule that matched, or an error if nothing matched.

Changed lines 84-112 from:
    # opensips-cli -x mi log_level
    {
        "Processes": [
            {
                "PID": 10670,
                "Log level": 2,
                "Type": "attendant"
            },
            {
                "PID": 10672,
                "Log level": 3,
                "Type": "MI FIFO"
            },
            {
                "PID": 10673,
                "Log level": 1,
                "Type": "SIP receiver udp:193.468.3.433:5060"
            },
        ]
    }
    # opensipsctl fifo log_level 1
    {
        "New global log level": 1
    }
    # opensipsctl fifo log_level 4 10670
    {
        "Log level": 1
    }
to:
    # opensips-cli -x mi check_blacklist net_dynamic 127.0.0.1
    # opensips-cli -x mi check_blacklists net_dynamic udp 127.0.0.1 5060
Changed lines 88-94 from:

ps 🔗

The command will list all all OpenSIPS processes, along with type and description.
Arguments: none
Output: multiple objects, each one containing a process ID (internal), PID (OS) and Type.

to:

add_blacklist_rule 🔗

Adds a rule to a non-readonly blacklist.
Arguments:

  • name- the name of the blacklist to add to
  • rule - a string containing a blacklist rule, according to dst_blacklist parameter
  • expire (optional) - indicates the number of seconds the rule should expire

Output: success or failed object.

Changed lines 99-133 from:
    # opensips-cli -x mi ps

{

    "Processes": [
        {
            "ID": 0,
            "PID": 27271,
            "Type": "attendant"
        },
        {
            "ID": 1,
            "PID": 27272,
            "Type": "MI FIFO"
        },
        {
            "ID": 2,
            "PID": 27273,
            "Type": "time_keeper"
        },
        {
            "ID": 3,
            "PID": 27274,
            "Type": "timer"
        },
        {
            "ID": 4,
            "PID": 27275,
            "Type": "SIP receiver udp:127.0.0.1:5060"
        },
        {
            "ID": 5,
            "PID": 27276,
            "Type": "Timer handler"
        }
    ]

}

to:
    # opensips-cli -x mi add_blacklist_rule net_dynamic '!tcp,127.0.0.1,5060'
    # opensips-cli -x mi add_blacklist_rule net_dynamic '!tcp,127.0.0.1,5060' 3600
Changed lines 103-109 from:

pwd 🔗

Prints the working directory of OpenSIPS instance.
Arguments: none
Output: a single item containing the working directory full path.

to:

del_blacklist_rule 🔗

Removes a rule from a non-readonly blacklist.
Arguments:

  • name - the name of the blacklist to remove from
  • rule - a string containing a blacklist rule, according to dst_blacklist parameter

Output: success or failed object.

Changed lines 113-116 from:
    # opensips-cli -x mi pwd
    {
        "WD": "/"
    }
to:
    # opensips-cli -x mi del_blacklist_rule net_dynamic '!tcp,127.0.0.1,5060'
Changed lines 116-119 from:

reload_routes 🔗

Triggers the reload of the routing block (the routes) from the script during the runtime.

to:

list_tcp_conns 🔗

The command lists all ongoing TCP/TLS connection from OpenSIPS.\\

Changed lines 120-134 from:

Output: none

Please note that there are some limitations of when a reload is possible or not. Depending on the initial configuration of your modules, the reload may be rejected as the usage of the functions in the new script is not compatible with the original module setting and initialization.
If the reload fails, take a look at the logs to understand why - it may have been a syntax error or maybe a module related constraint. Anyhow, if the reload fails, there is no impact on your running OpenSIPS.

sr_get_status 🔗

The MI equivalent of the sr_check_status() script function - to get the status of an 'status/report' identifier/group.

Arguments: a mandatory group and optional identifier, see the parameters of the sr_check_status() script function. Output: the readiness, the status and details of the identifier/group (see the aggregation note for the return code of the sr_check_status() script function

to:

Output: an array with one object per connection with the following attributes : ID, type, state, source, destination, lifetime, alias port.

Changed lines 124-138 from:
  1. opensips-cli -x mi sr_get_status core

{

    "Readiness": true,
    "Status": 1,
    "Details": "running"

}

  1. opensips-cli -x mi sr_get_status drouting all

{

    "Readiness": true,
    "Status": 1,
    "Details": "aggregated"

}

to:
    # opensips-cli -x mi list_tcp_conns
Changed lines 127-134 from:

sr_list_status 🔗

Command to list the status of the identifiers within one or all 'status/report' groups.

Arguments: an optional 'status/report' group, see the sr_check_status() script function for more details. Output: the readiness, the status and details for all the identifiers within the requested group, or within all defined/registered groups.

to:

log_level 🔗 [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.
Arguments:

  • level (optional) - logging level (-3...4) (see meaning of the values)
  • pid (optional) - Unix pid (validated by OpenSIPS)
Changed lines 137-138 from:
  1. opensips-cli -x mi sr_list_status

[

to:
    # opensips-cli -x mi log_level
Changed lines 139-140 from:
        "Name": "drouting",
        "Identifiers": [
to:
        "Processes": [
Changed lines 141-150 from:
                "Name": "Default",
                "Readiness": true,
                "Status": 1,
                "Details": "data available"
            }
        ]
    },
    {
        "Name": "test",
        "Identifiers": [
to:
                "PID": 10670,
                "Log level": 2,
                "Type": "attendant"
            },
Changed lines 146-149 from:
                "Name": "main",
                "Readiness": true,
                "Status": 1
            }
to:
                "PID": 10672,
                "Log level": 3,
                "Type": "MI FIFO"
            },
            {
                "PID": 10673,
                "Log level": 1,
                "Type": "SIP receiver udp:193.468.3.433:5060"
            },
Changed lines 156-157 from:
    },
to:
    }
    # opensipsctl fifo log_level 1
Changed lines 159-167 from:
        "Name": "core",
        "Identifiers": [
            {
                "Name": "main",
                "Readiness": true,
                "Status": 1,
                "Details": "running"
            }
        ]
to:
        "New global log level": 1
Changed lines 161-165 from:

]

to:
    # opensipsctl fifo log_level 4 10670
    {
        "Log level": 1
    }
Changed lines 168-176 from:

sr_list_reports 🔗

Command to list the full set of reports (logs) collected by 'status/report' identifiers.

Arguments:

  • an optional 'status/report' group, see the sr_check_status() script function for more details. If missing, all the groups will be listed.
  • an optional 'identifier'. If missing, all the identifiers within the group will be listed.

Output: the reports/logs for the requested identifiers, or for all identifiers within the groups.

to:

ps 🔗

The command will list all all OpenSIPS processes, along with type and description.
Arguments: none
Output: multiple objects, each one containing a process ID (internal), PID (OS) and Type.

Changed lines 177-178 from:
  1. bin/opensips-cli -x mi sr_list_reports

[

to:
    # opensips-cli -x mi ps

{

    "Processes": [
        {
            "ID": 0,
            "PID": 27271,
            "Type": "attendant"
        },
        {
            "ID": 1,
            "PID": 27272,
            "Type": "MI FIFO"
        },
        {
            "ID": 2,
            "PID": 27273,
            "Type": "time_keeper"
        },
        {
            "ID": 3,
            "PID": 27274,
            "Type": "timer"
        },
        {
            "ID": 4,
            "PID": 27275,
            "Type": "SIP receiver udp:127.0.0.1:5060"
        },
        {
            "ID": 5,
            "PID": 27276,
            "Type": "Timer handler"
        }
    ]

} @]

pwd 🔗

Prints the working directory of OpenSIPS instance.
Arguments: none
Output: a single item containing the working directory full path.

Examples of usage: [@

    # opensips-cli -x mi pwd
Changed lines 225-276 from:
        "Name": "drouting",
        "Identifiers": [
            {
                "Name": "Default",
                "Reports": [
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "starting DB data loading"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "DB data loading successfully completed"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "2 gateways loaded (0 discarded), 2 carriers loaded (0 discarded), 1 rules loaded (0 discarded)"
                    }
                ]
            }
        ]
    },
    {
        "Name": "test",
        "Identifiers": [
            {
                "Name": "main",
                "Reports": []
            }
        ]
    },
    {
        "Name": "core",
        "Identifiers": [
            {
                "Name": "main",
                "Reports": [
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "initializing"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "initialization completed, ready now"
                    }
                ]
            }
        ]
to:
        "WD": "/"
Deleted line 226:

]

Changed lines 230-237 from:

sr_list_identifiers 🔗

Command to list all the existing identifiers in OpenSIPS or only from a certain group.

Arguments:

  • an optional 'status/report' group, see the sr_check_status() script function for more details. If missing, the identifiers from all the groups will be listed.

Output: an array of groups, each group being an array of identifiers .

to:

reload_routes 🔗

Triggers the reload of the routing block (the routes) from the script during the runtime. Arguments: none
Output: none

Please note that there are some limitations of when a reload is possible or not. Depending on the initial configuration of your modules, the reload may be rejected as the usage of the functions in the new script is not compatible with the original module setting and initialization.
If the reload fails, take a look at the logs to understand why - it may have been a syntax error or maybe a module related constraint. Anyhow, if the reload fails, there is no impact on your running OpenSIPS.

sr_get_status 🔗

The MI equivalent of the sr_check_status() script function - to get the status of an 'status/report' identifier/group.

Arguments: a mandatory group and optional identifier, see the parameters of the sr_check_status() script function. Output: the readiness, the status and details of the identifier/group (see the aggregation note for the return code of the sr_check_status() script function

Changed lines 251-278 from:
  1. opensips-cli -x mi sr_list_identifiers
to:
  1. opensips-cli -x mi sr_get_status core

{

    "Readiness": true,
    "Status": 1,
    "Details": "running"

}

  1. opensips-cli -x mi sr_get_status drouting all

{

    "Readiness": true,
    "Status": 1,
    "Details": "aggregated"

}

@]

sr_list_status 🔗

Command to list the status of the identifiers within one or all 'status/report' groups.

Arguments: an optional 'status/report' group, see the sr_check_status() script function for more details. Output: the readiness, the status and details for all the identifiers within the requested group, or within all defined/registered groups.

Examples of usage: [@

  1. opensips-cli -x mi sr_list_status
Changed line 281 from:
        "Group": "clusterer",
to:
        "Name": "drouting",
Changed lines 283-288 from:
            "sharing_tags"
to:
            {
                "Name": "Default",
                "Readiness": true,
                "Status": 1,
                "Details": "data available"
            }
Changed line 292 from:
        "Group": "dispatcher",
to:
        "Name": "test",
Changed lines 294-295 from:
            "default;events",
            "default"
to:
            {
                "Name": "main",
                "Readiness": true,
                "Status": 1
            }
Changed line 302 from:
        "Group": "drouting",
to:
        "Name": "core",
Changed lines 304-305 from:
            "Default;events",
            "Default"
to:
            {
                "Name": "main",
                "Readiness": true,
                "Status": 1,
                "Details": "running"
            }
Deleted lines 310-321:
    },
    {
        "Group": "dialplan",
        "Identifiers": [
            "default"
        ]
    },
    {
        "Group": "core",
        "Identifiers": [
            "main"
        ]
Deleted lines 312-319:
  1. opensips-cli -x mi sr_list_identifiers drouting

{

    "Group": "drouting",
    "Identifiers": [
        "Default;events",
        "Default"
    ]

}

Changed lines 315-322 from:

uptime 🔗

Prints various time information about OpenSIPS - when it started to run, for how long it runs.
Arguments: none
Output: three items: "Now" - current time; "Up since" - start time ; "Up time" - number of seconds since started.

to:

sr_list_reports 🔗

Command to list the full set of reports (logs) collected by 'status/report' identifiers.

Arguments:

  • an optional 'status/report' group, see the sr_check_status() script function for more details. If missing, all the groups will be listed.
  • an optional 'identifier'. If missing, all the identifiers within the group will be listed.

Output: the reports/logs for the requested identifiers, or for all identifiers within the groups.

Changed lines 326-358 from:
    # opensips-cli -x mi uptime

{

    "Now": "Mon Jul 21 17:41:03 2008",
    "Up since": "Mon Jul 21 17:36:33 2008",
    "Up time": "270 [sec]"

} @]

version 🔗

Prints the version string of a runningOpenSIPS.
Arguments: none
Output: one item (named "Server") containing the version string.

Examples of usage:

    # opensips-cli -x mi version
{
    "Server": "OpenSIPS (3.4.0-dev (x86_64/linux))"
}

which 🔗

Prints all available MI commands from the queried OpenSIPSinstance.
Arguments: none
Output: an array of the names of available MI commands. NOTE that the list of available MI commands may differ depending of what modules your OpenSIPS is using.

Examples of usage: [@

    # opensips-cli -x mi which
to:
  1. bin/opensips-cli -x mi sr_list_reports
Deleted lines 327-364:
    "get_statistics",
    "list_statistics",
    "reset_statistics",
    "uptime",
    "version",
    "pwd",
    "arg",
    "which",
    "ps",
    "kill",
    "log_level",
    "xlog_level",
    "shm_check",
    "cache_store",
    "cache_fetch",
    "cache_remove",
    "event_subscribe",
    "events_list",

... @]

get_statistics 🔗

Prints the statistics (all, group or one) realtime values.
Arguments:

  • statistics - an array of the following possible values:
    • "all" - print all available statistics;
    • "group_name:" - print only statistics from a certain group named "group_name"; the OpenSIPS core defines the following groups: core, shmem; Modules export groups typically named like the module itself.
    • "name" - print only the statistic named "name".

Output: an object containing the names and values of statistic variables.

Examples of usage: [@

    # opensips-cli -x mi get_statistics rcv_requests
   {
       "core:rcv_requests": 35243
   }
    # opensipsc-cli -x mi get_statistics shmem:      
Changed lines 329-334 from:
        "shmem:total_size": 1073741824,
        "shmem:max_used_size": 3389232,
        "shmem:free_size": 1070352592,
        "shmem:used_size": 2808952,
        "shmem:real_used_size": 3389232,
        "shmem:fragments": 3769
to:
        "Name": "drouting",
        "Identifiers": [
            {
                "Name": "Default",
                "Reports": [
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "starting DB data loading"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "DB data loading successfully completed"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "2 gateways loaded (0 discarded), 2 carriers loaded (0 discarded), 1 rules loaded (0 discarded)"
                    }
                ]
            }
        ]
    },
    {
        "Name": "test",
        "Identifiers": [
            {
                "Name": "main",
                "Reports": []
            }
        ]
    },
    {
        "Name": "core",
        "Identifiers": [
            {
                "Name": "main",
                "Reports": [
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "initializing"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "initialization completed, ready now"
                    }
                ]
            }
        ]
Changed lines 382-383 from:
    # opensips-cli -x mi get_statistics shmem: core:
    ....
to:

]

Changed lines 385-387 from:

list_statistics 🔗

Prints a list of available statistics in the current configuration of OpenSIPS.

to:

sr_list_identifiers 🔗

Command to list all the existing identifiers in OpenSIPS or only from a certain group.

Changed lines 391-392 from:
  • statistics (optional) - an array of the same possible values as for get_statistics MI command, with the exception of "all". Omitting the parameter will list all available statistics.
to:
  • an optional 'status/report' group, see the sr_check_status() script function for more details. If missing, the identifiers from all the groups will be listed.

Output: an array of groups, each group being an array of identifiers .

Changed lines 396-431 from:
    # opensips-cli -x mi list_statistics
to:
  1. opensips-cli -x mi sr_list_identifiers

[

    {
        "Group": "clusterer",
        "Identifiers": [
            "sharing_tags"
        ]
    },
    {
        "Group": "dispatcher",
        "Identifiers": [
            "default;events",
            "default"
        ]
    },
    {
        "Group": "drouting",
        "Identifiers": [
            "Default;events",
            "Default"
        ]
    },
    {
        "Group": "dialplan",
        "Identifiers": [
            "default"
        ]
    },
    {
        "Group": "core",
        "Identifiers": [
            "main"
        ]
    }

]

  1. opensips-cli -x mi sr_list_identifiers drouting
Changed lines 433-441 from:
    "shmem:total_size": "non-incremental",
    "shmem:max_used_size": "non-incremental",
    "shmem:free_size": "non-incremental",
    "shmem:used_size": "non-incremental",
    "shmem:real_used_size": "non-incremental",
    "shmem:fragments": "non-incremental",
    "rpmem:rpm_total_size": "non-incremental",
    "rpmem:rpm_used_size": "non-incremental",

...

to:
    "Group": "drouting",
    "Identifiers": [
        "Default;events",
        "Default"
    ]

}

Changed lines 441-447 from:

reset_statistics 🔗

Reset (to zero) the value of a statistic variable. Note that not all variables allow reset (depending of the nature of the information they carry - example "shmem:used_size").
Arguments:

  • statistics - an array of the names of the variables to be reset.

Output: none.

to:

uptime 🔗

Prints various time information about OpenSIPS - when it started to run, for how long it runs.
Arguments: none
Output: three items: "Now" - current time; "Up since" - start time ; "Up time" - number of seconds since started.

Changed lines 451-459 from:
    # opensips-cli -x mi get_statistics received_replies
   {
       "tm:received_replies": 14543
   }
    # opensips-cli -x mi reset_statistics received_replies
    # opensips-cli -x mi get_statistics received_replies
   {
       "tm:received_replies": 0
   }
to:
    # opensips-cli -x mi uptime

{

    "Now": "Mon Jul 21 17:41:03 2008",
    "Up since": "Mon Jul 21 17:36:33 2008",
    "Up time": "270 [sec]"

}

Changed lines 459-469 from:

cache_store 🔗

This command stores in a cache system a string value.
Arguments:

  • system - cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local';
  • attr - the label to be associated with this value;
  • value - the string to be stored;
  • expire (optional) - expire time for the stored value;

Output: none.

to:

version 🔗

Prints the version string of a runningOpenSIPS.
Arguments: none
Output: one item (named "Server") containing the version string.

Changed lines 467-471 from:
    # opensips-cli -x mi cache_store local password_user1 password
to:
    # opensips-cli -x mi version

{

    "Server": "OpenSIPS (3.4.0-dev (x86_64/linux))"

}

Changed lines 474-481 from:

cache_fetch 🔗

This command queries for a stored value.
Arguments:

  • system - cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
  • attr - the label associated with the value

Output: object containing the value if a record is found or 'Value not found' string otherwise.

to:

which 🔗

Prints all available MI commands from the queried OpenSIPSinstance.
Arguments: none
Output: an array of the names of available MI commands. NOTE that the list of available MI commands may differ depending of what modules your OpenSIPS is using.

Changed lines 483-503 from:
    # opensips-cli -x mi cache_fetch local password_user1
to:
    # opensips-cli -x mi which

[

    "get_statistics",
    "list_statistics",
    "reset_statistics",
    "uptime",
    "version",
    "pwd",
    "arg",
    "which",
    "ps",
    "kill",
    "log_level",
    "xlog_level",
    "shm_check",
    "cache_store",
    "cache_fetch",
    "cache_remove",
    "event_subscribe",
    "events_list",

...

Changed lines 506-508 from:

cache_remove 🔗

This command removes a record from the cache system.\\

to:

get_statistics 🔗

Prints the statistics (all, group or one) realtime values.\\

Changed lines 510-512 from:
  • system - cache system to use;
  • attr - the label associated with the stored value;

Output: None.\\

to:
  • statistics - an array of the following possible values:
    • "all" - print all available statistics;
    • "group_name:" - print only statistics from a certain group named "group_name"; the OpenSIPS core defines the following groups: core, shmem; Modules export groups typically named like the module itself.
    • "name" - print only the statistic named "name".

Output: an object containing the names and values of statistic variables.

Changed lines 518-532 from:
    # opensips-cli -x mi cache_remove local password_user1
to:
    # opensips-cli -x mi get_statistics rcv_requests
   {
       "core:rcv_requests": 35243
   }
    # opensipsc-cli -x mi get_statistics shmem:      
    {
        "shmem:total_size": 1073741824,
        "shmem:max_used_size": 3389232,
        "shmem:free_size": 1070352592,
        "shmem:used_size": 2808952,
        "shmem:real_used_size": 3389232,
        "shmem:fragments": 3769
    }
    # opensips-cli -x mi get_statistics shmem: core:
    ....
Changed lines 535-538 from:

event_subscribe 🔗

Subscribes an external application to a certain event.\\

to:

list_statistics 🔗

Prints a list of available statistics in the current configuration of OpenSIPS.

Changed lines 539-542 from:
  • event - event name
  • socket - external application socket
  • expire (optional) - expire time, in seconds - if absent, the subscription is valid only one hour (3600 s)

Output: None.\\

to:
  • statistics (optional) - an array of the same possible values as for get_statistics MI command, with the exception of "all". Omitting the parameter will list all available statistics.
Changed lines 543-553 from:
    # opensips-cli -x mi event_subscribe E_PIKE_BLOCKED udp:127.0.0.1:8888 1200
to:
    # opensips-cli -x mi list_statistics

{

    "shmem:total_size": "non-incremental",
    "shmem:max_used_size": "non-incremental",
    "shmem:free_size": "non-incremental",
    "shmem:used_size": "non-incremental",
    "shmem:real_used_size": "non-incremental",
    "shmem:fragments": "non-incremental",
    "rpmem:rpm_total_size": "non-incremental",
    "rpmem:rpm_used_size": "non-incremental",

...

Changed lines 556-560 from:

events_list 🔗

Lists all the events published through the Event Interface.
Arguments: None.
Output: None.\\

to:

reset_statistics 🔗

Reset (to zero) the value of a statistic variable. Note that not all variables allow reset (depending of the nature of the information they carry - example "shmem:used_size").
Arguments:

  • statistics - an array of the names of the variables to be reset.

Output: none.

Changed lines 565-580 from:
    # opensips-cli -x mi events_list

{

    "Events": [
        {
            "name": "E_CORE_THRESHOLD",
            "id": 0
        },
        {
            "name": "E_CORE_SHM_THRESHOLD",
            "id": 1
        },
        {
            "name": "E_CORE_PKG_THRESHOLD",
            "id": 2
        },

...

to:
    # opensips-cli -x mi get_statistics received_replies
   {
       "tm:received_replies": 14543
   }
    # opensips-cli -x mi reset_statistics received_replies
    # opensips-cli -x mi get_statistics received_replies
   {
       "tm:received_replies": 0
   }
Changed lines 576-578 from:

raise_event 🔗

Raises an event through the Event Interface using an MI command.\\

to:

cache_store 🔗

This command stores in a cache system a string value.\\

Changed lines 581-583 from:
  • event - event name
  • params (optional) - array of elements, or a JSON object containing key-value pairs

Output: None.\\

to:
  • system - cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local';
  • attr - the label to be associated with this value;
  • value - the string to be stored;
  • expire (optional) - expire time for the stored value;

Output: none.

Changed line 589 from:
    # opensips-cli -x mi raise_event E_PIKE_BLOCKED 127.0.0.1
to:
    # opensips-cli -x mi cache_store local password_user1 password
Changed lines 592-594 from:

subscribers_list 🔗

Lists information about the subscribers\\

to:

cache_fetch 🔗

This command queries for a stored value.\\

Changed lines 596-598 from:
  • event - event name
  • socket (optional) - external application socket

Output: If no parameter is specified, then the command returns information about all events and their subscribers. If the event is specified, only the external applications subscribed for that event are returned. If the socket is also specified, only one subscriber information is returned.\\

to:
  • system - cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
  • attr - the label associated with the value

Output: object containing the value if a record is found or 'Value not found' string otherwise.

Changed lines 602-638 from:
    # opensips-cli -x mi subscribers_list
to:
    # opensips-cli -x mi cache_fetch local password_user1

@]

cache_remove 🔗

This command removes a record from the cache system.
Arguments:

  • system - cache system to use;
  • attr - the label associated with the stored value;

Output: None.
Examples of usage:

    # opensips-cli -x mi cache_remove local password_user1

event_subscribe 🔗

Subscribes an external application to a certain event.
Arguments:

  • event - event name
  • socket - external application socket
  • expire (optional) - expire time, in seconds - if absent, the subscription is valid only one hour (3600 s)

Output: None.
Examples of usage:

    # opensips-cli -x mi event_subscribe E_PIKE_BLOCKED udp:127.0.0.1:8888 1200

events_list 🔗

Lists all the events published through the Event Interface.
Arguments: None.
Output: None.
Examples of usage: [@

    # opensips-cli -x mi events_list
Added lines 640-678:
    "Events": [
        {
            "name": "E_CORE_THRESHOLD",
            "id": 0
        },
        {
            "name": "E_CORE_SHM_THRESHOLD",
            "id": 1
        },
        {
            "name": "E_CORE_PKG_THRESHOLD",
            "id": 2
        },

... @]

raise_event 🔗

Raises an event through the Event Interface using an MI command.
Arguments:

  • event - event name
  • params (optional) - array of elements, or a JSON object containing key-value pairs

Output: None.
Examples of usage:

    # opensips-cli -x mi raise_event E_PIKE_BLOCKED 127.0.0.1

subscribers_list 🔗

Lists information about the subscribers
Arguments:

  • event - event name
  • socket (optional) - external application socket

Output: If no parameter is specified, then the command returns information about all events and their subscribers. If the event is specified, only the external applications subscribed for that event are returned. If the socket is also specified, only one subscriber information is returned.
Examples of usage: [@

    # opensips-cli -x mi subscribers_list

{

Changed line 746 from:
  • log_level (otpional) - a log level to be used for this dump
to:
  • log_level (optional) - a log level to be used for this dump
July 14, 2022, at 12:57 PM by 109.99.227.30 -
Added lines 322-377:

@]

sr_list_identifiers 🔗

Command to list all the existing identifiers in OpenSIPS or only from a certain group.

Arguments:

  • an optional 'status/report' group, see the sr_check_status() script function for more details. If missing, the identifiers from all the groups will be listed.

Output: an array of groups, each group being an array of identifiers .

Examples of usage: [@

  1. opensips-cli -x mi sr_list_identifiers

[

    {
        "Group": "clusterer",
        "Identifiers": [
            "sharing_tags"
        ]
    },
    {
        "Group": "dispatcher",
        "Identifiers": [
            "default;events",
            "default"
        ]
    },
    {
        "Group": "drouting",
        "Identifiers": [
            "Default;events",
            "Default"
        ]
    },
    {
        "Group": "dialplan",
        "Identifiers": [
            "default"
        ]
    },
    {
        "Group": "core",
        "Identifiers": [
            "main"
        ]
    }

]

  1. opensips-cli -x mi sr_list_identifiers drouting

{

    "Group": "drouting",
    "Identifiers": [
        "Default;events",
        "Default"
    ]

}

February 10, 2022, at 04:51 PM by 109.99.227.30 -
Changed lines 17-18 from:

arg

to:

arg 🔗

Changed lines 33-34 from:

kill

to:

kill 🔗

Changed lines 44-45 from:

list_blacklists

to:

list_blacklists 🔗

Changed lines 55-56 from:

list_tcp_conns

to:

list_tcp_conns 🔗

Changed lines 67-68 from:

log_level [level] [pid]

to:

log_level 🔗 [level] [pid]

Changed lines 108-109 from:

ps

to:

ps 🔗

Changed lines 153-154 from:

pwd

to:

pwd 🔗

Changed lines 169-170 from:

reload_routes

to:

reload_routes 🔗

Changed lines 180-181 from:

sr_get_status

to:

sr_get_status 🔗

Changed lines 208-209 from:

sr_list_status

to:

sr_list_status 🔗

Changed lines 254-255 from:

sr_list_reports

to:

sr_list_reports 🔗

Changed lines 325-326 from:

uptime

to:

uptime 🔗

Changed lines 342-343 from:

version

to:

version 🔗

Changed lines 358-359 from:

which

to:

which 🔗

Changed lines 389-390 from:

get_statistics

to:

get_statistics 🔗

Changed lines 418-419 from:

list_statistics

to:

list_statistics 🔗

Changed lines 439-440 from:

reset_statistics

to:

reset_statistics 🔗

Changed lines 460-461 from:

cache_store

to:

cache_store 🔗

Changed lines 475-476 from:

cache_fetch

to:

cache_fetch 🔗

Changed lines 488-489 from:

cache_remove

to:

cache_remove 🔗

Changed lines 501-502 from:

event_subscribe

to:

event_subscribe 🔗

Changed lines 514-515 from:

events_list

to:

events_list 🔗

Changed lines 539-540 from:

raise_event

to:

raise_event 🔗

Changed lines 551-552 from:

subscribers_list

to:

subscribers_list 🔗

Changed lines 609-610 from:

mem_pkg_dump

to:

mem_pkg_dump 🔗

Changed lines 625-626 from:

mem_shm_dump

to:

mem_shm_dump 🔗

Changed lines 636-637 from:

shm_check

to:

shm_check 🔗

Changed line 650 from:

xlog_level [level]

to:

xlog_level [level] 🔗

Changed lines 653-654 from:
  • level (otpional)
to:
  • level (optional)
Changed line 660 from:

to:

February 09, 2022, at 11:00 AM by 109.99.227.30 -
Added lines 169-311:

sr_get_status

The MI equivalent of the sr_check_status() script function - to get the status of an 'status/report' identifier/group.

Arguments: a mandatory group and optional identifier, see the parameters of the sr_check_status() script function. Output: the readiness, the status and details of the identifier/group (see the aggregation note for the return code of the sr_check_status() script function

Examples of usage:

# opensips-cli -x mi sr_get_status core
{
    "Readiness": true,
    "Status": 1,
    "Details": "running"
}


# opensips-cli -x mi sr_get_status drouting all
{
    "Readiness": true,
    "Status": 1,
    "Details": "aggregated"
}

sr_list_status

Command to list the status of the identifiers within one or all 'status/report' groups.

Arguments: an optional 'status/report' group, see the sr_check_status() script function for more details. Output: the readiness, the status and details for all the identifiers within the requested group, or within all defined/registered groups.

Examples of usage:

#opensips-cli -x mi sr_list_status 
[
    {
        "Name": "drouting",
        "Identifiers": [
            {
                "Name": "Default",
                "Readiness": true,
                "Status": 1,
                "Details": "data available"
            }
        ]
    },
    {
        "Name": "test",
        "Identifiers": [
            {
                "Name": "main",
                "Readiness": true,
                "Status": 1
            }
        ]
    },
    {
        "Name": "core",
        "Identifiers": [
            {
                "Name": "main",
                "Readiness": true,
                "Status": 1,
                "Details": "running"
            }
        ]
    }
]

sr_list_reports

Command to list the full set of reports (logs) collected by 'status/report' identifiers.

Arguments:

  • an optional 'status/report' group, see the sr_check_status() script function for more details. If missing, all the groups will be listed.
  • an optional 'identifier'. If missing, all the identifiers within the group will be listed.

Output: the reports/logs for the requested identifiers, or for all identifiers within the groups.

Examples of usage:

#bin/opensips-cli -x mi sr_list_reports 
[
    {
        "Name": "drouting",
        "Identifiers": [
            {
                "Name": "Default",
                "Reports": [
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "starting DB data loading"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "DB data loading successfully completed"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "2 gateways loaded (0 discarded), 2 carriers loaded (0 discarded), 1 rules loaded (0 discarded)"
                    }
                ]
            }
        ]
    },
    {
        "Name": "test",
        "Identifiers": [
            {
                "Name": "main",
                "Reports": []
            }
        ]
    },
    {
        "Name": "core",
        "Identifiers": [
            {
                "Name": "main",
                "Reports": [
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "initializing"
                    },
                    {
                        "Timestamp": 1644396830,
                        "Date": "Wed Feb  9 10:53:50 2022",
                        "Log": "initialization completed, ready now"
                    }
                ]
            }
        ]
    }
]
October 18, 2019, at 01:42 PM by rvlad_patrascu -
Changed line 481 from:

Get or set the global xlogging level in OpenSIPS processes. If no argument is passed to the xlog_level command, it will print the current xlog_level. If a logging level is given, it will be globally set for all OpenSIPS processes.

to:

Get or set the global xlogging level in OpenSIPS processes. If no argument is passed to the xlog_level command, it will print the current xlog_level. If a logging level is given, it will be globally set for all OpenSIPS processes. \\

October 18, 2019, at 01:41 PM by rvlad_patrascu -
Changed lines 316-320 from:

Arguments:
- cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
- the label associated with the value
Output: MI tree containing the value if a record is found or 'Value not found' string otherwise.

to:

Arguments:

  • system - cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
  • attr - the label associated with the value

Output: object containing the value if a record is found or 'Value not found' string otherwise.

Changed lines 328-330 from:

Arguments:
- cache system to use
- the label associated with the stored value \\

to:

Arguments:

  • system - cache system to use;
  • attr - the label associated with the stored value;
Changed lines 340-343 from:

Arguments:
- event name
- external application socket
- expire time, in seconds - if absent, the subscription is valid only one hour (3600 s)\\

to:

Arguments:

  • event - event name
  • socket - external application socket
  • expire (optional) - expire time, in seconds - if absent, the subscription is valid only one hour (3600 s)
Changed lines 357-360 from:
    Event:: E_CORE_THRESHOLD id=0
    Event:: E_RTPPROXY_STATUS id=1
    Event:: E_PIKE_BLOCKED id=2
to:

{

    "Events": [
        {
            "name": "E_CORE_THRESHOLD",
            "id": 0
        },
        {
            "name": "E_CORE_SHM_THRESHOLD",
            "id": 1
        },
        {
            "name": "E_CORE_PKG_THRESHOLD",
            "id": 2
        },

...

Changed lines 376-378 from:

Arguments:
- event name
- params - array of elements, or a JSON object containing key-value pairs \\

to:

Arguments:

  • event - event name
  • params (optional) - array of elements, or a JSON object containing key-value pairs
Changed lines 387-389 from:

Arguments:
- event name
- external application socket \\

to:

Arguments:

  • event - event name
  • socket (optional) - external application socket
Changed lines 394-400 from:
    Event:: E_CORE_THRESHOLD id=0
    Event:: E_RTPPROXY_STATUS id=1
	Subscriber::  socket=unix:/tmp/event.sock expire=never
	Subscriber::  socket=udp:127.0.0.1:8888 expire=1100
    Event:: E_PIKE_BLOCKED id=2
	Subscriber::  socket=rabbitmq:guest@127.0.0.1/hello expire=never
to:

{

  "Events": [{
	  "name": "E_RTPPROXY_STATUS",
	  "id": 1,
	  "subscribers": [
		...
	  ]
	},
	{
	  "name": "E_PIKE_BLOCKED",
	  "id": 2,
	  "subscribers": [
		...
	  ]
	}
  ]

}

Changed lines 413-416 from:
    Event:: E_RTPPROXY_STATUS id=1
	Subscriber::  socket=unix:/tmp/event.sock expire=never
	Subscriber::  socket=udp:127.0.0.1:8888 expire=1100
to:

{

  "Event": {
	"name": "E_RTPPROXY_STATUS",
	"id": 1,
	"subscribers": [{
		  "socket": "unix:/tmp/event.sock",
		  "expire": "never",
		},
		{
		  "socket": "udp:127.0.0.1:8888",
		  "expire": 1100
		}
	]
  } 

}

Changed lines 430-431 from:
    Event:: E_RTPPROXY_STATUS id=1
	Subscriber::  socket=unix:/tmp/event.sock expire=never
to:

{

  "Event": {
	"name": "E_RTPPROXY_STATUS",
	"id": 1,
	"Subscriber": {
	  "socket": "unix:/tmp/event.sock",
	  "expire": "never"
	}
  } 

}

Changed lines 444-446 from:

Arguments:
- PID - mandatory, the pid of the process to perform the pkg dump
- log level - optional, a log level to be used for this dump\\

to:

Arguments:

  • pid - the PID of the process to perform the pkg dump
  • log_level (optional) - a log level to be used for this dump
Changed lines 459-460 from:

Arguments:
- log level - optional, a log level to be used for this dump\\

to:

Arguments:

  • log_level (otpional) - a log level to be used for this dump
Added lines 482-483:

Arguments:

  • level (otpional)
October 17, 2019, at 07:45 PM by rvlad_patrascu -
Changed lines 19-22 from:

Arguments:
- command (optional)
Output: multiple MI nodes where each node contains an argument. The MI nodes have no name, but only value. If command is specified, the command returns an array that contains all the parameters the command can support.

to:

Arguments: none
Output: an array with multiple strings representing the arguments.

Changed lines 25-28 from:
    ./opensips
    -f
    /etc/openser/test.cfg
to:
    [
        "./opensips",
        "-f",
        "/etc/openser/test.cfg"
    ]
Changed lines 45-46 from:

Output: an MI tree - first level (nodes named "List") will describe the list (name, owner, flags); Second level (nodes named "Rules) will describe the rules (blacklists) for each list (IP/mask, protocol, port, matching regexp, flags)

to:

Output: an array with each object describing the list (name, owner, flags); the "Rules" item is an array with each object member describing the rules (blacklists) for each list (IP/mask, protocol, port, matching regexp, flags).

Changed lines 55-56 from:

Output: an MI tree - one record per connection with the following attributes : ID, state, proto, source, destination, timeout, lifetime

to:

Output: an array with one object per connection with the following attributes : ID, type, state, source, destination, lifetime, alias port.

Changed line 64 from:

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.

to:

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.\\

Changed lines 66-68 from:
to:
  • level (optional) - logging level (-3...4) (see meaning of the values)
  • pid (optional) - Unix pid (validated by OpenSIPS)
Changed lines 72-74 from:
    Process::  PID=10670 Debug=2 Type=attendant
    Process::  PID=10672 Debug=3 Type=MI FIFO
    Process::  PID=10673 Debug=1 Type=SIP receiver udp:193.468.3.433:5060
to:
    {
        "Processes": [
            {
                "PID": 10670,
                "Log level": 2,
                "Type": "attendant"
            },
            {
                "PID": 10672,
                "Log level": 3,
                "Type": "MI FIFO"
            },
            {
                "PID": 10673,
                "Log level": 1,
                "Type": "SIP receiver udp:193.468.3.433:5060"
            },
        ]
    }
Changed lines 92-94 from:
    New global debug:: 1
to:
    {
        "New global log level": 1
    }
Changed lines 96-99 from:
    New debug:: 4
to:
    {
        "Log level": 1
    }
Changed lines 106-107 from:

Output: multiple MI nodes (named "Process") - each node contains process ID (internal), PID (OS), Type and description

to:

Output: multiple objects, each one containing a process ID (internal), PID (OS) and Type.

Changed lines 111-116 from:
    Process::  ID=0 PID=16224 Type=attendant
    Process::  ID=1 PID=16225 Type=SIP receiver udp:193.468.1.2:5060 
    Process::  ID=2 PID=16226 Type=timer
    Process::  ID=3 PID=16227 Type=MI FIFO
    Process::  ID=4 PID=16228 Type=TCP receiver
    Process::  ID=5 PID=16230 Type=TCP main
to:

{

    "Processes": [
        {
            "ID": 0,
            "PID": 27271,
            "Type": "attendant"
        },
        {
            "ID": 1,
            "PID": 27272,
            "Type": "MI FIFO"
        },
        {
            "ID": 2,
            "PID": 27273,
            "Type": "time_keeper"
        },
        {
            "ID": 3,
            "PID": 27274,
            "Type": "timer"
        },
        {
            "ID": 4,
            "PID": 27275,
            "Type": "SIP receiver udp:127.0.0.1:5060"
        },
        {
            "ID": 5,
            "PID": 27276,
            "Type": "Timer handler"
        }
    ]

}

Changed lines 150-152 from:

Output: a single MI node with name "WD" containing the working directory full path.

to:

Output: a single item containing the working directory full path.

Changed lines 156-158 from:
    WD:: /
to:
    {
        "WD": "/"
    }
Changed lines 174-176 from:

Output: three MI nodes: "Now" - current time; "Up since" - start time ; "Up time" - number of seconds since started.

to:

Output: three items: "Now" - current time; "Up since" - start time ; "Up time" - number of seconds since started.

Changed lines 180-182 from:
    Now:: Mon Jul 21 17:41:03 2008
    Up since:: Mon Jul 21 17:36:33 2008
    Up time:: 270 [sec]
to:

{

    "Now": "Mon Jul 21 17:41:03 2008",
    "Up since": "Mon Jul 21 17:36:33 2008",
    "Up time": "270 [sec]"

}

Changed lines 190-191 from:

Output: one MI node (named "Server") containing the version string.

to:

Output: one item (named "Server") containing the version string.

Changed lines 195-198 from:
    Server:: OpenSIPS (1.4.0dev14-notls (i386/linux))
to:

{

    "Server": "OpenSIPS (3.4.0-dev (x86_64/linux))"

}

Changed lines 205-206 from:

Output: multiple MI nodes (no name), each node containing (as value) the name of an available MI command. NOTE that the list of available MI commands may differ depending of what modules your OpenSIPS is using.

to:

Output: an array of the names of available MI commands. NOTE that the list of available MI commands may differ depending of what modules your OpenSIPS is using.

Changed lines 210-228 from:
    get_statistics
    list_statistics
    reset_statistics
    uptime
    version
    pwd
    arg
    which
    ps
    kill
    debug
    list_blacklists
    ul_rm
    ul_rm_contact
    ul_dump
    ul_flush
    ul_add
    ul_show_contact
    nh_enable_ping
to:

[

    "get_statistics",
    "list_statistics",
    "reset_statistics",
    "uptime",
    "version",
    "pwd",
    "arg",
    "which",
    "ps",
    "kill",
    "log_level",
    "xlog_level",
    "shm_check",
    "cache_store",
    "cache_fetch",
    "cache_remove",
    "event_subscribe",
    "events_list",

...

Changed lines 234-236 from:

Arguments: input may be "all" - print all available statistics; "group:" - print only statistics from a certain group; "name" - print only this statistic. The OpenSIPS core defines the following groups: core, shmem; Modules export groups typically named like the module itself.
Output: list of MI nodes (no name) - each MI mode contains the name and value of a single statistic variable.

to:

Arguments:

  • statistics - an array of the following possible values:
    • "all" - print all available statistics;
    • "group_name:" - print only statistics from a certain group named "group_name"; the OpenSIPS core defines the following groups: core, shmem; Modules export groups typically named like the module itself.
    • "name" - print only the statistic named "name".

Output: an object containing the names and values of statistic variables.

Changed lines 244-246 from:
    core:rcv_requests = 35243
to:
   {
       "core:rcv_requests": 35243
   }
Changed lines 248-254 from:
    shmem:total_size = 33554432
    shmem:used_size = 1686952
    shmem:real_used_size = 1704592
    shmem:max_used_size = 1704592
    shmem:free_size = 31849840
    shmem:fragments = 1
    # opensips-cli -x mi get_statistics all
to:
    {
        "shmem:total_size": 1073741824,
        "shmem:max_used_size": 3389232,
        "shmem:free_size": 1070352592,
        "shmem:used_size": 2808952,
        "shmem:real_used_size": 3389232,
        "shmem:fragments": 3769
    }
    # opensips-cli -x mi get_statistics shmem: core:
Changed lines 261-262 from:

Prints a list of all available statistics in the current configuration of OpenSIPS

to:

Prints a list of available statistics in the current configuration of OpenSIPS. Arguments:

  • statistics (optional) - an array of the same possible values as for get_statistics MI command, with the exception of "all". Omitting the parameter will list all available statistics.
Changed lines 268-279 from:

shmem:total_size:: incremental shmem:used_size:: incremental shmem:real_used_size:: incremental shmem:max_used_size:: incremental shmem:free_size:: incremental shmem:fragments:: incremental core:rcv_requests:: incremental core:rcv_replies:: incremental core:fwd_requests:: incremental core:fwd_replies:: incremental core:drop_requests:: incremental

    ....
to:

{

    "shmem:total_size": "non-incremental",
    "shmem:max_used_size": "non-incremental",
    "shmem:free_size": "non-incremental",
    "shmem:used_size": "non-incremental",
    "shmem:real_used_size": "non-incremental",
    "shmem:fragments": "non-incremental",
    "rpmem:rpm_total_size": "non-incremental",
    "rpmem:rpm_used_size": "non-incremental",

...

Changed lines 282-283 from:

Arguments: name of the variable to be reset.\\

to:

Arguments:

  • statistics - an array of the names of the variables to be reset.
Changed lines 289-291 from:
    core:received_replies = 14543
to:
   {
       "tm:received_replies": 14543
   }
Changed lines 294-296 from:
    core:received_replies = 0
to:
   {
       "tm:received_replies": 0
   }
Changed lines 302-305 from:

Arguments:
- cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
- the label to be associated with this value
- the string to be stored \\

to:

Arguments:

  • system - cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local';
  • attr - the label to be associated with this value;
  • value - the string to be stored;
  • expire (optional) - expire time for the stored value;
October 04, 2019, at 05:26 PM by razvancrainea -
Changed line 294 from:

Arguments: None. \\

to:

Arguments: \\

October 04, 2019, at 05:23 PM by razvancrainea -
Added lines 290-300:

@]

raise_event

Raises an event through the Event Interface using an MI command.
Arguments: None.
- event name
- params - array of elements, or a JSON object containing key-value pairs
Output: None.
Examples of usage: [@

    # opensips-cli -x mi raise_event E_PIKE_BLOCKED 127.0.0.1
April 16, 2019, at 07:54 PM by 109.99.227.30 -
Changed line 111 from:

reload_script

to:

reload_routes

April 16, 2019, at 07:38 PM by 109.99.227.30 -
Changed line 25 from:
    # opensipsctl fifo arg
to:
    # opensips-cli -x mi arg
Changed line 39 from:
    # opensipsctl fifo kill
to:
    # opensips-cli -x mi kill
Changed line 49 from:
    # opensipsctl fifo list_blacklists
to:
    # opensips-cli -x mi list_blacklists
Changed line 59 from:
    # opensipsctl fifo list_tcp_conns
to:
    # opensips-cli -x mi list_tcp_conns
Changed line 71 from:
    # opensipsctl fifo log_level
to:
    # opensips-cli -x mi log_level
Changed line 89 from:
    # opensipsctl fifo ps
to:
    # opensips-cli -x mi ps
Changed line 106 from:
    # opensipsctl fifo pwd
to:
    # opensips-cli -x mi pwd
Changed lines 110-111 from:

uptime

Prints various time information about OpenSIPS - when it started to run, for how long it runs.\\

to:

reload_script

Triggers the reload of the routing block (the routes) from the script during the runtime.

Added lines 114-122:

Output: none

Please note that there are some limitations of when a reload is possible or not. Depending on the initial configuration of your modules, the reload may be rejected as the usage of the functions in the new script is not compatible with the original module setting and initialization.
If the reload fails, take a look at the logs to understand why - it may have been a syntax error or maybe a module related constraint. Anyhow, if the reload fails, there is no impact on your running OpenSIPS.

uptime

Prints various time information about OpenSIPS - when it started to run, for how long it runs.
Arguments: none\\

Changed line 128 from:
    # opensipsctl fifo uptime
to:
    # opensips-cli -x mi uptime
Changed line 141 from:
    # opensipsctl fifo version
to:
    # opensips-cli -x mi version
Changed line 153 from:
    # opensipsctl fifo which
to:
    # opensips-cli -x mi which
Changed line 182 from:
    # opensipsctl fifo get_statistics rcv_requests
to:
    # opensips-cli -x mi get_statistics rcv_requests
Changed line 184 from:
    # opensipsctl fifo get_statistics shmem:      
to:
    # opensipsc-cli -x mi get_statistics shmem:      
Changed line 191 from:
    # opensipsctl fifo get_statistics all
to:
    # opensips-cli -x mi get_statistics all
Changed line 200 from:
    # opensipsctl fifo list_statistics
to:
    # opensips-cli -x mi list_statistics
Changed line 222 from:
    # opensipsctl fifo get_statistics received_replies
to:
    # opensips-cli -x mi get_statistics received_replies
Changed lines 224-225 from:
    # opensipsctl fifo reset_statistics received_replies
    # opensipsctl fifo get_statistics received_replies
to:
    # opensips-cli -x mi reset_statistics received_replies
    # opensips-cli -x mi get_statistics received_replies
Changed line 240 from:
    # opensipsctl fifo cache_store local password_user1 password
to:
    # opensips-cli -x mi cache_store local password_user1 password
Changed line 252 from:
    # opensipsctl fifo cache_fetch local password_user1
to:
    # opensips-cli -x mi cache_fetch local password_user1
Changed line 263 from:
    # opensipsctl fifo cache_remove local password_user1
to:
    # opensips-cli -x mi cache_remove local password_user1
Changed line 276 from:
    # opensipsctl fifo event_subscribe E_PIKE_BLOCKED udp:127.0.0.1:8888 1200
to:
    # opensips-cli -x mi event_subscribe E_PIKE_BLOCKED udp:127.0.0.1:8888 1200
Changed line 285 from:
    # opensipsctl fifo events_list
to:
    # opensips-cli -x mi events_list
Changed line 300 from:
    # opensipsctl fifo subscribers_list
to:
    # opensips-cli -x mi subscribers_list
Changed line 308 from:
    # opensipsctl fifo subscribers_list E_RTPPROXY_STATUS
to:
    # opensips-cli -x mi subscribers_list E_RTPPROXY_STATUS
Changed line 313 from:
    # opensipsctl fifo subscribers_list E_RTPPROXY_STATUS unix:/tmp/event.sock
to:
    # opensips-cli -x mi subscribers_list E_RTPPROXY_STATUS unix:/tmp/event.sock
Changed line 326 from:
    # opensipsctl fifo mem_pkg_dump 11854 -1
to:
    # opensips-cli -x mi mem_pkg_dump 11854 -1
Changed line 340 from:
    # opensipsctl fifo mem_shm_dump -1
to:
    # opensips-cli -x mi mem_shm_dump -1
Changed line 352 from:
    # opensipsctl fifo shm_check
to:
    # opensips-cli -x mi shm_check
Changed line 361 from:
    # opensipsctl fifo xlog_level -2
to:
    # opensips-cli -x mi xlog_level -2
March 08, 2019, at 09:18 PM by 109.99.227.30 -
Added lines 345-352:

xlog_level [level]

Get or set the global xlogging level in OpenSIPS processes. If no argument is passed to the xlog_level command, it will print the current xlog_level. If a logging level is given, it will be globally set for all OpenSIPS processes.

Example of usage:

    # opensipsctl fifo xlog_level -2
March 07, 2019, at 04:44 PM by razvancrainea -
Changed lines 19-20 from:

Arguments: none
Output: multiple MI nodes where each node contains an argument. The MI nodes have no name, but only value.

to:

Arguments:
- command (optional)
Output: multiple MI nodes where each node contains an argument. The MI nodes have no name, but only value. If command is specified, the command returns an array that contains all the parameters the command can support.

September 27, 2018, at 07:20 PM by liviu -
Added lines 330-341:

@]

shm_check

Only available with QM_MALLOC + DBG_MALLOC. Fully scans the shared memory pool in order to locate any inconsistencies. If any sign of memory corruption is detected, OpenSIPS will immediately abort.
Arguments: None
Output: current number of fragments.
Example of usage: [@

    # opensipsctl fifo shm_check
May 22, 2018, at 12:44 PM by 109.99.227.30 -
Changed line 307 from:

mem_pkg_dump

to:

mem_pkg_dump

Changed line 322 from:

mem_shm_dump

to:

mem_shm_dump

May 22, 2018, at 12:44 PM by 109.99.227.30 -
Changed lines 317-322 from:

(:commentboxchrono:)

to:

The processes without IPC support (like timer and per-module processes) will not be able to generate a memory dump.

mem_shm_dump

Triggers a shm memory dump. The memory dump will written to OpenSIPS's log (syslog or stderr) using the 'memdump' logging level. The global 'memdump' log level may be overwritten by a custom value provided as argument to this command.
Arguments:
- log level - optional, a log level to be used for this dump
Output: None.
Examples of usage:

    # opensipsctl fifo mem_shm_dump -1

May 22, 2018, at 12:41 PM by 109.99.227.30 -
Added lines 306-318:

mem_pkg_dump

Triggers a pkg memory dump for a given process. The memory dump will written to OpenSIPS's log (syslog or stderr) using the 'memdump' logging level. The global 'memdump' log level may be overwritten by a custom value provided as argument to this command.
Arguments:
- PID - mandatory, the pid of the process to perform the pkg dump
- log level - optional, a log level to be used for this dump
Output: None.
Examples of usage:

    # opensipsctl fifo mem_pkg_dump 11854 -1
March 28, 2018, at 06:01 PM by razvancrainea -
March 28, 2018, at 06:01 PM by razvancrainea -
Deleted lines 29-33:

debug (Removed in OpenSIPS 3.4)

Replaced by log_level function.

March 24, 2016, at 09:02 PM by 109.102.83.452 -
Changed line 70 from:
to:
March 24, 2016, at 09:02 PM by 109.102.83.452 -
Changed lines 31-37 from:

log_level [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process. Arguments:

to:

debug (Removed in OpenSIPS 3.4)

Replaced by log_level function.

kill

The command will terminate OpenSIPS (and internal shutdown).
Arguments: none
Output: none

Changed lines 43-50 from:
    # opensipsctl fifo log_level
    Process::  PID=10670 Debug=2 Type=attendant
    Process::  PID=10672 Debug=3 Type=MI FIFO
    Process::  PID=10673 Debug=1 Type=SIP receiver udp:193.468.3.433:5060
    # opensipsctl fifo log_level 1
    New global debug:: 1
    # opensipsctl fifo log_level 4 10670
    New debug:: 4
to:
    # opensipsctl fifo kill
Changed lines 46-48 from:

kill

The command will terminate OpenSIPS (and internal shutdown).\\

to:

list_blacklists

The command lists all the defined (static or learned) blacklists from OpenSIPS.\\

Changed lines 49-50 from:

Output: none

to:

Output: an MI tree - first level (nodes named "List") will describe the list (name, owner, flags); Second level (nodes named "Rules) will describe the rules (blacklists) for each list (IP/mask, protocol, port, matching regexp, flags)

Changed line 53 from:
    # opensipsctl fifo kill
to:
    # opensipsctl fifo list_blacklists
Changed lines 56-57 from:

list_blacklists

The command lists all the defined (static or learned) blacklists from OpenSIPS.\\

to:

list_tcp_conns

The command lists all ongoing TCP/TLS connection from OpenSIPS.\\

Changed lines 59-60 from:

Output: an MI tree - first level (nodes named "List") will describe the list (name, owner, flags); Second level (nodes named "Rules) will describe the rules (blacklists) for each list (IP/mask, protocol, port, matching regexp, flags)

to:

Output: an MI tree - one record per connection with the following attributes : ID, state, proto, source, destination, timeout, lifetime

Changed line 63 from:
    # opensipsctl fifo list_blacklists
to:
    # opensipsctl fifo list_tcp_conns
Changed lines 66-70 from:

list_tcp_conns

The command lists all ongoing TCP/TLS connection from OpenSIPS.
Arguments: none
Output: an MI tree - one record per connection with the following attributes : ID, state, proto, source, destination, timeout, lifetime

to:

log_level [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process. Arguments:

Changed lines 75-82 from:
    # opensipsctl fifo list_tcp_conns
to:
    # opensipsctl fifo log_level
    Process::  PID=10670 Debug=2 Type=attendant
    Process::  PID=10672 Debug=3 Type=MI FIFO
    Process::  PID=10673 Debug=1 Type=SIP receiver udp:193.468.3.433:5060
    # opensipsctl fifo log_level 1
    New global debug:: 1
    # opensipsctl fifo log_level 4 10670
    New debug:: 4
Added line 84:
March 24, 2016, at 08:59 PM by 109.102.83.452 -
Changed lines 31-33 from:

debug [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the debug command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.

to:

log_level [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the log_level command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.

Changed line 35 from:
  • debug level (-3...4)
to:
Changed line 40 from:
    # opensipsctl fifo debug
to:
    # opensipsctl fifo log_level
Changed line 44 from:
    # opensipsctl fifo debug 1
to:
    # opensipsctl fifo log_level 1
Changed line 46 from:
    # opensipsctl fifo debug 4 10670
to:
    # opensipsctl fifo log_level 4 10670
January 05, 2016, at 12:20 PM by liviu -
Changed line 33 from:

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the debug command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will be changed only for that process.

to:

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the debug command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will change only for that process.

January 05, 2016, at 12:19 PM by liviu -
Changed line 33 from:

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the debug command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is given, the logging level will be changed only for that process.

to:

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the debug command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is also given, the logging level will be changed only for that process.

March 13, 2015, at 08:50 PM by liviu -
Added line 144:
    list_statistics
Deleted line 161:
    nh_enable_rtpp
Added lines 181-200:
    ....

@]

list_statistics

Prints a list of all available statistics in the current configuration of OpenSIPS

Examples of usage: [@

    # opensipsctl fifo list_statistics

shmem:total_size:: incremental shmem:used_size:: incremental shmem:real_used_size:: incremental shmem:max_used_size:: incremental shmem:free_size:: incremental shmem:fragments:: incremental core:rcv_requests:: incremental core:rcv_replies:: incremental core:fwd_requests:: incremental core:fwd_replies:: incremental core:drop_requests:: incremental

August 12, 2014, at 01:23 PM by liviu -
Changed lines 32-37 from:

debug [level]

Gets or sets the value of the debug core variable. You may use it to dynamically (at runtime) change or inspect the debug level of your OpenSIPS. If no argument is passed, the function will fetch the value of the debug level.
Arguments: debug level (-3...4)
Output: debug level (only when no argument is passed). The value will be returned as a single MI node with name "DEBUG"

to:

debug [level] [pid]

Get or set the logging level of one or all OpenSIPS processes. If no argument is passed to the debug command, it will print a table with the current logging levels of all processes. If a logging level is given, it will be set for each process. If pid is given, the logging level will be changed only for that process. Arguments:

  • debug level (-3...4)
  • Unix pid (validated by OpenSIPS)
Changed lines 41-43 from:
    DEBUG:: 4
to:
    Process::  PID=10670 Debug=2 Type=attendant
    Process::  PID=10672 Debug=3 Type=MI FIFO
    Process::  PID=10673 Debug=1 Type=SIP receiver udp:193.468.3.433:5060
Added lines 45-47:
    New global debug:: 1
    # opensipsctl fifo debug 4 10670
    New debug:: 4
March 20, 2014, at 08:55 PM by razvancrainea -
Added lines 1-284:
Documentation -> Manuals -> Manual 3.4 -> Core MI Functions

(:title Core MI Functions - 3.4:)


(:allVersions Interface-CoreMI 3.4:)


Core MI Functions v3.4
PrevNext

(:toc-float Table of Content:)

MI (management interface) functions which are exported by OpenSIPS core.

arg

Returns the full list of arguments used when OpenSIPS was started. As in UNIX, the first argument is the name of executable binary.
Arguments: none
Output: multiple MI nodes where each node contains an argument. The MI nodes have no name, but only value.

Example of usage:

    # opensipsctl fifo arg
    ./opensips
    -f
    /etc/openser/test.cfg

debug [level]

Gets or sets the value of the debug core variable. You may use it to dynamically (at runtime) change or inspect the debug level of your OpenSIPS. If no argument is passed, the function will fetch the value of the debug level.
Arguments: debug level (-3...4)
Output: debug level (only when no argument is passed). The value will be returned as a single MI node with name "DEBUG"

Examples of usage:

    # opensipsctl fifo debug
    DEBUG:: 4
    # opensipsctl fifo debug 1

kill

The command will terminate OpenSIPS (and internal shutdown).
Arguments: none
Output: none

Examples of usage:

    # opensipsctl fifo kill

list_blacklists

The command lists all the defined (static or learned) blacklists from OpenSIPS.
Arguments: none
Output: an MI tree - first level (nodes named "List") will describe the list (name, owner, flags); Second level (nodes named "Rules) will describe the rules (blacklists) for each list (IP/mask, protocol, port, matching regexp, flags)

Examples of usage:

    # opensipsctl fifo list_blacklists

list_tcp_conns

The command lists all ongoing TCP/TLS connection from OpenSIPS.
Arguments: none
Output: an MI tree - one record per connection with the following attributes : ID, state, proto, source, destination, timeout, lifetime

Examples of usage:

    # opensipsctl fifo list_tcp_conns

ps

The command will list all all OpenSIPS processes, along with type and description.
Arguments: none
Output: multiple MI nodes (named "Process") - each node contains process ID (internal), PID (OS), Type and description

Examples of usage:

    # opensipsctl fifo ps
    Process::  ID=0 PID=16224 Type=attendant
    Process::  ID=1 PID=16225 Type=SIP receiver udp:193.468.1.2:5060 
    Process::  ID=2 PID=16226 Type=timer
    Process::  ID=3 PID=16227 Type=MI FIFO
    Process::  ID=4 PID=16228 Type=TCP receiver
    Process::  ID=5 PID=16230 Type=TCP main

pwd

Prints the working directory of OpenSIPS instance.
Arguments: none
Output: a single MI node with name "WD" containing the working directory full path.

Examples of usage:

    # opensipsctl fifo pwd
    WD:: /

uptime

Prints various time information about OpenSIPS - when it started to run, for how long it runs.
Arguments: none
Output: three MI nodes: "Now" - current time; "Up since" - start time ; "Up time" - number of seconds since started.

Examples of usage:

    # opensipsctl fifo uptime
    Now:: Mon Jul 21 17:41:03 2008
    Up since:: Mon Jul 21 17:36:33 2008
    Up time:: 270 [sec]

version

Prints the version string of a runningOpenSIPS.
Arguments: none
Output: one MI node (named "Server") containing the version string.

Examples of usage:

    # opensipsctl fifo version
    Server:: OpenSIPS (1.4.0dev14-notls (i386/linux))

which

Prints all available MI commands from the queried OpenSIPSinstance.
Arguments: none
Output: multiple MI nodes (no name), each node containing (as value) the name of an available MI command. NOTE that the list of available MI commands may differ depending of what modules your OpenSIPS is using.

Examples of usage:

    # opensipsctl fifo which
    get_statistics
    reset_statistics
    uptime
    version
    pwd
    arg
    which
    ps
    kill
    debug
    list_blacklists
    ul_rm
    ul_rm_contact
    ul_dump
    ul_flush
    ul_add
    ul_show_contact
    nh_enable_ping
    nh_enable_rtpp

get_statistics

Prints the statistics (all, group or one) realtime values.
Arguments: input may be "all" - print all available statistics; "group:" - print only statistics from a certain group; "name" - print only this statistic. The OpenSIPS core defines the following groups: core, shmem; Modules export groups typically named like the module itself.
Output: list of MI nodes (no name) - each MI mode contains the name and value of a single statistic variable.

Examples of usage:

    # opensipsctl fifo get_statistics rcv_requests
    core:rcv_requests = 35243
    # opensipsctl fifo get_statistics shmem:      
    shmem:total_size = 33554432
    shmem:used_size = 1686952
    shmem:real_used_size = 1704592
    shmem:max_used_size = 1704592
    shmem:free_size = 31849840
    shmem:fragments = 1
    # opensipsctl fifo get_statistics all
    ....

reset_statistics

Reset (to zero) the value of a statistic variable. Note that not all variables allow reset (depending of the nature of the information they carry - example "shmem:used_size").
Arguments: name of the variable to be reset.
Output: none.

Examples of usage:

    # opensipsctl fifo get_statistics received_replies
    core:received_replies = 14543
    # opensipsctl fifo reset_statistics received_replies
    # opensipsctl fifo get_statistics received_replies
    core:received_replies = 0

cache_store

This command stores in a cache system a string value.
Arguments:
- cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
- the label to be associated with this value
- the string to be stored
Output: none.
Examples of usage:

    # opensipsctl fifo cache_store local password_user1 password

cache_fetch

This command queries for a stored value.
Arguments:
- cache system to use - for the cache system implemented by OpenSIPS module 'localcache' the value of this parameter should be 'local'
- the label associated with the value
Output: MI tree containing the value if a record is found or 'Value not found' string otherwise.
Examples of usage:

    # opensipsctl fifo cache_fetch local password_user1

cache_remove

This command removes a record from the cache system.
Arguments:
- cache system to use
- the label associated with the stored value
Output: None.
Examples of usage:

    # opensipsctl fifo cache_remove local password_user1

event_subscribe

Subscribes an external application to a certain event.
Arguments:
- event name
- external application socket
- expire time, in seconds - if absent, the subscription is valid only one hour (3600 s)
Output: None.
Examples of usage:

    # opensipsctl fifo event_subscribe E_PIKE_BLOCKED udp:127.0.0.1:8888 1200

events_list

Lists all the events published through the Event Interface.
Arguments: None.
Output: None.
Examples of usage:

    # opensipsctl fifo events_list
    Event:: E_CORE_THRESHOLD id=0
    Event:: E_RTPPROXY_STATUS id=1
    Event:: E_PIKE_BLOCKED id=2

subscribers_list

Lists information about the subscribers
Arguments:
- event name
- external application socket
Output: If no parameter is specified, then the command returns information about all events and their subscribers. If the event is specified, only the external applications subscribed for that event are returned. If the socket is also specified, only one subscriber information is returned.
Examples of usage:

    # opensipsctl fifo subscribers_list
    Event:: E_CORE_THRESHOLD id=0
    Event:: E_RTPPROXY_STATUS id=1
	Subscriber::  socket=unix:/tmp/event.sock expire=never
	Subscriber::  socket=udp:127.0.0.1:8888 expire=1100
    Event:: E_PIKE_BLOCKED id=2
	Subscriber::  socket=rabbitmq:guest@127.0.0.1/hello expire=never

    # opensipsctl fifo subscribers_list E_RTPPROXY_STATUS
    Event:: E_RTPPROXY_STATUS id=1
	Subscriber::  socket=unix:/tmp/event.sock expire=never
	Subscriber::  socket=udp:127.0.0.1:8888 expire=1100

    # opensipsctl fifo subscribers_list E_RTPPROXY_STATUS unix:/tmp/event.sock
    Event:: E_RTPPROXY_STATUS id=1
	Subscriber::  socket=unix:/tmp/event.sock expire=never

(:commentboxchrono:)


Page last modified on June 21, 2023, at 08:20 PM